blob: aeae2e74c31910f4a209dbc494436d9844500d51 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussorena9cfbde2009-09-20 20:05:44 +00002# From configure.in Revision: 74715 .
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",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001339 "64-bit", "3-way", "intel" 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 +00001914
1915
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001916UNIVERSAL_ARCHS="32-bit"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001917{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1918echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001919
1920# Check whether --with-universal-archs was given.
1921if test "${with_universal_archs+set}" = set; then
1922 withval=$with_universal_archs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001923 { echo "$as_me:$LINENO: result: $withval" >&5
1924echo "${ECHO_T}$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001925 UNIVERSAL_ARCHS="$withval"
1926
1927else
1928
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001929 { echo "$as_me:$LINENO: result: 32-bit" >&5
1930echo "${ECHO_T}32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001931
1932fi
1933
1934
1935
1936
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001937
1938# Check whether --with-framework-name was given.
1939if test "${with_framework_name+set}" = set; then
1940 withval=$with_framework_name;
1941 PYTHONFRAMEWORK=${withval}
1942 PYTHONFRAMEWORKDIR=${withval}.framework
1943 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1944
1945else
1946
1947 PYTHONFRAMEWORK=Python
1948 PYTHONFRAMEWORKDIR=Python.framework
1949 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1950
1951fi
1952
Martin v. Löwiseba40652007-08-30 20:10:57 +00001953# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001954if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001955 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001956 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001957 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001958 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001959 esac
1960 case $enableval in
1961 no)
1962 PYTHONFRAMEWORK=
1963 PYTHONFRAMEWORKDIR=no-framework
1964 PYTHONFRAMEWORKPREFIX=
1965 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001966 FRAMEWORKINSTALLFIRST=
1967 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001968 FRAMEWORKALTINSTALLFIRST=
1969 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001970 if test "x${prefix}" = "xNONE"; then
1971 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1972 else
1973 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1974 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001975 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001976 ;;
1977 *)
1978 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001979 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001980 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001981 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1982 if test "$UNIVERSAL_ARCHS" = "all"
1983 then
1984 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001985 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001986 else
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001987 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001988 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1989 fi
1990
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001991 if test "x${prefix}" = "xNONE" ; then
1992 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1993 else
1994 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1995 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001996 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001997
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001998 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00001999 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002000 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002001
Martin v. Löwiseba40652007-08-30 20:10:57 +00002002 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002003
Martin v. Löwiseba40652007-08-30 20:10:57 +00002004 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002005
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002006 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2007
2008 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2009
Jack Jansene578a632001-08-15 01:27:14 +00002010 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002011
Guido van Rossum563e7081996-09-10 18:20:48 +00002012else
Martin v. Löwis11437992002-04-12 09:54:03 +00002013
Jack Jansene578a632001-08-15 01:27:14 +00002014 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002015 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002016 PYTHONFRAMEWORKPREFIX=
2017 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002018 FRAMEWORKINSTALLFIRST=
2019 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002020 FRAMEWORKALTINSTALLFIRST=
2021 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002022 if test "x${prefix}" = "xNONE" ; then
2023 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2024 else
2025 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2026 fi
Jack Jansene578a632001-08-15 01:27:14 +00002027 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002028
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002029 if test "$UNIVERSAL_ARCHS" = "all"
2030 then
2031 FRAMEWORKINSTALLLAST=update4wayuniversal
2032 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2033 fi
2034
Martin v. Löwiseba40652007-08-30 20:10:57 +00002035fi
2036
Michael W. Hudson54241132001-12-07 15:38:26 +00002037
2038
2039
2040
Jack Jansene578a632001-08-15 01:27:14 +00002041
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002042
2043
Ronald Oussoren5b787322006-06-06 19:50:24 +00002044
2045
2046
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002047
Jack Jansene578a632001-08-15 01:27:14 +00002048##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002049## AC_HELP_STRING(--with-dyld,
2050## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002051##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002052# Set name for machine-dependent library files
2053
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002054{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2055echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002056if test -z "$MACHDEP"
2057then
Guido van Rossum563e7081996-09-10 18:20:48 +00002058 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002059 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002060 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002061 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002062 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002063 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002064 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002065 ac_md_system=`echo $ac_sys_system |
2066 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2067 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002068 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002069 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002070
Guido van Rossum07397971997-04-29 21:49:50 +00002071 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002072 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002073 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002074 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002075 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002076 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002077 esac
2078fi
Guido van Rossum91922671997-10-09 20:24:13 +00002079
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002080# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2081# disable features if it is defined, without any means to access these
2082# features as extensions. For these systems, we skip the definition of
2083# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2084# some feature, make sure there is no alternative way to access this
2085# feature. Also, when using wildcards, make sure you have verified the
2086# need for not defining _XOPEN_SOURCE on all systems matching the
2087# wildcard, and that the wildcard does not include future systems
2088# (which may remove their limitations).
2089case $ac_sys_system/$ac_sys_release in
2090 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2091 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002092 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002093 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002094 define_xopen_source=no
2095 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2096 # also defined. This can be overridden by defining _BSD_SOURCE
2097 # As this has a different meaning on Linux, only define it on OpenBSD
2098
2099cat >>confdefs.h <<\_ACEOF
2100#define _BSD_SOURCE 1
2101_ACEOF
2102
2103 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002104 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2105 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2106 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002107 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 +00002108 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002109 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2110 # of union __?sigval. Reported by Stuart Bishop.
2111 SunOS/5.6)
2112 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002113 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2114 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002115 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002116 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002117 define_xopen_source=no;;
2118 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002119 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002120 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002121 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002122 # On FreeBSD 4, the math functions C89 does not cover are never defined
2123 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2124 FreeBSD/4.*)
2125 define_xopen_source=no;;
2126 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2127 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2128 # identifies itself as Darwin/7.*
2129 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2130 # disables platform specific features beyond repair.
2131 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2132 # has no effect, don't bother defining them
2133 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002134 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002135 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2136 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2137 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002138 AIX/4)
2139 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002140 AIX/5)
2141 if test `uname -r` -eq 1; then
2142 define_xopen_source=no
2143 fi
2144 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002145 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2146 # defining NI_NUMERICHOST.
2147 QNX/6.3.2)
2148 define_xopen_source=no
2149 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002150
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002151esac
2152
2153if test $define_xopen_source = yes
2154then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002155 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2156 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002157 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2158 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002159 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002160 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002161
2162cat >>confdefs.h <<\_ACEOF
2163#define _XOPEN_SOURCE 500
2164_ACEOF
2165
2166 ;;
2167 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002168
2169cat >>confdefs.h <<\_ACEOF
2170#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002171_ACEOF
2172
Skip Montanarof0d5f792004-08-15 14:08:23 +00002173 ;;
2174 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002175
2176 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2177 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2178 # several APIs are not declared. Since this is also needed in some
2179 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002180 # except for Solaris 10, where it must not be defined,
2181 # as it implies XPG4.2
2182 case $ac_sys_system/$ac_sys_release in
2183 SunOS/5.10)
2184 ;;
2185 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002186
2187cat >>confdefs.h <<\_ACEOF
2188#define _XOPEN_SOURCE_EXTENDED 1
2189_ACEOF
2190
Martin v. Löwis7dece662005-11-26 11:38:24 +00002191 ;;
2192 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002193
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002194
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002195cat >>confdefs.h <<\_ACEOF
2196#define _POSIX_C_SOURCE 200112L
2197_ACEOF
2198
2199
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002200fi
2201
Guido van Rossum91922671997-10-09 20:24:13 +00002202#
2203# SGI compilers allow the specification of the both the ABI and the
2204# ISA on the command line. Depending on the values of these switches,
2205# different and often incompatable code will be generated.
2206#
2207# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2208# thus supply support for various ABI/ISA combinations. The MACHDEP
2209# variable is also adjusted.
2210#
2211
2212if test ! -z "$SGI_ABI"
2213then
2214 CC="cc $SGI_ABI"
2215 LDFLAGS="$SGI_ABI $LDFLAGS"
2216 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2217fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002218{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2219echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002220
Jack Jansen83f898c2002-12-30 22:23:40 +00002221# And add extra plat-mac for darwin
2222
Jack Jansen7b59b422003-03-17 15:44:10 +00002223
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002224{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2225echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002226if test -z "$EXTRAPLATDIR"
2227then
2228 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002229 darwin)
2230 EXTRAPLATDIR="\$(PLATMACDIRS)"
2231 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2232 ;;
2233 *)
2234 EXTRAPLATDIR=""
2235 EXTRAMACHDEPPATH=""
2236 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002237 esac
2238fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002239{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2240echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002241
Jack Jansen6b08a402004-06-03 12:41:45 +00002242# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2243# it may influence the way we can build extensions, so distutils
2244# needs to check it
2245
Ronald Oussoren988117f2006-04-29 11:31:35 +00002246
Jack Jansen6b08a402004-06-03 12:41:45 +00002247CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002248EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002249
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002250{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2251echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002252ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002253{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2254echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002255
Guido van Rossum627b2d71993-12-24 10:39:16 +00002256# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002257
2258# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2259# for debug/optimization stuff. BASECFLAGS is for flags that are required
2260# just to get things to compile and link. Users are free to override OPT
2261# when running configure or make. The build should not break if they do.
2262# BASECFLAGS should generally not be messed with, however.
2263
2264# XXX shouldn't some/most/all of this code be merged with the stuff later
2265# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002266{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2267echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002268
Martin v. Löwiseba40652007-08-30 20:10:57 +00002269# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002270if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002271 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002272 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002273 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002274 without_gcc=yes;;
2275 yes) CC=gcc
2276 without_gcc=no;;
2277 *) CC=$withval
2278 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002279 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002280else
Martin v. Löwis11437992002-04-12 09:54:03 +00002281
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002282 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002283 AIX*) CC=cc_r
2284 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002285 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002286 case $BE_HOST_CPU in
2287 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002288 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002289 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002290 BASECFLAGS="$BASECFLAGS -export pragma"
2291 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002292 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002293 ;;
2294 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002295 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002296 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002297 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002298 ;;
2299 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002300 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2301echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002302 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002303 ;;
2304 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002305 AR="\$(srcdir)/Modules/ar_beos"
2306 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002307 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002308 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002309 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002310fi
2311
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002312{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2313echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002314
Guido van Rossum8b131c51995-03-09 14:10:13 +00002315# If the user switches compilers, we can't believe the cache
2316if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2317then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002318 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002319(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002320echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002321(it is also a good idea to do 'make clean' before compiling)" >&2;}
2322 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002323fi
2324
Martin v. Löwis11437992002-04-12 09:54:03 +00002325ac_ext=c
2326ac_cpp='$CPP $CPPFLAGS'
2327ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2328ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2329ac_compiler_gnu=$ac_cv_c_compiler_gnu
2330if test -n "$ac_tool_prefix"; then
2331 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2332set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002333{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2334echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002335if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002336 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002337else
2338 if test -n "$CC"; then
2339 ac_cv_prog_CC="$CC" # Let the user override the test.
2340else
Martin v. Löwis11437992002-04-12 09:54:03 +00002341as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2342for as_dir in $PATH
2343do
2344 IFS=$as_save_IFS
2345 test -z "$as_dir" && as_dir=.
2346 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002347 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 +00002348 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002349 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002350 break 2
2351 fi
2352done
2353done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002354IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002355
Jack Jansendd19cf82001-12-06 22:36:17 +00002356fi
2357fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002358CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002359if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002360 { echo "$as_me:$LINENO: result: $CC" >&5
2361echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002362else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002363 { echo "$as_me:$LINENO: result: no" >&5
2364echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002365fi
2366
Martin v. Löwiseba40652007-08-30 20:10:57 +00002367
Martin v. Löwis11437992002-04-12 09:54:03 +00002368fi
2369if test -z "$ac_cv_prog_CC"; then
2370 ac_ct_CC=$CC
2371 # Extract the first word of "gcc", so it can be a program name with args.
2372set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002373{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2374echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002375if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002376 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002377else
2378 if test -n "$ac_ct_CC"; then
2379 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2380else
2381as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2382for as_dir in $PATH
2383do
2384 IFS=$as_save_IFS
2385 test -z "$as_dir" && as_dir=.
2386 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002387 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 +00002388 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002389 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002390 break 2
2391 fi
2392done
2393done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002394IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002395
2396fi
2397fi
2398ac_ct_CC=$ac_cv_prog_ac_ct_CC
2399if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002400 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2401echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002402else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002403 { echo "$as_me:$LINENO: result: no" >&5
2404echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002405fi
2406
Martin v. Löwiseba40652007-08-30 20:10:57 +00002407 if test "x$ac_ct_CC" = x; then
2408 CC=""
2409 else
2410 case $cross_compiling:$ac_tool_warned in
2411yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002412{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2413whose name does not start with the host triplet. If you think this
2414configuration is useful to you, please write to autoconf@gnu.org." >&5
2415echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2416whose name does not start with the host triplet. If you think this
2417configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002418ac_tool_warned=yes ;;
2419esac
2420 CC=$ac_ct_CC
2421 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002422else
2423 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002424fi
2425
Jack Jansendd19cf82001-12-06 22:36:17 +00002426if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002427 if test -n "$ac_tool_prefix"; then
2428 # 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 +00002429set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002430{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2431echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002432if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002433 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002434else
2435 if test -n "$CC"; then
2436 ac_cv_prog_CC="$CC" # Let the user override the test.
2437else
Martin v. Löwis11437992002-04-12 09:54:03 +00002438as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2439for as_dir in $PATH
2440do
2441 IFS=$as_save_IFS
2442 test -z "$as_dir" && as_dir=.
2443 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002444 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 +00002445 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002446 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 break 2
2448 fi
2449done
2450done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002451IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002452
2453fi
2454fi
2455CC=$ac_cv_prog_CC
2456if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002457 { echo "$as_me:$LINENO: result: $CC" >&5
2458echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002459else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002460 { echo "$as_me:$LINENO: result: no" >&5
2461echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002462fi
2463
Martin v. Löwiseba40652007-08-30 20:10:57 +00002464
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002466fi
2467if test -z "$CC"; then
2468 # Extract the first word of "cc", so it can be a program name with args.
2469set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002470{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2471echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002472if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002473 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002474else
2475 if test -n "$CC"; then
2476 ac_cv_prog_CC="$CC" # Let the user override the test.
2477else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002478 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2480for as_dir in $PATH
2481do
2482 IFS=$as_save_IFS
2483 test -z "$as_dir" && as_dir=.
2484 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002485 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 +00002486 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2487 ac_prog_rejected=yes
2488 continue
2489 fi
2490 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002491 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002492 break 2
2493 fi
2494done
2495done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002496IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002497
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002498if test $ac_prog_rejected = yes; then
2499 # We found a bogon in the path, so make sure we never use it.
2500 set dummy $ac_cv_prog_CC
2501 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002502 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002503 # We chose a different compiler from the bogus one.
2504 # However, it has the same basename, so the bogon will be chosen
2505 # first if we set CC to just the basename; use the full file name.
2506 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002507 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002508 fi
2509fi
2510fi
2511fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002512CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002513if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002514 { echo "$as_me:$LINENO: result: $CC" >&5
2515echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002516else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002517 { echo "$as_me:$LINENO: result: no" >&5
2518echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002519fi
2520
Martin v. Löwiseba40652007-08-30 20:10:57 +00002521
Martin v. Löwis11437992002-04-12 09:54:03 +00002522fi
2523if test -z "$CC"; then
2524 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002525 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 do
2527 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2528set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002529{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2530echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002531if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002532 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002533else
2534 if test -n "$CC"; then
2535 ac_cv_prog_CC="$CC" # Let the user override the test.
2536else
Martin v. Löwis11437992002-04-12 09:54:03 +00002537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2538for as_dir in $PATH
2539do
2540 IFS=$as_save_IFS
2541 test -z "$as_dir" && as_dir=.
2542 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002543 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 +00002544 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002545 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002546 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002547 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002548done
2549done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002550IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002551
2552fi
2553fi
2554CC=$ac_cv_prog_CC
2555if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002556 { echo "$as_me:$LINENO: result: $CC" >&5
2557echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002558else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002559 { echo "$as_me:$LINENO: result: no" >&5
2560echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002561fi
2562
Martin v. Löwiseba40652007-08-30 20:10:57 +00002563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564 test -n "$CC" && break
2565 done
2566fi
2567if test -z "$CC"; then
2568 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002569 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002570do
2571 # Extract the first word of "$ac_prog", so it can be a program name with args.
2572set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002573{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2574echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002575if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002576 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002577else
2578 if test -n "$ac_ct_CC"; then
2579 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2580else
2581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2582for as_dir in $PATH
2583do
2584 IFS=$as_save_IFS
2585 test -z "$as_dir" && as_dir=.
2586 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002587 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 +00002588 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002589 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002590 break 2
2591 fi
2592done
2593done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002594IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002595
Martin v. Löwis11437992002-04-12 09:54:03 +00002596fi
2597fi
2598ac_ct_CC=$ac_cv_prog_ac_ct_CC
2599if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002600 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2601echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002602else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002603 { echo "$as_me:$LINENO: result: no" >&5
2604echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002605fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002606
Martin v. Löwiseba40652007-08-30 20:10:57 +00002607
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 test -n "$ac_ct_CC" && break
2609done
Michael W. Hudson54241132001-12-07 15:38:26 +00002610
Martin v. Löwiseba40652007-08-30 20:10:57 +00002611 if test "x$ac_ct_CC" = x; then
2612 CC=""
2613 else
2614 case $cross_compiling:$ac_tool_warned in
2615yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002616{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2617whose name does not start with the host triplet. If you think this
2618configuration is useful to you, please write to autoconf@gnu.org." >&5
2619echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2620whose name does not start with the host triplet. If you think this
2621configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002622ac_tool_warned=yes ;;
2623esac
2624 CC=$ac_ct_CC
2625 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002626fi
2627
2628fi
2629
2630
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002631test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002632See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002633echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002634See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002635 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002636
2637# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002638echo "$as_me:$LINENO: checking for C compiler version" >&5
2639ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002640{ (ac_try="$ac_compiler --version >&5"
2641case "(($ac_try" in
2642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2643 *) ac_try_echo=$ac_try;;
2644esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002646 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002650{ (ac_try="$ac_compiler -v >&5"
2651case "(($ac_try" in
2652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2653 *) ac_try_echo=$ac_try;;
2654esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002656 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002660{ (ac_try="$ac_compiler -V >&5"
2661case "(($ac_try" in
2662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2663 *) ac_try_echo=$ac_try;;
2664esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002666 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 (exit $ac_status); }
2670
2671cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002672/* confdefs.h. */
2673_ACEOF
2674cat confdefs.h >>conftest.$ac_ext
2675cat >>conftest.$ac_ext <<_ACEOF
2676/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002677
Martin v. Löwis11437992002-04-12 09:54:03 +00002678int
2679main ()
2680{
2681
2682 ;
2683 return 0;
2684}
2685_ACEOF
2686ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002687ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002688# Try to create an executable without -o first, disregard a.out.
2689# It will help us diagnose broken compilers, and finding out an intuition
2690# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002691{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2692echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2693ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2694#
2695# List of possible output files, starting from the most likely.
2696# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2697# only as a last resort. b.out is created by i960 compilers.
2698ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2699#
2700# The IRIX 6 linker writes into existing files which may not be
2701# executable, retaining their permissions. Remove them first so a
2702# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002703ac_rmfiles=
2704for ac_file in $ac_files
2705do
2706 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002707 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002708 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2709 esac
2710done
2711rm -f $ac_rmfiles
2712
2713if { (ac_try="$ac_link_default"
2714case "(($ac_try" in
2715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2716 *) ac_try_echo=$ac_try;;
2717esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002719 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002720 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002723 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2724# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2725# in a Makefile. We should not override ac_cv_exeext if it was cached,
2726# so that the user can short-circuit this test for compilers unknown to
2727# Autoconf.
2728for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002729do
2730 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002732 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002733 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002734 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002735 # We found the default executable, but exeext='' is most
2736 # certainly right.
2737 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002738 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002739 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2740 then :; else
2741 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2742 fi
2743 # We set ac_cv_exeext here because the later test for it is not
2744 # safe: cross compilers may not add the suffix if given an `-o'
2745 # argument, so we may need to know it at that point already.
2746 # Even if this section looks crufty: it has the advantage of
2747 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002748 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002749 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002750 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002751 esac
2752done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002753test "$ac_cv_exeext" = no && ac_cv_exeext=
2754
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002755else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002756 ac_file=''
2757fi
2758
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002759{ echo "$as_me:$LINENO: result: $ac_file" >&5
2760echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002761if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002763sed 's/^/| /' conftest.$ac_ext >&5
2764
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002765{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002766See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002767echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002768See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002769 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002770fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002771
Martin v. Löwis11437992002-04-12 09:54:03 +00002772ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002773
Martin v. Löwiseba40652007-08-30 20:10:57 +00002774# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002775# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002776{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2777echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002778# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2779# If not cross compiling, check that we can run a simple program.
2780if test "$cross_compiling" != yes; then
2781 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002782 { (case "(($ac_try" in
2783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2784 *) ac_try_echo=$ac_try;;
2785esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002787 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002788 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002790 (exit $ac_status); }; }; then
2791 cross_compiling=no
2792 else
2793 if test "$cross_compiling" = maybe; then
2794 cross_compiling=yes
2795 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002796 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002797If you meant to cross compile, use \`--host'.
2798See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002799echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002800If you meant to cross compile, use \`--host'.
2801See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002802 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002803 fi
2804 fi
2805fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002806{ echo "$as_me:$LINENO: result: yes" >&5
2807echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002808
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002809rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002810ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002811# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002812# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002813{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2814echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2815{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2816echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002817
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002818{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2819echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002820if { (ac_try="$ac_link"
2821case "(($ac_try" in
2822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2823 *) ac_try_echo=$ac_try;;
2824esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002826 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002827 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002829 (exit $ac_status); }; then
2830 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2831# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2832# work properly (i.e., refer to `conftest.exe'), while it won't with
2833# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002834for ac_file in conftest.exe conftest conftest.*; do
2835 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002836 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002837 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002838 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002839 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002840 * ) break;;
2841 esac
2842done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002843else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002844 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002845See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002846echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002847See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002848 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002849fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002850
Martin v. Löwis11437992002-04-12 09:54:03 +00002851rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002852{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2853echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002854
2855rm -f conftest.$ac_ext
2856EXEEXT=$ac_cv_exeext
2857ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002858{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2859echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002860if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002861 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002862else
Martin v. Löwis11437992002-04-12 09:54:03 +00002863 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002864/* confdefs.h. */
2865_ACEOF
2866cat confdefs.h >>conftest.$ac_ext
2867cat >>conftest.$ac_ext <<_ACEOF
2868/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002869
Martin v. Löwis11437992002-04-12 09:54:03 +00002870int
2871main ()
2872{
2873
2874 ;
2875 return 0;
2876}
2877_ACEOF
2878rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002879if { (ac_try="$ac_compile"
2880case "(($ac_try" in
2881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2882 *) ac_try_echo=$ac_try;;
2883esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002885 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002886 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002888 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002889 for ac_file in conftest.o conftest.obj conftest.*; do
2890 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002891 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002892 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002893 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2894 break;;
2895 esac
2896done
2897else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002899sed 's/^/| /' conftest.$ac_ext >&5
2900
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002901{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002902See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002903echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002904See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002905 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002906fi
2907
2908rm -f conftest.$ac_cv_objext conftest.$ac_ext
2909fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002910{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2911echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002912OBJEXT=$ac_cv_objext
2913ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002914{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2915echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002916if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002917 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002918else
2919 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002920/* confdefs.h. */
2921_ACEOF
2922cat confdefs.h >>conftest.$ac_ext
2923cat >>conftest.$ac_ext <<_ACEOF
2924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002925
Martin v. Löwis11437992002-04-12 09:54:03 +00002926int
2927main ()
2928{
2929#ifndef __GNUC__
2930 choke me
2931#endif
2932
2933 ;
2934 return 0;
2935}
2936_ACEOF
2937rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002938if { (ac_try="$ac_compile"
2939case "(($ac_try" in
2940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2941 *) ac_try_echo=$ac_try;;
2942esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002944 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002945 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002946 grep -v '^ *+' conftest.er1 >conftest.err
2947 rm -f conftest.er1
2948 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002950 (exit $ac_status); } && {
2951 test -z "$ac_c_werror_flag" ||
2952 test ! -s conftest.err
2953 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002954 ac_compiler_gnu=yes
2955else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002956 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002957sed 's/^/| /' conftest.$ac_ext >&5
2958
Martin v. Löwiseba40652007-08-30 20:10:57 +00002959 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002960fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002961
2962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002963ac_cv_c_compiler_gnu=$ac_compiler_gnu
2964
2965fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002966{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2967echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2968GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002969ac_test_CFLAGS=${CFLAGS+set}
2970ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002971{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2972echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002973if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002974 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002975else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002976 ac_save_c_werror_flag=$ac_c_werror_flag
2977 ac_c_werror_flag=yes
2978 ac_cv_prog_cc_g=no
2979 CFLAGS="-g"
2980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002981/* confdefs.h. */
2982_ACEOF
2983cat confdefs.h >>conftest.$ac_ext
2984cat >>conftest.$ac_ext <<_ACEOF
2985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002986
Martin v. Löwis11437992002-04-12 09:54:03 +00002987int
2988main ()
2989{
2990
2991 ;
2992 return 0;
2993}
2994_ACEOF
2995rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002996if { (ac_try="$ac_compile"
2997case "(($ac_try" in
2998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2999 *) ac_try_echo=$ac_try;;
3000esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003002 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003003 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003004 grep -v '^ *+' conftest.er1 >conftest.err
3005 rm -f conftest.er1
3006 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003008 (exit $ac_status); } && {
3009 test -z "$ac_c_werror_flag" ||
3010 test ! -s conftest.err
3011 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003012 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003013else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003015sed 's/^/| /' conftest.$ac_ext >&5
3016
Martin v. Löwiseba40652007-08-30 20:10:57 +00003017 CFLAGS=""
3018 cat >conftest.$ac_ext <<_ACEOF
3019/* confdefs.h. */
3020_ACEOF
3021cat confdefs.h >>conftest.$ac_ext
3022cat >>conftest.$ac_ext <<_ACEOF
3023/* end confdefs.h. */
3024
3025int
3026main ()
3027{
3028
3029 ;
3030 return 0;
3031}
3032_ACEOF
3033rm -f conftest.$ac_objext
3034if { (ac_try="$ac_compile"
3035case "(($ac_try" in
3036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3037 *) ac_try_echo=$ac_try;;
3038esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003040 (eval "$ac_compile") 2>conftest.er1
3041 ac_status=$?
3042 grep -v '^ *+' conftest.er1 >conftest.err
3043 rm -f conftest.er1
3044 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003046 (exit $ac_status); } && {
3047 test -z "$ac_c_werror_flag" ||
3048 test ! -s conftest.err
3049 } && test -s conftest.$ac_objext; then
3050 :
3051else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003052 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003053sed 's/^/| /' conftest.$ac_ext >&5
3054
3055 ac_c_werror_flag=$ac_save_c_werror_flag
3056 CFLAGS="-g"
3057 cat >conftest.$ac_ext <<_ACEOF
3058/* confdefs.h. */
3059_ACEOF
3060cat confdefs.h >>conftest.$ac_ext
3061cat >>conftest.$ac_ext <<_ACEOF
3062/* end confdefs.h. */
3063
3064int
3065main ()
3066{
3067
3068 ;
3069 return 0;
3070}
3071_ACEOF
3072rm -f conftest.$ac_objext
3073if { (ac_try="$ac_compile"
3074case "(($ac_try" in
3075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3076 *) ac_try_echo=$ac_try;;
3077esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003079 (eval "$ac_compile") 2>conftest.er1
3080 ac_status=$?
3081 grep -v '^ *+' conftest.er1 >conftest.err
3082 rm -f conftest.er1
3083 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003085 (exit $ac_status); } && {
3086 test -z "$ac_c_werror_flag" ||
3087 test ! -s conftest.err
3088 } && test -s conftest.$ac_objext; then
3089 ac_cv_prog_cc_g=yes
3090else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003091 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003092sed 's/^/| /' conftest.$ac_ext >&5
3093
3094
Guido van Rossum627b2d71993-12-24 10:39:16 +00003095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003096
3097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003098fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003099
3100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3101fi
3102
3103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3104 ac_c_werror_flag=$ac_save_c_werror_flag
3105fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003106{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3107echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003108if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003109 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003110elif test $ac_cv_prog_cc_g = yes; then
3111 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003112 CFLAGS="-g -O2"
3113 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003114 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003115 fi
3116else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003117 if test "$GCC" = yes; then
3118 CFLAGS="-O2"
3119 else
3120 CFLAGS=
3121 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003122fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003123{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3124echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003125if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003126 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003127else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003128 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003129ac_save_CC=$CC
3130cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003131/* confdefs.h. */
3132_ACEOF
3133cat confdefs.h >>conftest.$ac_ext
3134cat >>conftest.$ac_ext <<_ACEOF
3135/* end confdefs.h. */
3136#include <stdarg.h>
3137#include <stdio.h>
3138#include <sys/types.h>
3139#include <sys/stat.h>
3140/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3141struct buf { int x; };
3142FILE * (*rcsopen) (struct buf *, struct stat *, int);
3143static char *e (p, i)
3144 char **p;
3145 int i;
3146{
3147 return p[i];
3148}
3149static char *f (char * (*g) (char **, int), char **p, ...)
3150{
3151 char *s;
3152 va_list v;
3153 va_start (v,p);
3154 s = g (p, va_arg (v,int));
3155 va_end (v);
3156 return s;
3157}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003158
3159/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3160 function prototypes and stuff, but not '\xHH' hex character constants.
3161 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003162 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003163 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3164 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003165 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003166int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3167
Martin v. Löwiseba40652007-08-30 20:10:57 +00003168/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3169 inside strings and character constants. */
3170#define FOO(x) 'x'
3171int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3172
Skip Montanaro6dead952003-09-25 14:50:04 +00003173int test (int i, double x);
3174struct s1 {int (*f) (int a);};
3175struct s2 {int (*f) (double a);};
3176int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3177int argc;
3178char **argv;
3179int
3180main ()
3181{
3182return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3183 ;
3184 return 0;
3185}
3186_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003187for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3188 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003189do
3190 CC="$ac_save_CC $ac_arg"
3191 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003192if { (ac_try="$ac_compile"
3193case "(($ac_try" in
3194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3195 *) ac_try_echo=$ac_try;;
3196esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003198 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003200 grep -v '^ *+' conftest.er1 >conftest.err
3201 rm -f conftest.er1
3202 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003204 (exit $ac_status); } && {
3205 test -z "$ac_c_werror_flag" ||
3206 test ! -s conftest.err
3207 } && test -s conftest.$ac_objext; then
3208 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003209else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003211sed 's/^/| /' conftest.$ac_ext >&5
3212
Martin v. Löwiseba40652007-08-30 20:10:57 +00003213
Skip Montanaro6dead952003-09-25 14:50:04 +00003214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003215
3216rm -f core conftest.err conftest.$ac_objext
3217 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003218done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003219rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003220CC=$ac_save_CC
3221
3222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003223# AC_CACHE_VAL
3224case "x$ac_cv_prog_cc_c89" in
3225 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003226 { echo "$as_me:$LINENO: result: none needed" >&5
3227echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003228 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003229 { echo "$as_me:$LINENO: result: unsupported" >&5
3230echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003231 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003232 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003233 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3234echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003235esac
3236
Skip Montanaro6dead952003-09-25 14:50:04 +00003237
Martin v. Löwis11437992002-04-12 09:54:03 +00003238ac_ext=c
3239ac_cpp='$CPP $CPPFLAGS'
3240ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3241ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3242ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003243
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003244
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003245
3246
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003247{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3248echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003249
Martin v. Löwiseba40652007-08-30 20:10:57 +00003250# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003251if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003252 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003253
3254 case $withval in
3255 no) with_cxx_main=no
3256 MAINCC='$(CC)';;
3257 yes) with_cxx_main=yes
3258 MAINCC='$(CXX)';;
3259 *) with_cxx_main=yes
3260 MAINCC=$withval
3261 if test -z "$CXX"
3262 then
3263 CXX=$withval
3264 fi;;
3265 esac
3266else
3267
3268 with_cxx_main=no
3269 MAINCC='$(CC)'
3270
Martin v. Löwiseba40652007-08-30 20:10:57 +00003271fi
3272
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003273{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3274echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003275
3276preset_cxx="$CXX"
3277if test -z "$CXX"
3278then
3279 case "$CC" in
3280 gcc) # Extract the first word of "g++", so it can be a program name with args.
3281set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003282{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3283echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003284if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003285 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003286else
3287 case $CXX in
3288 [\\/]* | ?:[\\/]*)
3289 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3290 ;;
3291 *)
3292 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3293for as_dir in notfound
3294do
3295 IFS=$as_save_IFS
3296 test -z "$as_dir" && as_dir=.
3297 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003298 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 +00003299 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003300 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003301 break 2
3302 fi
3303done
3304done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003305IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003306
3307 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3308 ;;
3309esac
3310fi
3311CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003312if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003313 { echo "$as_me:$LINENO: result: $CXX" >&5
3314echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003315else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003316 { echo "$as_me:$LINENO: result: no" >&5
3317echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003319
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003320 ;;
3321 cc) # Extract the first word of "c++", so it can be a program name with args.
3322set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003323{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3324echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003325if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003326 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003327else
3328 case $CXX in
3329 [\\/]* | ?:[\\/]*)
3330 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3331 ;;
3332 *)
3333 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3334for as_dir in notfound
3335do
3336 IFS=$as_save_IFS
3337 test -z "$as_dir" && as_dir=.
3338 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003339 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 +00003340 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003341 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003342 break 2
3343 fi
3344done
3345done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003346IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003347
3348 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3349 ;;
3350esac
3351fi
3352CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003353if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003354 { echo "$as_me:$LINENO: result: $CXX" >&5
3355echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003356else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003357 { echo "$as_me:$LINENO: result: no" >&5
3358echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003359fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003360
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003361 ;;
3362 esac
3363 if test "$CXX" = "notfound"
3364 then
3365 CXX=""
3366 fi
3367fi
3368if test -z "$CXX"
3369then
3370 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3371do
3372 # Extract the first word of "$ac_prog", so it can be a program name with args.
3373set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003374{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3375echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003376if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003377 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003378else
3379 if test -n "$CXX"; then
3380 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3381else
3382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3383for as_dir in $PATH
3384do
3385 IFS=$as_save_IFS
3386 test -z "$as_dir" && as_dir=.
3387 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003388 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 +00003389 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003390 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003391 break 2
3392 fi
3393done
3394done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003395IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003396
3397fi
3398fi
3399CXX=$ac_cv_prog_CXX
3400if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003401 { echo "$as_me:$LINENO: result: $CXX" >&5
3402echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003403else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003404 { echo "$as_me:$LINENO: result: no" >&5
3405echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003406fi
3407
Martin v. Löwiseba40652007-08-30 20:10:57 +00003408
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003409 test -n "$CXX" && break
3410done
3411test -n "$CXX" || CXX="notfound"
3412
3413 if test "$CXX" = "notfound"
3414 then
3415 CXX=""
3416 fi
3417fi
3418if test "$preset_cxx" != "$CXX"
3419then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003420 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003421
3422 By default, distutils will build C++ extension modules with \"$CXX\".
3423 If this is not intended, then set CXX on the configure command line.
3424 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003425echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003426
3427 By default, distutils will build C++ extension modules with \"$CXX\".
3428 If this is not intended, then set CXX on the configure command line.
3429 " >&2;}
3430fi
3431
3432
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003433# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003434
3435ac_ext=c
3436ac_cpp='$CPP $CPPFLAGS'
3437ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3438ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3439ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003440{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3441echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003442# On Suns, sometimes $CPP names a directory.
3443if test -n "$CPP" && test -d "$CPP"; then
3444 CPP=
3445fi
3446if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003447 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003448 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003449else
Martin v. Löwis11437992002-04-12 09:54:03 +00003450 # Double quotes because CPP needs to be expanded
3451 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3452 do
3453 ac_preproc_ok=false
3454for ac_c_preproc_warn_flag in '' yes
3455do
3456 # Use a header file that comes with gcc, so configuring glibc
3457 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003458 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3459 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003460 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003461 # not just through cpp. "Syntax error" is here to catch this case.
3462 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003463/* confdefs.h. */
3464_ACEOF
3465cat confdefs.h >>conftest.$ac_ext
3466cat >>conftest.$ac_ext <<_ACEOF
3467/* end confdefs.h. */
3468#ifdef __STDC__
3469# include <limits.h>
3470#else
3471# include <assert.h>
3472#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003473 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003474_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003475if { (ac_try="$ac_cpp conftest.$ac_ext"
3476case "(($ac_try" in
3477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3478 *) ac_try_echo=$ac_try;;
3479esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003481 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003482 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003483 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003484 rm -f conftest.er1
3485 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003487 (exit $ac_status); } >/dev/null && {
3488 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3489 test ! -s conftest.err
3490 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003491 :
3492else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003494sed 's/^/| /' conftest.$ac_ext >&5
3495
Martin v. Löwis11437992002-04-12 09:54:03 +00003496 # Broken: fails on valid input.
3497continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003499
Martin v. Löwis11437992002-04-12 09:54:03 +00003500rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003501
Martin v. Löwiseba40652007-08-30 20:10:57 +00003502 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003503 # can be detected and how.
3504 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003505/* confdefs.h. */
3506_ACEOF
3507cat confdefs.h >>conftest.$ac_ext
3508cat >>conftest.$ac_ext <<_ACEOF
3509/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003510#include <ac_nonexistent.h>
3511_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003512if { (ac_try="$ac_cpp conftest.$ac_ext"
3513case "(($ac_try" in
3514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3515 *) ac_try_echo=$ac_try;;
3516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003518 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003519 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003520 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003521 rm -f conftest.er1
3522 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003524 (exit $ac_status); } >/dev/null && {
3525 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3526 test ! -s conftest.err
3527 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003528 # Broken: success on invalid input.
3529continue
3530else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003532sed 's/^/| /' conftest.$ac_ext >&5
3533
Martin v. Löwis11437992002-04-12 09:54:03 +00003534 # Passes both tests.
3535ac_preproc_ok=:
3536break
3537fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003538
Martin v. Löwis11437992002-04-12 09:54:03 +00003539rm -f conftest.err conftest.$ac_ext
3540
3541done
3542# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3543rm -f conftest.err conftest.$ac_ext
3544if $ac_preproc_ok; then
3545 break
3546fi
3547
3548 done
3549 ac_cv_prog_CPP=$CPP
3550
3551fi
3552 CPP=$ac_cv_prog_CPP
3553else
3554 ac_cv_prog_CPP=$CPP
3555fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003556{ echo "$as_me:$LINENO: result: $CPP" >&5
3557echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003558ac_preproc_ok=false
3559for ac_c_preproc_warn_flag in '' yes
3560do
3561 # Use a header file that comes with gcc, so configuring glibc
3562 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003563 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3564 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003565 # On the NeXT, cc -E runs the code through the compiler's parser,
3566 # not just through cpp. "Syntax error" is here to catch this case.
3567 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003568/* confdefs.h. */
3569_ACEOF
3570cat confdefs.h >>conftest.$ac_ext
3571cat >>conftest.$ac_ext <<_ACEOF
3572/* end confdefs.h. */
3573#ifdef __STDC__
3574# include <limits.h>
3575#else
3576# include <assert.h>
3577#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003578 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003579_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003580if { (ac_try="$ac_cpp conftest.$ac_ext"
3581case "(($ac_try" in
3582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3583 *) ac_try_echo=$ac_try;;
3584esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003586 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003587 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003588 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003589 rm -f conftest.er1
3590 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003592 (exit $ac_status); } >/dev/null && {
3593 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3594 test ! -s conftest.err
3595 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003596 :
3597else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003599sed 's/^/| /' conftest.$ac_ext >&5
3600
Martin v. Löwis11437992002-04-12 09:54:03 +00003601 # Broken: fails on valid input.
3602continue
3603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003604
Martin v. Löwis11437992002-04-12 09:54:03 +00003605rm -f conftest.err conftest.$ac_ext
3606
Martin v. Löwiseba40652007-08-30 20:10:57 +00003607 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003608 # can be detected and how.
3609 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003610/* confdefs.h. */
3611_ACEOF
3612cat confdefs.h >>conftest.$ac_ext
3613cat >>conftest.$ac_ext <<_ACEOF
3614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003615#include <ac_nonexistent.h>
3616_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003617if { (ac_try="$ac_cpp conftest.$ac_ext"
3618case "(($ac_try" in
3619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3620 *) ac_try_echo=$ac_try;;
3621esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003623 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003624 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003625 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003626 rm -f conftest.er1
3627 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003629 (exit $ac_status); } >/dev/null && {
3630 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3631 test ! -s conftest.err
3632 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003633 # Broken: success on invalid input.
3634continue
3635else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003637sed 's/^/| /' conftest.$ac_ext >&5
3638
Martin v. Löwis11437992002-04-12 09:54:03 +00003639 # Passes both tests.
3640ac_preproc_ok=:
3641break
3642fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003643
Martin v. Löwis11437992002-04-12 09:54:03 +00003644rm -f conftest.err conftest.$ac_ext
3645
3646done
3647# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3648rm -f conftest.err conftest.$ac_ext
3649if $ac_preproc_ok; then
3650 :
3651else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003652 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003653See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003654echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003655See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003656 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003657fi
3658
3659ac_ext=c
3660ac_cpp='$CPP $CPPFLAGS'
3661ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3662ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3663ac_compiler_gnu=$ac_cv_c_compiler_gnu
3664
3665
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003666{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3667echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003668if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003669 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003670else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003671 # Extract the first word of "grep ggrep" to use in msg output
3672if test -z "$GREP"; then
3673set dummy grep ggrep; ac_prog_name=$2
3674if test "${ac_cv_path_GREP+set}" = set; then
3675 echo $ECHO_N "(cached) $ECHO_C" >&6
3676else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003677 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003678# Loop through the user's path and test for each of PROGNAME-LIST
3679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003680for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3681do
3682 IFS=$as_save_IFS
3683 test -z "$as_dir" && as_dir=.
3684 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003685 for ac_exec_ext in '' $ac_executable_extensions; do
3686 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3687 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3688 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003689 # Check for GNU $ac_path_GREP
3690case `"$ac_path_GREP" --version 2>&1` in
3691*GNU*)
3692 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3693*)
3694 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003695 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003696 while :
3697 do
3698 cat "conftest.in" "conftest.in" >"conftest.tmp"
3699 mv "conftest.tmp" "conftest.in"
3700 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003701 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003702 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3703 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3704 ac_count=`expr $ac_count + 1`
3705 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3706 # Best one so far, save it but keep looking for a better one
3707 ac_cv_path_GREP="$ac_path_GREP"
3708 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003709 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003710 # 10*(2^10) chars as input seems more than enough
3711 test $ac_count -gt 10 && break
3712 done
3713 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3714esac
3715
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003716
3717 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003718 done
3719done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003720
3721done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003722IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003723
3724
3725fi
3726
3727GREP="$ac_cv_path_GREP"
3728if test -z "$GREP"; then
3729 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3730echo "$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 +00003731 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003732fi
3733
Martin v. Löwiseba40652007-08-30 20:10:57 +00003734else
3735 ac_cv_path_GREP=$GREP
3736fi
3737
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003738
Martin v. Löwiseba40652007-08-30 20:10:57 +00003739fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003740{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3741echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003742 GREP="$ac_cv_path_GREP"
3743
3744
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003745{ echo "$as_me:$LINENO: checking for egrep" >&5
3746echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003747if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003748 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003749else
3750 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3751 then ac_cv_path_EGREP="$GREP -E"
3752 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003753 # Extract the first word of "egrep" to use in msg output
3754if test -z "$EGREP"; then
3755set dummy egrep; ac_prog_name=$2
3756if test "${ac_cv_path_EGREP+set}" = set; then
3757 echo $ECHO_N "(cached) $ECHO_C" >&6
3758else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003759 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003760# Loop through the user's path and test for each of PROGNAME-LIST
3761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003762for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3763do
3764 IFS=$as_save_IFS
3765 test -z "$as_dir" && as_dir=.
3766 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003767 for ac_exec_ext in '' $ac_executable_extensions; do
3768 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3769 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3770 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003771 # Check for GNU $ac_path_EGREP
3772case `"$ac_path_EGREP" --version 2>&1` in
3773*GNU*)
3774 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3775*)
3776 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003777 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003778 while :
3779 do
3780 cat "conftest.in" "conftest.in" >"conftest.tmp"
3781 mv "conftest.tmp" "conftest.in"
3782 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003783 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003784 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3785 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3786 ac_count=`expr $ac_count + 1`
3787 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3788 # Best one so far, save it but keep looking for a better one
3789 ac_cv_path_EGREP="$ac_path_EGREP"
3790 ac_path_EGREP_max=$ac_count
3791 fi
3792 # 10*(2^10) chars as input seems more than enough
3793 test $ac_count -gt 10 && break
3794 done
3795 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3796esac
3797
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003798
3799 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003800 done
3801done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003802
3803done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003804IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003805
3806
3807fi
3808
3809EGREP="$ac_cv_path_EGREP"
3810if test -z "$EGREP"; then
3811 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3812echo "$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 +00003813 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003814fi
3815
Martin v. Löwiseba40652007-08-30 20:10:57 +00003816else
3817 ac_cv_path_EGREP=$EGREP
3818fi
3819
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003820
Martin v. Löwiseba40652007-08-30 20:10:57 +00003821 fi
3822fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003823{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3824echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003825 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003826
3827
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003828
3829{ echo "$as_me:$LINENO: checking for AIX" >&5
3830echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3831cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003832/* confdefs.h. */
3833_ACEOF
3834cat confdefs.h >>conftest.$ac_ext
3835cat >>conftest.$ac_ext <<_ACEOF
3836/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003837#ifdef _AIX
3838 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003839#endif
3840
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003841_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003842if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3843 $EGREP "yes" >/dev/null 2>&1; then
3844 { echo "$as_me:$LINENO: result: yes" >&5
3845echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003846cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003847#define _ALL_SOURCE 1
3848_ACEOF
3849
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003850else
3851 { echo "$as_me:$LINENO: result: no" >&5
3852echo "${ECHO_T}no" >&6; }
3853fi
Ronald Oussoren25967582009-09-06 10:00:26 +00003854rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003855
3856
3857
3858# Check for unsupported systems
3859case $ac_sys_system/$ac_sys_release in
3860atheos*|Linux*/1*)
3861 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3862 echo See README for details.
3863 exit 1;;
3864esac
3865
3866
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003867{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3868echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003869
3870# Check whether --with-suffix was given.
3871if test "${with_suffix+set}" = set; then
3872 withval=$with_suffix;
3873 case $withval in
3874 no) EXEEXT=;;
3875 yes) EXEEXT=.exe;;
3876 *) EXEEXT=$withval;;
3877 esac
3878fi
3879
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003880{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3881echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003882
3883# Test whether we're running on a non-case-sensitive system, in which
3884# case we give a warning if no ext is given
3885
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003886{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3887echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003888if test ! -d CaseSensitiveTestDir; then
3889mkdir CaseSensitiveTestDir
3890fi
3891
3892if test -d casesensitivetestdir
3893then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003894 { echo "$as_me:$LINENO: result: yes" >&5
3895echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003896 BUILDEXEEXT=.exe
3897else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003898 { echo "$as_me:$LINENO: result: no" >&5
3899echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003900 BUILDEXEEXT=$EXEEXT
3901fi
3902rmdir CaseSensitiveTestDir
3903
3904case $MACHDEP in
3905bsdos*)
3906 case $CC in
3907 gcc) CC="$CC -D_HAVE_BSDI";;
3908 esac;;
3909esac
3910
3911case $ac_sys_system in
3912hp*|HP*)
3913 case $CC in
3914 cc|*/cc) CC="$CC -Ae";;
3915 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003916SunOS*)
3917 # Some functions have a prototype only with that define, e.g. confstr
3918
3919cat >>confdefs.h <<\_ACEOF
3920#define __EXTENSIONS__ 1
3921_ACEOF
3922
3923 ;;
3924esac
3925
3926
3927
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003928{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3929echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003930if test -z "$LIBRARY"
3931then
3932 LIBRARY='libpython$(VERSION).a'
3933fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003934{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3935echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003936
3937# LDLIBRARY is the name of the library to link against (as opposed to the
3938# name of the library into which to insert object files). BLDLIBRARY is also
3939# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3940# is blank as the main program is not linked directly against LDLIBRARY.
3941# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3942# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3943# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3944# DLLLIBRARY is the shared (i.e., DLL) library.
3945#
3946# RUNSHARED is used to run shared python without installed libraries
3947#
3948# INSTSONAME is the name of the shared library that will be use to install
3949# on the system - some systems like version suffix, others don't
3950
3951
3952
3953
3954
3955
3956LDLIBRARY="$LIBRARY"
3957BLDLIBRARY='$(LDLIBRARY)'
3958INSTSONAME='$(LDLIBRARY)'
3959DLLLIBRARY=''
3960LDLIBRARYDIR=''
3961RUNSHARED=''
3962
3963# LINKCC is the command that links the python executable -- default is $(CC).
3964# If CXX is set, and if it is needed to link a main function that was
3965# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3966# python might then depend on the C++ runtime
3967# This is altered for AIX in order to build the export list before
3968# linking.
3969
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003970{ echo "$as_me:$LINENO: checking LINKCC" >&5
3971echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003972if test -z "$LINKCC"
3973then
3974 LINKCC='$(PURIFY) $(MAINCC)'
3975 case $ac_sys_system in
3976 AIX*)
3977 exp_extra="\"\""
3978 if test $ac_sys_release -ge 5 -o \
3979 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3980 exp_extra="."
3981 fi
3982 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003983 QNX*)
3984 # qcc must be used because the other compilers do not
3985 # support -N.
3986 LINKCC=qcc;;
3987 esac
3988fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003989{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3990echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003991
3992# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3993# make sure we default having it set to "no": this is used by
3994# distutils.unixccompiler to know if it should add --enable-new-dtags
3995# to linker command lines, and failing to detect GNU ld simply results
3996# in the same bahaviour as before.
3997
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003998{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3999echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004000ac_prog=ld
4001if test "$GCC" = yes; then
4002 ac_prog=`$CC -print-prog-name=ld`
4003fi
4004case `"$ac_prog" -V 2>&1 < /dev/null` in
4005 *GNU*)
4006 GNULD=yes;;
4007 *)
4008 GNULD=no;;
4009esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004010{ echo "$as_me:$LINENO: result: $GNULD" >&5
4011echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004012
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004013{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4014echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004015# Check whether --enable-shared was given.
4016if test "${enable_shared+set}" = set; then
4017 enableval=$enable_shared;
4018fi
4019
4020
4021if test -z "$enable_shared"
4022then
4023 case $ac_sys_system in
4024 CYGWIN* | atheos*)
4025 enable_shared="yes";;
4026 *)
4027 enable_shared="no";;
4028 esac
4029fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004030{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4031echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004032
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004033{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4034echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004035# Check whether --enable-profiling was given.
4036if test "${enable_profiling+set}" = set; then
4037 enableval=$enable_profiling; ac_save_cc="$CC"
4038 CC="$CC -pg"
4039 if test "$cross_compiling" = yes; then
4040 ac_enable_profiling="no"
4041else
4042 cat >conftest.$ac_ext <<_ACEOF
4043/* confdefs.h. */
4044_ACEOF
4045cat confdefs.h >>conftest.$ac_ext
4046cat >>conftest.$ac_ext <<_ACEOF
4047/* end confdefs.h. */
4048int main() { return 0; }
4049_ACEOF
4050rm -f conftest$ac_exeext
4051if { (ac_try="$ac_link"
4052case "(($ac_try" in
4053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4054 *) ac_try_echo=$ac_try;;
4055esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004057 (eval "$ac_link") 2>&5
4058 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004060 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4061 { (case "(($ac_try" in
4062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4063 *) ac_try_echo=$ac_try;;
4064esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004066 (eval "$ac_try") 2>&5
4067 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004069 (exit $ac_status); }; }; then
4070 ac_enable_profiling="yes"
4071else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004072 echo "$as_me: program exited with status $ac_status" >&5
4073echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004074sed 's/^/| /' conftest.$ac_ext >&5
4075
4076( exit $ac_status )
4077ac_enable_profiling="no"
4078fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4080fi
4081
4082
4083 CC="$ac_save_cc"
4084fi
4085
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004086{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4087echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004088
4089case "$ac_enable_profiling" in
4090 "yes")
4091 BASECFLAGS="-pg $BASECFLAGS"
4092 LDFLAGS="-pg $LDFLAGS"
4093 ;;
4094esac
4095
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004096{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4097echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004098
4099# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4100# library that we build, but we do not want to link against it (we
4101# will find it with a -framework option). For this reason there is an
4102# extra variable BLDLIBRARY against which Python and the extension
4103# modules are linked, BLDLIBRARY. This is normally the same as
4104# LDLIBRARY, but empty for MacOSX framework builds.
4105if test "$enable_framework"
4106then
4107 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4108 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4109 BLDLIBRARY=''
4110else
4111 BLDLIBRARY='$(LDLIBRARY)'
4112fi
4113
4114# Other platforms follow
4115if test $enable_shared = "yes"; then
4116
4117cat >>confdefs.h <<\_ACEOF
4118#define Py_ENABLE_SHARED 1
4119_ACEOF
4120
4121 case $ac_sys_system in
4122 BeOS*)
4123 LDLIBRARY='libpython$(VERSION).so'
4124 ;;
4125 CYGWIN*)
4126 LDLIBRARY='libpython$(VERSION).dll.a'
4127 DLLLIBRARY='libpython$(VERSION).dll'
4128 ;;
4129 SunOS*)
4130 LDLIBRARY='libpython$(VERSION).so'
4131 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4132 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4133 INSTSONAME="$LDLIBRARY".$SOVERSION
4134 ;;
4135 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4136 LDLIBRARY='libpython$(VERSION).so'
4137 BLDLIBRARY='-L. -lpython$(VERSION)'
4138 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4139 case $ac_sys_system in
4140 FreeBSD*)
4141 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4142 ;;
4143 esac
4144 INSTSONAME="$LDLIBRARY".$SOVERSION
4145 ;;
4146 hp*|HP*)
4147 case `uname -m` in
4148 ia64)
4149 LDLIBRARY='libpython$(VERSION).so'
4150 ;;
4151 *)
4152 LDLIBRARY='libpython$(VERSION).sl'
4153 ;;
4154 esac
4155 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4156 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4157 ;;
4158 OSF*)
4159 LDLIBRARY='libpython$(VERSION).so'
4160 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4161 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4162 ;;
4163 atheos*)
4164 LDLIBRARY='libpython$(VERSION).so'
4165 BLDLIBRARY='-L. -lpython$(VERSION)'
4166 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4167 ;;
4168 Darwin*)
4169 LDLIBRARY='libpython$(VERSION).dylib'
4170 BLDLIBRARY='-L. -lpython$(VERSION)'
4171 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4172 ;;
4173
4174 esac
4175else # shared is disabled
4176 case $ac_sys_system in
4177 CYGWIN*)
4178 BLDLIBRARY='$(LIBRARY)'
4179 LDLIBRARY='libpython$(VERSION).dll.a'
4180 ;;
4181 esac
4182fi
4183
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004184{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4185echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004186
4187if test -n "$ac_tool_prefix"; then
4188 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4189set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004190{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4191echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004192if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004193 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004194else
4195 if test -n "$RANLIB"; then
4196 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4197else
4198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4199for as_dir in $PATH
4200do
4201 IFS=$as_save_IFS
4202 test -z "$as_dir" && as_dir=.
4203 for ac_exec_ext in '' $ac_executable_extensions; do
4204 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4205 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004206 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004207 break 2
4208 fi
4209done
4210done
4211IFS=$as_save_IFS
4212
4213fi
4214fi
4215RANLIB=$ac_cv_prog_RANLIB
4216if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004217 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4218echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004219else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004220 { echo "$as_me:$LINENO: result: no" >&5
4221echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004222fi
4223
4224
4225fi
4226if test -z "$ac_cv_prog_RANLIB"; then
4227 ac_ct_RANLIB=$RANLIB
4228 # Extract the first word of "ranlib", so it can be a program name with args.
4229set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004230{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4231echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004232if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004233 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004234else
4235 if test -n "$ac_ct_RANLIB"; then
4236 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4237else
4238as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4239for as_dir in $PATH
4240do
4241 IFS=$as_save_IFS
4242 test -z "$as_dir" && as_dir=.
4243 for ac_exec_ext in '' $ac_executable_extensions; do
4244 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4245 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004246 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004247 break 2
4248 fi
4249done
4250done
4251IFS=$as_save_IFS
4252
4253fi
4254fi
4255ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4256if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004257 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4258echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004259else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004260 { echo "$as_me:$LINENO: result: no" >&5
4261echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004262fi
4263
4264 if test "x$ac_ct_RANLIB" = x; then
4265 RANLIB=":"
4266 else
4267 case $cross_compiling:$ac_tool_warned in
4268yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004269{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4270whose name does not start with the host triplet. If you think this
4271configuration is useful to you, please write to autoconf@gnu.org." >&5
4272echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4273whose name does not start with the host triplet. If you think this
4274configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004275ac_tool_warned=yes ;;
4276esac
4277 RANLIB=$ac_ct_RANLIB
4278 fi
4279else
4280 RANLIB="$ac_cv_prog_RANLIB"
4281fi
4282
4283
4284for ac_prog in ar aal
4285do
4286 # Extract the first word of "$ac_prog", so it can be a program name with args.
4287set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004288{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4289echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004290if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004291 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004292else
4293 if test -n "$AR"; then
4294 ac_cv_prog_AR="$AR" # Let the user override the test.
4295else
4296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4297for as_dir in $PATH
4298do
4299 IFS=$as_save_IFS
4300 test -z "$as_dir" && as_dir=.
4301 for ac_exec_ext in '' $ac_executable_extensions; do
4302 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4303 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004304 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004305 break 2
4306 fi
4307done
4308done
4309IFS=$as_save_IFS
4310
4311fi
4312fi
4313AR=$ac_cv_prog_AR
4314if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004315 { echo "$as_me:$LINENO: result: $AR" >&5
4316echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004317else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004318 { echo "$as_me:$LINENO: result: no" >&5
4319echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004320fi
4321
4322
4323 test -n "$AR" && break
4324done
4325test -n "$AR" || AR="ar"
4326
4327
4328# tweak ARFLAGS only if the user didn't set it on the command line
4329
4330if test -z "$ARFLAGS"
4331then
4332 ARFLAGS="rc"
4333fi
4334
4335
4336# Extract the first word of "svnversion", so it can be a program name with args.
4337set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004338{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4339echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004340if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004341 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004342else
4343 if test -n "$SVNVERSION"; then
4344 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4345else
4346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4347for as_dir in $PATH
4348do
4349 IFS=$as_save_IFS
4350 test -z "$as_dir" && as_dir=.
4351 for ac_exec_ext in '' $ac_executable_extensions; do
4352 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4353 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004354 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004355 break 2
4356 fi
4357done
4358done
4359IFS=$as_save_IFS
4360
4361 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4362fi
4363fi
4364SVNVERSION=$ac_cv_prog_SVNVERSION
4365if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004366 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4367echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004368else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004369 { echo "$as_me:$LINENO: result: no" >&5
4370echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004371fi
4372
4373
4374if test $SVNVERSION = found
4375then
4376 SVNVERSION="svnversion \$(srcdir)"
4377else
4378 SVNVERSION="echo Unversioned directory"
4379fi
4380
4381case $MACHDEP in
4382bsdos*|hp*|HP*)
4383 # install -d does not work on BSDI or HP-UX
4384 if test -z "$INSTALL"
4385 then
4386 INSTALL="${srcdir}/install-sh -c"
4387 fi
4388esac
4389ac_aux_dir=
4390for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4391 if test -f "$ac_dir/install-sh"; then
4392 ac_aux_dir=$ac_dir
4393 ac_install_sh="$ac_aux_dir/install-sh -c"
4394 break
4395 elif test -f "$ac_dir/install.sh"; then
4396 ac_aux_dir=$ac_dir
4397 ac_install_sh="$ac_aux_dir/install.sh -c"
4398 break
4399 elif test -f "$ac_dir/shtool"; then
4400 ac_aux_dir=$ac_dir
4401 ac_install_sh="$ac_aux_dir/shtool install -c"
4402 break
4403 fi
4404done
4405if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004406 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4407echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004408 { (exit 1); exit 1; }; }
4409fi
4410
4411# These three variables are undocumented and unsupported,
4412# and are intended to be withdrawn in a future Autoconf release.
4413# They can cause serious problems if a builder's source tree is in a directory
4414# whose full name contains unusual characters.
4415ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4416ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4417ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4418
4419
4420# Find a good install program. We prefer a C program (faster),
4421# so one script is as good as another. But avoid the broken or
4422# incompatible versions:
4423# SysV /etc/install, /usr/sbin/install
4424# SunOS /usr/etc/install
4425# IRIX /sbin/install
4426# AIX /bin/install
4427# AmigaOS /C/install, which installs bootblocks on floppy discs
4428# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4429# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4430# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4431# OS/2's system install, which has a completely different semantic
4432# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004433{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4434echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004435if test -z "$INSTALL"; then
4436if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004437 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004438else
4439 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4440for as_dir in $PATH
4441do
4442 IFS=$as_save_IFS
4443 test -z "$as_dir" && as_dir=.
4444 # Account for people who put trailing slashes in PATH elements.
4445case $as_dir/ in
4446 ./ | .// | /cC/* | \
4447 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4448 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4449 /usr/ucb/* ) ;;
4450 *)
4451 # OSF1 and SCO ODT 3.0 have their own names for install.
4452 # Don't use installbsd from OSF since it installs stuff as root
4453 # by default.
4454 for ac_prog in ginstall scoinst install; do
4455 for ac_exec_ext in '' $ac_executable_extensions; do
4456 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4457 if test $ac_prog = install &&
4458 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4459 # AIX install. It has an incompatible calling convention.
4460 :
4461 elif test $ac_prog = install &&
4462 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4463 # program-specific install script used by HP pwplus--don't use.
4464 :
4465 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004466 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4467 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004468 fi
4469 fi
4470 done
4471 done
4472 ;;
4473esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004474done
4475IFS=$as_save_IFS
4476
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004477
4478fi
4479 if test "${ac_cv_path_install+set}" = set; then
4480 INSTALL=$ac_cv_path_install
4481 else
4482 # As a last resort, use the slow shell script. Don't cache a
4483 # value for INSTALL within a source directory, because that will
4484 # break other packages using the cache if that directory is
4485 # removed, or if the value is a relative name.
4486 INSTALL=$ac_install_sh
4487 fi
4488fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004489{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4490echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004491
4492# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4493# It thinks the first close brace ends the variable substitution.
4494test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4495
4496test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4497
4498test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4499
4500
4501# Not every filesystem supports hard links
4502
4503if test -z "$LN" ; then
4504 case $ac_sys_system in
4505 BeOS*) LN="ln -s";;
4506 CYGWIN*) LN="ln -s";;
4507 atheos*) LN="ln -s";;
4508 *) LN=ln;;
4509 esac
4510fi
4511
4512# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004513{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4514echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004515
4516# Check whether --with-pydebug was given.
4517if test "${with_pydebug+set}" = set; then
4518 withval=$with_pydebug;
4519if test "$withval" != no
4520then
4521
4522cat >>confdefs.h <<\_ACEOF
4523#define Py_DEBUG 1
4524_ACEOF
4525
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004526 { echo "$as_me:$LINENO: result: yes" >&5
4527echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004528 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004529else { echo "$as_me:$LINENO: result: no" >&5
4530echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004531fi
4532else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004533 { echo "$as_me:$LINENO: result: no" >&5
4534echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004535fi
4536
4537
4538# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4539# merged with this chunk of code?
4540
4541# Optimizer/debugger flags
4542# ------------------------
4543# (The following bit of code is complicated enough - please keep things
4544# indented properly. Just pretend you're editing Python code. ;-)
4545
4546# There are two parallel sets of case statements below, one that checks to
4547# see if OPT was set and one that does BASECFLAGS setting based upon
4548# compiler and platform. BASECFLAGS tweaks need to be made even if the
4549# user set OPT.
4550
4551# tweak OPT based on compiler and platform, only if the user didn't set
4552# it on the command line
4553
4554if test -z "$OPT"
4555then
4556 case $GCC in
4557 yes)
4558 if test "$CC" != 'g++' ; then
4559 STRICT_PROTO="-Wstrict-prototypes"
4560 fi
4561 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4562 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4563 WRAP="-fwrapv"
4564 fi
4565 case $ac_cv_prog_cc_g in
4566 yes)
4567 if test "$Py_DEBUG" = 'true' ; then
4568 # Optimization messes up debuggers, so turn it off for
4569 # debug builds.
4570 OPT="-g -Wall $STRICT_PROTO"
4571 else
4572 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4573 fi
4574 ;;
4575 *)
4576 OPT="-O3 -Wall $STRICT_PROTO"
4577 ;;
4578 esac
4579 case $ac_sys_system in
4580 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4581 ;;
4582 esac
4583 ;;
4584
4585 *)
4586 OPT="-O"
4587 ;;
4588 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004589fi
4590
4591
4592
4593# The -arch flags for universal builds on OSX
4594UNIVERSAL_ARCH_FLAGS=
4595
4596
4597# tweak BASECFLAGS based on compiler and platform
4598case $GCC in
4599yes)
4600 # Python violates C99 rules, by casting between incompatible
4601 # pointer types. GCC may generate bad code as a result of that,
4602 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004603 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4604echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004605 ac_save_cc="$CC"
4606 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004607 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4608 echo $ECHO_N "(cached) $ECHO_C" >&6
4609else
4610 if test "$cross_compiling" = yes; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004611 ac_cv_no_strict_aliasing_ok=no
4612else
4613 cat >conftest.$ac_ext <<_ACEOF
4614/* confdefs.h. */
4615_ACEOF
4616cat confdefs.h >>conftest.$ac_ext
4617cat >>conftest.$ac_ext <<_ACEOF
4618/* end confdefs.h. */
4619int main() { return 0; }
4620_ACEOF
4621rm -f conftest$ac_exeext
4622if { (ac_try="$ac_link"
4623case "(($ac_try" in
4624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4625 *) ac_try_echo=$ac_try;;
4626esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004628 (eval "$ac_link") 2>&5
4629 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004631 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4632 { (case "(($ac_try" in
4633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4634 *) ac_try_echo=$ac_try;;
4635esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004637 (eval "$ac_try") 2>&5
4638 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004640 (exit $ac_status); }; }; then
4641 ac_cv_no_strict_aliasing_ok=yes
4642else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004643 echo "$as_me: program exited with status $ac_status" >&5
4644echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004645sed 's/^/| /' conftest.$ac_ext >&5
4646
4647( exit $ac_status )
4648ac_cv_no_strict_aliasing_ok=no
4649fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4651fi
4652
4653
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004654fi
4655
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004656 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004657 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4658echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004659 if test $ac_cv_no_strict_aliasing_ok = yes
4660 then
4661 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4662 fi
4663
4664 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4665 # support. Without this, treatment of subnormals doesn't follow
4666 # the standard.
4667 case $ac_sys_machine in
4668 alpha*)
4669 BASECFLAGS="$BASECFLAGS -mieee"
4670 ;;
4671 esac
4672
4673 case $ac_sys_system in
4674 SCO_SV*)
4675 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4676 ;;
4677 # is there any other compiler on Darwin besides gcc?
4678 Darwin*)
4679 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4680 # used to be here, but non-Apple gcc doesn't accept them.
4681
4682
4683 if test "${enable_universalsdk}"; then
4684 UNIVERSAL_ARCH_FLAGS=""
4685 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4686 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4687 ARCH_RUN_32BIT=""
4688
4689 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4690 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren25967582009-09-06 10:00:26 +00004691 ARCH_RUN_32BIT="true"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004692
4693 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4694 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4695 ARCH_RUN_32BIT="arch -i386 -ppc"
4696
Ronald Oussoren23d92532009-09-07 06:12:00 +00004697 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4698 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4699 ARCH_RUN_32BIT="arch -i386"
4700
4701 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4702 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4703 ARCH_RUN_32BIT="arch -i386 -ppc"
4704
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004705 else
Ronald Oussorena9cfbde2009-09-20 20:05:44 +00004706 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4707echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004708 { (exit 1); exit 1; }; }
4709
4710 fi
4711
4712
4713 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4714 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4715 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4716 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4717 fi
4718 fi
4719
4720 # Calculate the right deployment target for this build.
4721 #
4722 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4723 if test ${cur_target} '>' 10.2; then
4724 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004725 if test ${enable_universalsdk}; then
4726 if test "${UNIVERSAL_ARCHS}" = "all"; then
4727 # Ensure that the default platform for a
4728 # 4-way universal build is OSX 10.5,
4729 # that's the first OS release where
4730 # 4-way builds make sense.
4731 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00004732
4733 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4734 cur_target='10.5'
4735
4736 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4737 cur_target='10.5'
4738
4739 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4740 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00004741 fi
4742 else
4743 if test `arch` = "i386"; then
4744 # On Intel macs default to a deployment
4745 # target of 10.4, that's the first OSX
4746 # release with Intel support.
4747 cur_target="10.4"
4748 fi
4749 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004750 fi
4751 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4752
4753 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4754 # environment with a value that is the same as what we'll use
4755 # in the Makefile to ensure that we'll get the same compiler
4756 # environment during configure and build time.
4757 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4758 export MACOSX_DEPLOYMENT_TARGET
4759 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4760
4761 ;;
4762 OSF*)
4763 BASECFLAGS="$BASECFLAGS -mieee"
4764 ;;
4765 esac
4766 ;;
4767
4768*)
4769 case $ac_sys_system in
4770 OpenUNIX*|UnixWare*)
4771 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4772 ;;
4773 OSF*)
4774 BASECFLAGS="$BASECFLAGS -ieee -std"
4775 ;;
4776 SCO_SV*)
4777 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4778 ;;
4779 esac
4780 ;;
4781esac
4782
4783if test "$Py_DEBUG" = 'true'; then
4784 :
4785else
4786 OPT="-DNDEBUG $OPT"
4787fi
4788
4789if test "$ac_arch_flags"
4790then
4791 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4792fi
4793
4794# disable check for icc since it seems to pass, but generates a warning
4795if test "$CC" = icc
4796then
4797 ac_cv_opt_olimit_ok=no
4798fi
4799
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004800{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4801echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004802if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004803 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004804else
4805 ac_save_cc="$CC"
4806CC="$CC -OPT:Olimit=0"
4807if test "$cross_compiling" = yes; then
4808 ac_cv_opt_olimit_ok=no
4809else
4810 cat >conftest.$ac_ext <<_ACEOF
4811/* confdefs.h. */
4812_ACEOF
4813cat confdefs.h >>conftest.$ac_ext
4814cat >>conftest.$ac_ext <<_ACEOF
4815/* end confdefs.h. */
4816int main() { return 0; }
4817_ACEOF
4818rm -f conftest$ac_exeext
4819if { (ac_try="$ac_link"
4820case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
4829 { (case "(($ac_try" in
4830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4831 *) ac_try_echo=$ac_try;;
4832esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004834 (eval "$ac_try") 2>&5
4835 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004837 (exit $ac_status); }; }; then
4838 ac_cv_opt_olimit_ok=yes
4839else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004840 echo "$as_me: program exited with status $ac_status" >&5
4841echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004842sed 's/^/| /' conftest.$ac_ext >&5
4843
4844( exit $ac_status )
4845ac_cv_opt_olimit_ok=no
4846fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004847rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4848fi
4849
4850
4851CC="$ac_save_cc"
4852fi
4853
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004854{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4855echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004856if test $ac_cv_opt_olimit_ok = yes; then
4857 case $ac_sys_system in
4858 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4859 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4860 # environment?
4861 Darwin*)
4862 ;;
4863 *)
4864 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4865 ;;
4866 esac
4867else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004868 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4869echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004870 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004871 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004872else
4873 ac_save_cc="$CC"
4874 CC="$CC -Olimit 1500"
4875 if test "$cross_compiling" = yes; then
4876 ac_cv_olimit_ok=no
4877else
4878 cat >conftest.$ac_ext <<_ACEOF
4879/* confdefs.h. */
4880_ACEOF
4881cat confdefs.h >>conftest.$ac_ext
4882cat >>conftest.$ac_ext <<_ACEOF
4883/* end confdefs.h. */
4884int main() { return 0; }
4885_ACEOF
4886rm -f conftest$ac_exeext
4887if { (ac_try="$ac_link"
4888case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
4897 { (case "(($ac_try" in
4898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4899 *) ac_try_echo=$ac_try;;
4900esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004902 (eval "$ac_try") 2>&5
4903 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004905 (exit $ac_status); }; }; then
4906 ac_cv_olimit_ok=yes
4907else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004908 echo "$as_me: program exited with status $ac_status" >&5
4909echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004910sed 's/^/| /' conftest.$ac_ext >&5
4911
4912( exit $ac_status )
4913ac_cv_olimit_ok=no
4914fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004915rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4916fi
4917
4918
4919 CC="$ac_save_cc"
4920fi
4921
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004922 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4923echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004924 if test $ac_cv_olimit_ok = yes; then
4925 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4926 fi
4927fi
4928
4929# Check whether GCC supports PyArg_ParseTuple format
4930if test "$GCC" = "yes"
4931then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004932 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4933echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004934 save_CFLAGS=$CFLAGS
4935 CFLAGS="$CFLAGS -Werror"
4936 cat >conftest.$ac_ext <<_ACEOF
4937/* confdefs.h. */
4938_ACEOF
4939cat confdefs.h >>conftest.$ac_ext
4940cat >>conftest.$ac_ext <<_ACEOF
4941/* end confdefs.h. */
4942
4943 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4944
4945int
4946main ()
4947{
4948
4949 ;
4950 return 0;
4951}
4952_ACEOF
4953rm -f conftest.$ac_objext
4954if { (ac_try="$ac_compile"
4955case "(($ac_try" in
4956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4957 *) ac_try_echo=$ac_try;;
4958esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004960 (eval "$ac_compile") 2>conftest.er1
4961 ac_status=$?
4962 grep -v '^ *+' conftest.er1 >conftest.err
4963 rm -f conftest.er1
4964 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004966 (exit $ac_status); } && {
4967 test -z "$ac_c_werror_flag" ||
4968 test ! -s conftest.err
4969 } && test -s conftest.$ac_objext; then
4970
4971cat >>confdefs.h <<\_ACEOF
4972#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4973_ACEOF
4974
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004975 { echo "$as_me:$LINENO: result: yes" >&5
4976echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004977else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004978 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004979sed 's/^/| /' conftest.$ac_ext >&5
4980
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004981 { echo "$as_me:$LINENO: result: no" >&5
4982echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004983
4984fi
4985
4986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4987 CFLAGS=$save_CFLAGS
4988fi
4989
4990# On some compilers, pthreads are available without further options
4991# (e.g. MacOS X). On some of these systems, the compiler will not
4992# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4993# So we have to see first whether pthreads are available without
4994# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004995{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4996echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004997if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004998 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004999else
5000 if test "$cross_compiling" = yes; then
5001 ac_cv_pthread_is_default=no
5002else
5003 cat >conftest.$ac_ext <<_ACEOF
5004/* confdefs.h. */
5005_ACEOF
5006cat confdefs.h >>conftest.$ac_ext
5007cat >>conftest.$ac_ext <<_ACEOF
5008/* end confdefs.h. */
5009
5010#include <pthread.h>
5011
5012void* routine(void* p){return NULL;}
5013
5014int main(){
5015 pthread_t p;
5016 if(pthread_create(&p,NULL,routine,NULL)!=0)
5017 return 1;
5018 (void)pthread_detach(p);
5019 return 0;
5020}
5021
5022_ACEOF
5023rm -f conftest$ac_exeext
5024if { (ac_try="$ac_link"
5025case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
5034 { (case "(($ac_try" in
5035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5036 *) ac_try_echo=$ac_try;;
5037esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005039 (eval "$ac_try") 2>&5
5040 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005042 (exit $ac_status); }; }; then
5043
5044 ac_cv_pthread_is_default=yes
5045 ac_cv_kthread=no
5046 ac_cv_pthread=no
5047
5048else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005049 echo "$as_me: program exited with status $ac_status" >&5
5050echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005051sed 's/^/| /' conftest.$ac_ext >&5
5052
5053( exit $ac_status )
5054ac_cv_pthread_is_default=no
5055fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005056rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5057fi
5058
5059
5060
5061fi
5062
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005063{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5064echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005065
5066
5067if test $ac_cv_pthread_is_default = yes
5068then
5069 ac_cv_kpthread=no
5070else
5071# -Kpthread, if available, provides the right #defines
5072# and linker options to make pthread_create available
5073# Some compilers won't report that they do not support -Kpthread,
5074# so we need to run a program to see whether it really made the
5075# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005076{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5077echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005078if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005079 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005080else
5081 ac_save_cc="$CC"
5082CC="$CC -Kpthread"
5083if test "$cross_compiling" = yes; then
5084 ac_cv_kpthread=no
5085else
5086 cat >conftest.$ac_ext <<_ACEOF
5087/* confdefs.h. */
5088_ACEOF
5089cat confdefs.h >>conftest.$ac_ext
5090cat >>conftest.$ac_ext <<_ACEOF
5091/* end confdefs.h. */
5092
5093#include <pthread.h>
5094
5095void* routine(void* p){return NULL;}
5096
5097int main(){
5098 pthread_t p;
5099 if(pthread_create(&p,NULL,routine,NULL)!=0)
5100 return 1;
5101 (void)pthread_detach(p);
5102 return 0;
5103}
5104
5105_ACEOF
5106rm -f conftest$ac_exeext
5107if { (ac_try="$ac_link"
5108case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
5117 { (case "(($ac_try" in
5118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5119 *) ac_try_echo=$ac_try;;
5120esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005122 (eval "$ac_try") 2>&5
5123 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005125 (exit $ac_status); }; }; then
5126 ac_cv_kpthread=yes
5127else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005128 echo "$as_me: program exited with status $ac_status" >&5
5129echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005130sed 's/^/| /' conftest.$ac_ext >&5
5131
5132( exit $ac_status )
5133ac_cv_kpthread=no
5134fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005135rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5136fi
5137
5138
5139CC="$ac_save_cc"
5140fi
5141
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005142{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5143echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005144fi
5145
5146if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5147then
5148# -Kthread, if available, provides the right #defines
5149# and linker options to make pthread_create available
5150# Some compilers won't report that they do not support -Kthread,
5151# so we need to run a program to see whether it really made the
5152# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005153{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5154echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005155if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005156 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005157else
5158 ac_save_cc="$CC"
5159CC="$CC -Kthread"
5160if test "$cross_compiling" = yes; then
5161 ac_cv_kthread=no
5162else
5163 cat >conftest.$ac_ext <<_ACEOF
5164/* confdefs.h. */
5165_ACEOF
5166cat confdefs.h >>conftest.$ac_ext
5167cat >>conftest.$ac_ext <<_ACEOF
5168/* end confdefs.h. */
5169
5170#include <pthread.h>
5171
5172void* routine(void* p){return NULL;}
5173
5174int main(){
5175 pthread_t p;
5176 if(pthread_create(&p,NULL,routine,NULL)!=0)
5177 return 1;
5178 (void)pthread_detach(p);
5179 return 0;
5180}
5181
5182_ACEOF
5183rm -f conftest$ac_exeext
5184if { (ac_try="$ac_link"
5185case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
5194 { (case "(($ac_try" in
5195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5196 *) ac_try_echo=$ac_try;;
5197esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005199 (eval "$ac_try") 2>&5
5200 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005202 (exit $ac_status); }; }; then
5203 ac_cv_kthread=yes
5204else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005205 echo "$as_me: program exited with status $ac_status" >&5
5206echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005207sed 's/^/| /' conftest.$ac_ext >&5
5208
5209( exit $ac_status )
5210ac_cv_kthread=no
5211fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005212rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5213fi
5214
5215
5216CC="$ac_save_cc"
5217fi
5218
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005219{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5220echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005221fi
5222
5223if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5224then
5225# -pthread, if available, provides the right #defines
5226# and linker options to make pthread_create available
5227# Some compilers won't report that they do not support -pthread,
5228# so we need to run a program to see whether it really made the
5229# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005230{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5231echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005232if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005233 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005234else
5235 ac_save_cc="$CC"
5236CC="$CC -pthread"
5237if test "$cross_compiling" = yes; then
5238 ac_cv_pthread=no
5239else
5240 cat >conftest.$ac_ext <<_ACEOF
5241/* confdefs.h. */
5242_ACEOF
5243cat confdefs.h >>conftest.$ac_ext
5244cat >>conftest.$ac_ext <<_ACEOF
5245/* end confdefs.h. */
5246
5247#include <pthread.h>
5248
5249void* routine(void* p){return NULL;}
5250
5251int main(){
5252 pthread_t p;
5253 if(pthread_create(&p,NULL,routine,NULL)!=0)
5254 return 1;
5255 (void)pthread_detach(p);
5256 return 0;
5257}
5258
5259_ACEOF
5260rm -f conftest$ac_exeext
5261if { (ac_try="$ac_link"
5262case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
5271 { (case "(($ac_try" in
5272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5273 *) ac_try_echo=$ac_try;;
5274esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005276 (eval "$ac_try") 2>&5
5277 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005279 (exit $ac_status); }; }; then
5280 ac_cv_pthread=yes
5281else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005282 echo "$as_me: program exited with status $ac_status" >&5
5283echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005284sed 's/^/| /' conftest.$ac_ext >&5
5285
5286( exit $ac_status )
5287ac_cv_pthread=no
5288fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005289rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5290fi
5291
5292
5293CC="$ac_save_cc"
5294fi
5295
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005296{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5297echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005298fi
5299
5300# If we have set a CC compiler flag for thread support then
5301# check if it works for CXX, too.
5302ac_cv_cxx_thread=no
5303if test ! -z "$CXX"
5304then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005305{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5306echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005307ac_save_cxx="$CXX"
5308
5309if test "$ac_cv_kpthread" = "yes"
5310then
5311 CXX="$CXX -Kpthread"
5312 ac_cv_cxx_thread=yes
5313elif test "$ac_cv_kthread" = "yes"
5314then
5315 CXX="$CXX -Kthread"
5316 ac_cv_cxx_thread=yes
5317elif test "$ac_cv_pthread" = "yes"
5318then
5319 CXX="$CXX -pthread"
5320 ac_cv_cxx_thread=yes
5321fi
5322
5323if test $ac_cv_cxx_thread = yes
5324then
5325 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5326 $CXX -c conftest.$ac_ext 2>&5
5327 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5328 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5329 then
5330 ac_cv_cxx_thread=yes
5331 else
5332 ac_cv_cxx_thread=no
5333 fi
5334 rm -fr conftest*
5335fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005336{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5337echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005338fi
5339CXX="$ac_save_cxx"
5340
5341
5342# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005343{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5344echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005345if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005346 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005347else
5348 cat >conftest.$ac_ext <<_ACEOF
5349/* confdefs.h. */
5350_ACEOF
5351cat confdefs.h >>conftest.$ac_ext
5352cat >>conftest.$ac_ext <<_ACEOF
5353/* end confdefs.h. */
5354#include <stdlib.h>
5355#include <stdarg.h>
5356#include <string.h>
5357#include <float.h>
5358
5359int
5360main ()
5361{
5362
5363 ;
5364 return 0;
5365}
5366_ACEOF
5367rm -f conftest.$ac_objext
5368if { (ac_try="$ac_compile"
5369case "(($ac_try" in
5370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5371 *) ac_try_echo=$ac_try;;
5372esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005374 (eval "$ac_compile") 2>conftest.er1
5375 ac_status=$?
5376 grep -v '^ *+' conftest.er1 >conftest.err
5377 rm -f conftest.er1
5378 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005380 (exit $ac_status); } && {
5381 test -z "$ac_c_werror_flag" ||
5382 test ! -s conftest.err
5383 } && test -s conftest.$ac_objext; then
5384 ac_cv_header_stdc=yes
5385else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005386 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005387sed 's/^/| /' conftest.$ac_ext >&5
5388
5389 ac_cv_header_stdc=no
5390fi
5391
5392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5393
5394if test $ac_cv_header_stdc = yes; then
5395 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5396 cat >conftest.$ac_ext <<_ACEOF
5397/* confdefs.h. */
5398_ACEOF
5399cat confdefs.h >>conftest.$ac_ext
5400cat >>conftest.$ac_ext <<_ACEOF
5401/* end confdefs.h. */
5402#include <string.h>
5403
5404_ACEOF
5405if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5406 $EGREP "memchr" >/dev/null 2>&1; then
5407 :
5408else
5409 ac_cv_header_stdc=no
5410fi
Ronald Oussoren25967582009-09-06 10:00:26 +00005411rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005412
5413fi
5414
5415if test $ac_cv_header_stdc = yes; then
5416 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5417 cat >conftest.$ac_ext <<_ACEOF
5418/* confdefs.h. */
5419_ACEOF
5420cat confdefs.h >>conftest.$ac_ext
5421cat >>conftest.$ac_ext <<_ACEOF
5422/* end confdefs.h. */
5423#include <stdlib.h>
5424
5425_ACEOF
5426if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5427 $EGREP "free" >/dev/null 2>&1; then
5428 :
5429else
5430 ac_cv_header_stdc=no
5431fi
Ronald Oussoren25967582009-09-06 10:00:26 +00005432rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005433
5434fi
5435
5436if test $ac_cv_header_stdc = yes; then
5437 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5438 if test "$cross_compiling" = yes; then
5439 :
5440else
5441 cat >conftest.$ac_ext <<_ACEOF
5442/* confdefs.h. */
5443_ACEOF
5444cat confdefs.h >>conftest.$ac_ext
5445cat >>conftest.$ac_ext <<_ACEOF
5446/* end confdefs.h. */
5447#include <ctype.h>
5448#include <stdlib.h>
5449#if ((' ' & 0x0FF) == 0x020)
5450# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5451# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5452#else
5453# define ISLOWER(c) \
5454 (('a' <= (c) && (c) <= 'i') \
5455 || ('j' <= (c) && (c) <= 'r') \
5456 || ('s' <= (c) && (c) <= 'z'))
5457# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5458#endif
5459
5460#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5461int
5462main ()
5463{
5464 int i;
5465 for (i = 0; i < 256; i++)
5466 if (XOR (islower (i), ISLOWER (i))
5467 || toupper (i) != TOUPPER (i))
5468 return 2;
5469 return 0;
5470}
5471_ACEOF
5472rm -f conftest$ac_exeext
5473if { (ac_try="$ac_link"
5474case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
5483 { (case "(($ac_try" in
5484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5485 *) ac_try_echo=$ac_try;;
5486esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005488 (eval "$ac_try") 2>&5
5489 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005491 (exit $ac_status); }; }; then
5492 :
5493else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005494 echo "$as_me: program exited with status $ac_status" >&5
5495echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005496sed 's/^/| /' conftest.$ac_ext >&5
5497
5498( exit $ac_status )
5499ac_cv_header_stdc=no
5500fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005501rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5502fi
5503
5504
5505fi
5506fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005507{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5508echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005509if test $ac_cv_header_stdc = yes; then
5510
5511cat >>confdefs.h <<\_ACEOF
5512#define STDC_HEADERS 1
5513_ACEOF
5514
5515fi
5516
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005517# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5528 inttypes.h stdint.h unistd.h
5529do
5530as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5531{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5532echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5533if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5534 echo $ECHO_N "(cached) $ECHO_C" >&6
5535else
5536 cat >conftest.$ac_ext <<_ACEOF
5537/* confdefs.h. */
5538_ACEOF
5539cat confdefs.h >>conftest.$ac_ext
5540cat >>conftest.$ac_ext <<_ACEOF
5541/* end confdefs.h. */
5542$ac_includes_default
5543
5544#include <$ac_header>
5545_ACEOF
5546rm -f conftest.$ac_objext
5547if { (ac_try="$ac_compile"
5548case "(($ac_try" in
5549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5550 *) ac_try_echo=$ac_try;;
5551esac
5552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5553 (eval "$ac_compile") 2>conftest.er1
5554 ac_status=$?
5555 grep -v '^ *+' conftest.er1 >conftest.err
5556 rm -f conftest.er1
5557 cat conftest.err >&5
5558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5559 (exit $ac_status); } && {
5560 test -z "$ac_c_werror_flag" ||
5561 test ! -s conftest.err
5562 } && test -s conftest.$ac_objext; then
5563 eval "$as_ac_Header=yes"
5564else
5565 echo "$as_me: failed program was:" >&5
5566sed 's/^/| /' conftest.$ac_ext >&5
5567
5568 eval "$as_ac_Header=no"
5569fi
5570
5571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5572fi
5573ac_res=`eval echo '${'$as_ac_Header'}'`
5574 { echo "$as_me:$LINENO: result: $ac_res" >&5
5575echo "${ECHO_T}$ac_res" >&6; }
5576if test `eval echo '${'$as_ac_Header'}'` = yes; then
5577 cat >>confdefs.h <<_ACEOF
5578#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5579_ACEOF
5580
5581fi
5582
5583done
5584
5585
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005586
Martin v. Löwis11437992002-04-12 09:54:03 +00005587
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
5613
5614
5615
5616
5617
5618
5619
5620
5621
Anthony Baxter8a560de2004-10-13 15:30:56 +00005622
Martin v. Löwisc3001752005-01-23 09:27:24 +00005623
Martin v. Löwis11017b12006-01-14 18:12:57 +00005624
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005625
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005626
5627
5628
5629
5630
5631
5632
5633
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005634
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005635
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005636
5637
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005638
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005639
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005640for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5641fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005642ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005643shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005644unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005645sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5646sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005647sys/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 +00005648sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005649sys/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 +00005650sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005651bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005652do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005653as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005654if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005655 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5656echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005657if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005658 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005659fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005660ac_res=`eval echo '${'$as_ac_Header'}'`
5661 { echo "$as_me:$LINENO: result: $ac_res" >&5
5662echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005663else
Martin v. Löwis11437992002-04-12 09:54:03 +00005664 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005665{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5666echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005667cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005668/* confdefs.h. */
5669_ACEOF
5670cat confdefs.h >>conftest.$ac_ext
5671cat >>conftest.$ac_ext <<_ACEOF
5672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005673$ac_includes_default
5674#include <$ac_header>
5675_ACEOF
5676rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005677if { (ac_try="$ac_compile"
5678case "(($ac_try" in
5679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5680 *) ac_try_echo=$ac_try;;
5681esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005683 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005684 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005685 grep -v '^ *+' conftest.er1 >conftest.err
5686 rm -f conftest.er1
5687 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005689 (exit $ac_status); } && {
5690 test -z "$ac_c_werror_flag" ||
5691 test ! -s conftest.err
5692 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005693 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005694else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005696sed 's/^/| /' conftest.$ac_ext >&5
5697
Martin v. Löwiseba40652007-08-30 20:10:57 +00005698 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005700
5701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005702{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5703echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005704
5705# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005706{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5707echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005708cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005709/* confdefs.h. */
5710_ACEOF
5711cat confdefs.h >>conftest.$ac_ext
5712cat >>conftest.$ac_ext <<_ACEOF
5713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005714#include <$ac_header>
5715_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005716if { (ac_try="$ac_cpp conftest.$ac_ext"
5717case "(($ac_try" in
5718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5719 *) ac_try_echo=$ac_try;;
5720esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005722 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005723 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005724 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005725 rm -f conftest.er1
5726 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005728 (exit $ac_status); } >/dev/null && {
5729 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5730 test ! -s conftest.err
5731 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005732 ac_header_preproc=yes
5733else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005734 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005735sed 's/^/| /' conftest.$ac_ext >&5
5736
Martin v. Löwis11437992002-04-12 09:54:03 +00005737 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005739
Martin v. Löwis11437992002-04-12 09:54:03 +00005740rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005741{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5742echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005743
5744# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005745case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5746 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005747 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5748echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5749 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5750echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005751 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005752 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005753 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005754 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5755echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5756 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5757echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5758 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5759echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5760 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5761echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5762 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5763echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5764 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5765echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005766 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005767## -------------------------------------- ##
5768## Report this to http://bugs.python.org/ ##
5769## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005770_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005771 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005772 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005773esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005774{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5775echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005776if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005777 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005778else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005779 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005780fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005781ac_res=`eval echo '${'$as_ac_Header'}'`
5782 { echo "$as_me:$LINENO: result: $ac_res" >&5
5783echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005784
5785fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005786if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005787 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005788#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005789_ACEOF
5790
5791fi
5792
Guido van Rossum627b2d71993-12-24 10:39:16 +00005793done
5794
Martin v. Löwis11437992002-04-12 09:54:03 +00005795
5796
5797
5798
5799
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005800ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005801for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005802 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5803{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5804echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005805if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005806 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005807else
Martin v. Löwis11437992002-04-12 09:54:03 +00005808 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005809/* confdefs.h. */
5810_ACEOF
5811cat confdefs.h >>conftest.$ac_ext
5812cat >>conftest.$ac_ext <<_ACEOF
5813/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005814#include <sys/types.h>
5815#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005816
Martin v. Löwis11437992002-04-12 09:54:03 +00005817int
5818main ()
5819{
5820if ((DIR *) 0)
5821return 0;
5822 ;
5823 return 0;
5824}
5825_ACEOF
5826rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005827if { (ac_try="$ac_compile"
5828case "(($ac_try" in
5829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5830 *) ac_try_echo=$ac_try;;
5831esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005833 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005835 grep -v '^ *+' conftest.er1 >conftest.err
5836 rm -f conftest.er1
5837 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005839 (exit $ac_status); } && {
5840 test -z "$ac_c_werror_flag" ||
5841 test ! -s conftest.err
5842 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005843 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005844else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005846sed 's/^/| /' conftest.$ac_ext >&5
5847
Martin v. Löwiseba40652007-08-30 20:10:57 +00005848 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005850
5851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005852fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005853ac_res=`eval echo '${'$as_ac_Header'}'`
5854 { echo "$as_me:$LINENO: result: $ac_res" >&5
5855echo "${ECHO_T}$ac_res" >&6; }
5856if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005857 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005858#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005859_ACEOF
5860
5861ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005862fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005863
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005864done
5865# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5866if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005867 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5868echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005869if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005870 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005871else
Martin v. Löwis11437992002-04-12 09:54:03 +00005872 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005873cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005874/* confdefs.h. */
5875_ACEOF
5876cat confdefs.h >>conftest.$ac_ext
5877cat >>conftest.$ac_ext <<_ACEOF
5878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005879
Martin v. Löwiseba40652007-08-30 20:10:57 +00005880/* Override any GCC internal prototype to avoid an error.
5881 Use char because int might match the return type of a GCC
5882 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005883#ifdef __cplusplus
5884extern "C"
5885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005886char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005887int
5888main ()
5889{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005890return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005891 ;
5892 return 0;
5893}
5894_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005895for ac_lib in '' dir; do
5896 if test -z "$ac_lib"; then
5897 ac_res="none required"
5898 else
5899 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005900 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005901 fi
5902 rm -f conftest.$ac_objext conftest$ac_exeext
5903if { (ac_try="$ac_link"
5904case "(($ac_try" in
5905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5906 *) ac_try_echo=$ac_try;;
5907esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005909 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005910 ac_status=$?
5911 grep -v '^ *+' conftest.er1 >conftest.err
5912 rm -f conftest.er1
5913 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005915 (exit $ac_status); } && {
5916 test -z "$ac_c_werror_flag" ||
5917 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005918 } && test -s conftest$ac_exeext &&
5919 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005920 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005921else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005922 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005923sed 's/^/| /' conftest.$ac_ext >&5
5924
Martin v. Löwiseba40652007-08-30 20:10:57 +00005925
Brett Cannon19fab762007-06-02 03:02:29 +00005926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005927
5928rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5929 conftest$ac_exeext
5930 if test "${ac_cv_search_opendir+set}" = set; then
5931 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005932fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005933done
5934if test "${ac_cv_search_opendir+set}" = set; then
5935 :
5936else
5937 ac_cv_search_opendir=no
5938fi
5939rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005940LIBS=$ac_func_search_save_LIBS
5941fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005942{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5943echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005944ac_res=$ac_cv_search_opendir
5945if test "$ac_res" != no; then
5946 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005947
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005948fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005949
Michael W. Hudson54241132001-12-07 15:38:26 +00005950else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005951 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5952echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005953if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005954 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005955else
5956 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005957cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005958/* confdefs.h. */
5959_ACEOF
5960cat confdefs.h >>conftest.$ac_ext
5961cat >>conftest.$ac_ext <<_ACEOF
5962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005963
Martin v. Löwiseba40652007-08-30 20:10:57 +00005964/* Override any GCC internal prototype to avoid an error.
5965 Use char because int might match the return type of a GCC
5966 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005967#ifdef __cplusplus
5968extern "C"
5969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005970char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005971int
5972main ()
5973{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005974return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005975 ;
5976 return 0;
5977}
5978_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005979for ac_lib in '' x; do
5980 if test -z "$ac_lib"; then
5981 ac_res="none required"
5982 else
5983 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005984 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005985 fi
5986 rm -f conftest.$ac_objext conftest$ac_exeext
5987if { (ac_try="$ac_link"
5988case "(($ac_try" in
5989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5990 *) ac_try_echo=$ac_try;;
5991esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005993 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005994 ac_status=$?
5995 grep -v '^ *+' conftest.er1 >conftest.err
5996 rm -f conftest.er1
5997 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005999 (exit $ac_status); } && {
6000 test -z "$ac_c_werror_flag" ||
6001 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006002 } && test -s conftest$ac_exeext &&
6003 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006004 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006005else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006006 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006007sed 's/^/| /' conftest.$ac_ext >&5
6008
Martin v. Löwiseba40652007-08-30 20:10:57 +00006009
Brett Cannon19fab762007-06-02 03:02:29 +00006010fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006011
6012rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6013 conftest$ac_exeext
6014 if test "${ac_cv_search_opendir+set}" = set; then
6015 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006017done
6018if test "${ac_cv_search_opendir+set}" = set; then
6019 :
6020else
6021 ac_cv_search_opendir=no
6022fi
6023rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006024LIBS=$ac_func_search_save_LIBS
6025fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006026{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6027echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006028ac_res=$ac_cv_search_opendir
6029if test "$ac_res" != no; then
6030 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006031
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006032fi
6033
6034fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006035
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006036{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6037echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006038if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006039 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006040else
6041 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006042/* confdefs.h. */
6043_ACEOF
6044cat confdefs.h >>conftest.$ac_ext
6045cat >>conftest.$ac_ext <<_ACEOF
6046/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006047#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006048int
6049main ()
6050{
6051return makedev(0, 0);
6052 ;
6053 return 0;
6054}
6055_ACEOF
6056rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006057if { (ac_try="$ac_link"
6058case "(($ac_try" in
6059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6060 *) ac_try_echo=$ac_try;;
6061esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006063 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006065 grep -v '^ *+' conftest.er1 >conftest.err
6066 rm -f conftest.er1
6067 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006069 (exit $ac_status); } && {
6070 test -z "$ac_c_werror_flag" ||
6071 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006072 } && test -s conftest$ac_exeext &&
6073 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006074 ac_cv_header_sys_types_h_makedev=yes
6075else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006076 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006077sed 's/^/| /' conftest.$ac_ext >&5
6078
Martin v. Löwiseba40652007-08-30 20:10:57 +00006079 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006080fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006081
6082rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006083 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006084
6085fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006086{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6087echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006088
6089if test $ac_cv_header_sys_types_h_makedev = no; then
6090if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006091 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6092echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006093if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006094 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006095fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006096{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6097echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006098else
6099 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006100{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6101echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006102cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006103/* confdefs.h. */
6104_ACEOF
6105cat confdefs.h >>conftest.$ac_ext
6106cat >>conftest.$ac_ext <<_ACEOF
6107/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006108$ac_includes_default
6109#include <sys/mkdev.h>
6110_ACEOF
6111rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006112if { (ac_try="$ac_compile"
6113case "(($ac_try" in
6114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6115 *) ac_try_echo=$ac_try;;
6116esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006120 grep -v '^ *+' conftest.er1 >conftest.err
6121 rm -f conftest.er1
6122 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006124 (exit $ac_status); } && {
6125 test -z "$ac_c_werror_flag" ||
6126 test ! -s conftest.err
6127 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006128 ac_header_compiler=yes
6129else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006131sed 's/^/| /' conftest.$ac_ext >&5
6132
Martin v. Löwiseba40652007-08-30 20:10:57 +00006133 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006134fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006135
6136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006137{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6138echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006139
6140# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006141{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6142echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006143cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006144/* confdefs.h. */
6145_ACEOF
6146cat confdefs.h >>conftest.$ac_ext
6147cat >>conftest.$ac_ext <<_ACEOF
6148/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006149#include <sys/mkdev.h>
6150_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006151if { (ac_try="$ac_cpp conftest.$ac_ext"
6152case "(($ac_try" in
6153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6154 *) ac_try_echo=$ac_try;;
6155esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006157 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006158 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006159 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006160 rm -f conftest.er1
6161 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006163 (exit $ac_status); } >/dev/null && {
6164 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6165 test ! -s conftest.err
6166 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006167 ac_header_preproc=yes
6168else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006170sed 's/^/| /' conftest.$ac_ext >&5
6171
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172 ac_header_preproc=no
6173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006174
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006175rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006176{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6177echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178
6179# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006180case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6181 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006182 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6183echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6184 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6185echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006186 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006187 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006188 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006189 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6190echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6191 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6192echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6193 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6194echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6195 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6196echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6197 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6198echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6199 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6200echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006201 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006202## -------------------------------------- ##
6203## Report this to http://bugs.python.org/ ##
6204## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006205_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006206 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006207 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006208esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006209{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6210echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006212 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213else
6214 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6215fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006216{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6217echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006218
6219fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006220if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006221
6222cat >>confdefs.h <<\_ACEOF
6223#define MAJOR_IN_MKDEV 1
6224_ACEOF
6225
6226fi
6227
6228
6229
6230 if test $ac_cv_header_sys_mkdev_h = no; then
6231 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006232 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6233echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006234if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006235 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006236fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006237{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6238echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006239else
6240 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006241{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6242echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006244/* confdefs.h. */
6245_ACEOF
6246cat confdefs.h >>conftest.$ac_ext
6247cat >>conftest.$ac_ext <<_ACEOF
6248/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006249$ac_includes_default
6250#include <sys/sysmacros.h>
6251_ACEOF
6252rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006253if { (ac_try="$ac_compile"
6254case "(($ac_try" in
6255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6256 *) ac_try_echo=$ac_try;;
6257esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006259 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006260 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006261 grep -v '^ *+' conftest.er1 >conftest.err
6262 rm -f conftest.er1
6263 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006265 (exit $ac_status); } && {
6266 test -z "$ac_c_werror_flag" ||
6267 test ! -s conftest.err
6268 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006269 ac_header_compiler=yes
6270else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006271 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006272sed 's/^/| /' conftest.$ac_ext >&5
6273
Martin v. Löwiseba40652007-08-30 20:10:57 +00006274 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006276
6277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006278{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6279echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006280
6281# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006282{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6283echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006284cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006285/* confdefs.h. */
6286_ACEOF
6287cat confdefs.h >>conftest.$ac_ext
6288cat >>conftest.$ac_ext <<_ACEOF
6289/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006290#include <sys/sysmacros.h>
6291_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006292if { (ac_try="$ac_cpp conftest.$ac_ext"
6293case "(($ac_try" in
6294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6295 *) ac_try_echo=$ac_try;;
6296esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006298 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006299 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006300 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301 rm -f conftest.er1
6302 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006304 (exit $ac_status); } >/dev/null && {
6305 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6306 test ! -s conftest.err
6307 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006308 ac_header_preproc=yes
6309else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006311sed 's/^/| /' conftest.$ac_ext >&5
6312
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006313 ac_header_preproc=no
6314fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006315
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006316rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006317{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6318echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006319
6320# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006321case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6322 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006323 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6324echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6325 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6326echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006327 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006328 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006329 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006330 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6331echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6332 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6333echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6334 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6335echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6336 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6337echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6338 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6339echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6340 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6341echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006342 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006343## -------------------------------------- ##
6344## Report this to http://bugs.python.org/ ##
6345## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006346_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006347 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006348 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006349esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006350{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6351echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006352if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006353 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006354else
6355 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6356fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006357{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6358echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006359
6360fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006361if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006362
6363cat >>confdefs.h <<\_ACEOF
6364#define MAJOR_IN_SYSMACROS 1
6365_ACEOF
6366
6367fi
6368
6369
6370 fi
6371fi
6372
Michael W. Hudson54241132001-12-07 15:38:26 +00006373
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006374# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006375
6376for ac_header in term.h
6377do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006378as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6379{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6380echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006381if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006382 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006383else
6384 cat >conftest.$ac_ext <<_ACEOF
6385/* confdefs.h. */
6386_ACEOF
6387cat confdefs.h >>conftest.$ac_ext
6388cat >>conftest.$ac_ext <<_ACEOF
6389/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006390
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006391#ifdef HAVE_CURSES_H
6392#include <curses.h>
6393#endif
6394
6395
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006396#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006397_ACEOF
6398rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006399if { (ac_try="$ac_compile"
6400case "(($ac_try" in
6401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6402 *) ac_try_echo=$ac_try;;
6403esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006405 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006406 ac_status=$?
6407 grep -v '^ *+' conftest.er1 >conftest.err
6408 rm -f conftest.er1
6409 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006411 (exit $ac_status); } && {
6412 test -z "$ac_c_werror_flag" ||
6413 test ! -s conftest.err
6414 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006415 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006416else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006417 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006418sed 's/^/| /' conftest.$ac_ext >&5
6419
Martin v. Löwiseba40652007-08-30 20:10:57 +00006420 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006422
6423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006424fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006425ac_res=`eval echo '${'$as_ac_Header'}'`
6426 { echo "$as_me:$LINENO: result: $ac_res" >&5
6427echo "${ECHO_T}$ac_res" >&6; }
6428if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006429 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006430#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006431_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006432
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006433fi
6434
6435done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006436
6437
Martin v. Löwis11017b12006-01-14 18:12:57 +00006438# On Linux, netlink.h requires asm/types.h
6439
6440for ac_header in linux/netlink.h
6441do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006442as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6443{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6444echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006445if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006446 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006447else
6448 cat >conftest.$ac_ext <<_ACEOF
6449/* confdefs.h. */
6450_ACEOF
6451cat confdefs.h >>conftest.$ac_ext
6452cat >>conftest.$ac_ext <<_ACEOF
6453/* end confdefs.h. */
6454
6455#ifdef HAVE_ASM_TYPES_H
6456#include <asm/types.h>
6457#endif
6458#ifdef HAVE_SYS_SOCKET_H
6459#include <sys/socket.h>
6460#endif
6461
6462
6463#include <$ac_header>
6464_ACEOF
6465rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006466if { (ac_try="$ac_compile"
6467case "(($ac_try" in
6468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6469 *) ac_try_echo=$ac_try;;
6470esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006472 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006473 ac_status=$?
6474 grep -v '^ *+' conftest.er1 >conftest.err
6475 rm -f conftest.er1
6476 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006478 (exit $ac_status); } && {
6479 test -z "$ac_c_werror_flag" ||
6480 test ! -s conftest.err
6481 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006482 eval "$as_ac_Header=yes"
6483else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006484 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006485sed 's/^/| /' conftest.$ac_ext >&5
6486
Martin v. Löwiseba40652007-08-30 20:10:57 +00006487 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006489
6490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006491fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006492ac_res=`eval echo '${'$as_ac_Header'}'`
6493 { echo "$as_me:$LINENO: result: $ac_res" >&5
6494echo "${ECHO_T}$ac_res" >&6; }
6495if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006496 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006497#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006498_ACEOF
6499
6500fi
6501
6502done
6503
6504
Guido van Rossum627b2d71993-12-24 10:39:16 +00006505# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006506was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006507{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6508echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006509cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006510/* confdefs.h. */
6511_ACEOF
6512cat confdefs.h >>conftest.$ac_ext
6513cat >>conftest.$ac_ext <<_ACEOF
6514/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006515#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006516
6517_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006518if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006519 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006520 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006521else
Martin v. Löwis11437992002-04-12 09:54:03 +00006522
6523
6524cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006525#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006526_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006527
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006528
Guido van Rossum627b2d71993-12-24 10:39:16 +00006529fi
Ronald Oussoren25967582009-09-06 10:00:26 +00006530rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006531
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006532{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6533echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006534
Neal Norwitz11690112002-07-30 01:08:28 +00006535# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006536{ echo "$as_me:$LINENO: checking for makedev" >&5
6537echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006538cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006539/* confdefs.h. */
6540_ACEOF
6541cat confdefs.h >>conftest.$ac_ext
6542cat >>conftest.$ac_ext <<_ACEOF
6543/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006544#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006545int
6546main ()
6547{
6548 makedev(0, 0)
6549 ;
6550 return 0;
6551}
6552_ACEOF
6553rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006554if { (ac_try="$ac_link"
6555case "(($ac_try" in
6556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6557 *) ac_try_echo=$ac_try;;
6558esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006560 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006562 grep -v '^ *+' conftest.er1 >conftest.err
6563 rm -f conftest.er1
6564 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006566 (exit $ac_status); } && {
6567 test -z "$ac_c_werror_flag" ||
6568 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006569 } && test -s conftest$ac_exeext &&
6570 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006571 ac_cv_has_makedev=yes
6572else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006574sed 's/^/| /' conftest.$ac_ext >&5
6575
Martin v. Löwiseba40652007-08-30 20:10:57 +00006576 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006578
6579rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006580 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006581if test "$ac_cv_has_makedev" = "no"; then
6582 # we didn't link, try if _OSF_SOURCE will allow us to link
6583 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006584/* confdefs.h. */
6585_ACEOF
6586cat confdefs.h >>conftest.$ac_ext
6587cat >>conftest.$ac_ext <<_ACEOF
6588/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006589
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006590#define _OSF_SOURCE 1
6591#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006592
Neal Norwitz11690112002-07-30 01:08:28 +00006593int
6594main ()
6595{
6596 makedev(0, 0)
6597 ;
6598 return 0;
6599}
6600_ACEOF
6601rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006602if { (ac_try="$ac_link"
6603case "(($ac_try" in
6604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6605 *) ac_try_echo=$ac_try;;
6606esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006608 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006609 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006610 grep -v '^ *+' conftest.er1 >conftest.err
6611 rm -f conftest.er1
6612 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006614 (exit $ac_status); } && {
6615 test -z "$ac_c_werror_flag" ||
6616 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006617 } && test -s conftest$ac_exeext &&
6618 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006619 ac_cv_has_makedev=yes
6620else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006622sed 's/^/| /' conftest.$ac_ext >&5
6623
Martin v. Löwiseba40652007-08-30 20:10:57 +00006624 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006625fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006626
6627rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006628 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006629 if test "$ac_cv_has_makedev" = "yes"; then
6630
6631cat >>confdefs.h <<\_ACEOF
6632#define _OSF_SOURCE 1
6633_ACEOF
6634
6635 fi
6636fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006637{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6638echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006639if test "$ac_cv_has_makedev" = "yes"; then
6640
6641cat >>confdefs.h <<\_ACEOF
6642#define HAVE_MAKEDEV 1
6643_ACEOF
6644
6645fi
6646
Martin v. Löwis399a6892002-10-04 10:22:02 +00006647# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6648# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6649# defined, but the compiler does not support pragma redefine_extname,
6650# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6651# structures (such as rlimit64) without declaring them. As a
6652# work-around, disable LFS on such configurations
6653
6654use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006655{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6656echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006657cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006658/* confdefs.h. */
6659_ACEOF
6660cat confdefs.h >>conftest.$ac_ext
6661cat >>conftest.$ac_ext <<_ACEOF
6662/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006663
6664#define _LARGEFILE_SOURCE 1
6665#define _FILE_OFFSET_BITS 64
6666#include <sys/resource.h>
6667
Martin v. Löwis399a6892002-10-04 10:22:02 +00006668int
6669main ()
6670{
6671struct rlimit foo;
6672 ;
6673 return 0;
6674}
6675_ACEOF
6676rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006677if { (ac_try="$ac_compile"
6678case "(($ac_try" in
6679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6680 *) ac_try_echo=$ac_try;;
6681esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006683 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006684 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006685 grep -v '^ *+' conftest.er1 >conftest.err
6686 rm -f conftest.er1
6687 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006689 (exit $ac_status); } && {
6690 test -z "$ac_c_werror_flag" ||
6691 test ! -s conftest.err
6692 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006693 sol_lfs_bug=no
6694else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006696sed 's/^/| /' conftest.$ac_ext >&5
6697
Martin v. Löwiseba40652007-08-30 20:10:57 +00006698 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006700
6701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006702{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6703echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006704if test "$sol_lfs_bug" = "yes"; then
6705 use_lfs=no
6706fi
6707
6708if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006709# Two defines needed to enable largefile support on various platforms
6710# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006711
Martin v. Löwis11437992002-04-12 09:54:03 +00006712cat >>confdefs.h <<\_ACEOF
6713#define _LARGEFILE_SOURCE 1
6714_ACEOF
6715
6716
6717cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006718#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006719_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006720
Martin v. Löwis399a6892002-10-04 10:22:02 +00006721fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006722
Guido van Rossum84e7b241996-08-19 21:59:00 +00006723# Add some code to confdefs.h so that the test for off_t works on SCO
6724cat >> confdefs.h <<\EOF
6725#if defined(SCO_DS)
6726#undef _OFF_T
6727#endif
6728EOF
6729
Guido van Rossumef2255b2000-03-10 22:30:29 +00006730# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006731{ echo "$as_me:$LINENO: checking for mode_t" >&5
6732echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006733if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006734 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006735else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006736 cat >conftest.$ac_ext <<_ACEOF
6737/* confdefs.h. */
6738_ACEOF
6739cat confdefs.h >>conftest.$ac_ext
6740cat >>conftest.$ac_ext <<_ACEOF
6741/* end confdefs.h. */
6742$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006743typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006744int
6745main ()
6746{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006747if ((ac__type_new_ *) 0)
6748 return 0;
6749if (sizeof (ac__type_new_))
6750 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006751 ;
6752 return 0;
6753}
6754_ACEOF
6755rm -f conftest.$ac_objext
6756if { (ac_try="$ac_compile"
6757case "(($ac_try" in
6758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6759 *) ac_try_echo=$ac_try;;
6760esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006762 (eval "$ac_compile") 2>conftest.er1
6763 ac_status=$?
6764 grep -v '^ *+' conftest.er1 >conftest.err
6765 rm -f conftest.er1
6766 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006768 (exit $ac_status); } && {
6769 test -z "$ac_c_werror_flag" ||
6770 test ! -s conftest.err
6771 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006772 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006773else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006775sed 's/^/| /' conftest.$ac_ext >&5
6776
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006777 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006778fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006779
6780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006781fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006782{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6783echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6784if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006785 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006786else
Martin v. Löwis11437992002-04-12 09:54:03 +00006787
6788cat >>confdefs.h <<_ACEOF
6789#define mode_t int
6790_ACEOF
6791
6792fi
6793
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006794{ echo "$as_me:$LINENO: checking for off_t" >&5
6795echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006796if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006797 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006798else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006799 cat >conftest.$ac_ext <<_ACEOF
6800/* confdefs.h. */
6801_ACEOF
6802cat confdefs.h >>conftest.$ac_ext
6803cat >>conftest.$ac_ext <<_ACEOF
6804/* end confdefs.h. */
6805$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006806typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006807int
6808main ()
6809{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006810if ((ac__type_new_ *) 0)
6811 return 0;
6812if (sizeof (ac__type_new_))
6813 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006814 ;
6815 return 0;
6816}
6817_ACEOF
6818rm -f conftest.$ac_objext
6819if { (ac_try="$ac_compile"
6820case "(($ac_try" in
6821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6822 *) ac_try_echo=$ac_try;;
6823esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006825 (eval "$ac_compile") 2>conftest.er1
6826 ac_status=$?
6827 grep -v '^ *+' conftest.er1 >conftest.err
6828 rm -f conftest.er1
6829 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006831 (exit $ac_status); } && {
6832 test -z "$ac_c_werror_flag" ||
6833 test ! -s conftest.err
6834 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006835 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006836else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006838sed 's/^/| /' conftest.$ac_ext >&5
6839
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006840 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006842
6843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006844fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006845{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6846echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6847if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006848 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006849else
Martin v. Löwis11437992002-04-12 09:54:03 +00006850
6851cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006852#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006853_ACEOF
6854
6855fi
6856
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006857{ echo "$as_me:$LINENO: checking for pid_t" >&5
6858echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006859if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006860 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006861else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006862 cat >conftest.$ac_ext <<_ACEOF
6863/* confdefs.h. */
6864_ACEOF
6865cat confdefs.h >>conftest.$ac_ext
6866cat >>conftest.$ac_ext <<_ACEOF
6867/* end confdefs.h. */
6868$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006869typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006870int
6871main ()
6872{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006873if ((ac__type_new_ *) 0)
6874 return 0;
6875if (sizeof (ac__type_new_))
6876 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006877 ;
6878 return 0;
6879}
6880_ACEOF
6881rm -f conftest.$ac_objext
6882if { (ac_try="$ac_compile"
6883case "(($ac_try" in
6884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6885 *) ac_try_echo=$ac_try;;
6886esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006888 (eval "$ac_compile") 2>conftest.er1
6889 ac_status=$?
6890 grep -v '^ *+' conftest.er1 >conftest.err
6891 rm -f conftest.er1
6892 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006894 (exit $ac_status); } && {
6895 test -z "$ac_c_werror_flag" ||
6896 test ! -s conftest.err
6897 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006898 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006899else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006901sed 's/^/| /' conftest.$ac_ext >&5
6902
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006903 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006905
6906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006907fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006908{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6909echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6910if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006911 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006912else
Martin v. Löwis11437992002-04-12 09:54:03 +00006913
6914cat >>confdefs.h <<_ACEOF
6915#define pid_t int
6916_ACEOF
6917
6918fi
6919
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006920{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6921echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006922if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006923 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006924else
6925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006926/* confdefs.h. */
6927_ACEOF
6928cat confdefs.h >>conftest.$ac_ext
6929cat >>conftest.$ac_ext <<_ACEOF
6930/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006931#include <sys/types.h>
6932#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006933
Martin v. Löwis11437992002-04-12 09:54:03 +00006934int
6935main ()
6936{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006937return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006938 ;
6939 return 0;
6940}
6941_ACEOF
6942rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006943if { (ac_try="$ac_compile"
6944case "(($ac_try" in
6945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6946 *) ac_try_echo=$ac_try;;
6947esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006949 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006950 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006951 grep -v '^ *+' conftest.er1 >conftest.err
6952 rm -f conftest.er1
6953 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006955 (exit $ac_status); } && {
6956 test -z "$ac_c_werror_flag" ||
6957 test ! -s conftest.err
6958 } && test -s conftest.$ac_objext; then
6959 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006960else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006962sed 's/^/| /' conftest.$ac_ext >&5
6963
Martin v. Löwiseba40652007-08-30 20:10:57 +00006964 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006966
6967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006968fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006969{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6970echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006971
Martin v. Löwis11437992002-04-12 09:54:03 +00006972cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006973#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006974_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006975
Michael W. Hudson54241132001-12-07 15:38:26 +00006976
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006977{ echo "$as_me:$LINENO: checking for size_t" >&5
6978echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006979if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006980 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006981else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006982 cat >conftest.$ac_ext <<_ACEOF
6983/* confdefs.h. */
6984_ACEOF
6985cat confdefs.h >>conftest.$ac_ext
6986cat >>conftest.$ac_ext <<_ACEOF
6987/* end confdefs.h. */
6988$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006989typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006990int
6991main ()
6992{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006993if ((ac__type_new_ *) 0)
6994 return 0;
6995if (sizeof (ac__type_new_))
6996 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006997 ;
6998 return 0;
6999}
7000_ACEOF
7001rm -f conftest.$ac_objext
7002if { (ac_try="$ac_compile"
7003case "(($ac_try" in
7004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7005 *) ac_try_echo=$ac_try;;
7006esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007008 (eval "$ac_compile") 2>conftest.er1
7009 ac_status=$?
7010 grep -v '^ *+' conftest.er1 >conftest.err
7011 rm -f conftest.er1
7012 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007014 (exit $ac_status); } && {
7015 test -z "$ac_c_werror_flag" ||
7016 test ! -s conftest.err
7017 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007018 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007019else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007021sed 's/^/| /' conftest.$ac_ext >&5
7022
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007023 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007024fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007025
7026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007027fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007028{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7029echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7030if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007031 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007032else
Martin v. Löwis11437992002-04-12 09:54:03 +00007033
7034cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007035#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007036_ACEOF
7037
7038fi
7039
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007040{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7041echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007042if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007043 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007044else
7045 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007046/* confdefs.h. */
7047_ACEOF
7048cat confdefs.h >>conftest.$ac_ext
7049cat >>conftest.$ac_ext <<_ACEOF
7050/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007051#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007052
7053_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007054if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007055 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007056 ac_cv_type_uid_t=yes
7057else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007058 ac_cv_type_uid_t=no
7059fi
Ronald Oussoren25967582009-09-06 10:00:26 +00007060rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007061
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007062fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007063{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7064echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007065if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007066
Martin v. Löwis11437992002-04-12 09:54:03 +00007067cat >>confdefs.h <<\_ACEOF
7068#define uid_t int
7069_ACEOF
7070
7071
7072cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007073#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007074_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007075
7076fi
7077
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007078
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007079 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7080echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007081if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007082 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007083else
7084 ac_cv_c_uint32_t=no
7085 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7086 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7087 cat >conftest.$ac_ext <<_ACEOF
7088/* confdefs.h. */
7089_ACEOF
7090cat confdefs.h >>conftest.$ac_ext
7091cat >>conftest.$ac_ext <<_ACEOF
7092/* end confdefs.h. */
7093$ac_includes_default
7094int
7095main ()
7096{
7097static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7098test_array [0] = 0
7099
7100 ;
7101 return 0;
7102}
7103_ACEOF
7104rm -f conftest.$ac_objext
7105if { (ac_try="$ac_compile"
7106case "(($ac_try" in
7107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7108 *) ac_try_echo=$ac_try;;
7109esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007111 (eval "$ac_compile") 2>conftest.er1
7112 ac_status=$?
7113 grep -v '^ *+' conftest.er1 >conftest.err
7114 rm -f conftest.er1
7115 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007117 (exit $ac_status); } && {
7118 test -z "$ac_c_werror_flag" ||
7119 test ! -s conftest.err
7120 } && test -s conftest.$ac_objext; then
7121 case $ac_type in
7122 uint32_t) ac_cv_c_uint32_t=yes ;;
7123 *) ac_cv_c_uint32_t=$ac_type ;;
7124esac
7125
7126else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007127 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007128sed 's/^/| /' conftest.$ac_ext >&5
7129
7130
7131fi
7132
7133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7134 test "$ac_cv_c_uint32_t" != no && break
7135 done
7136fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007137{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7138echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007139 case $ac_cv_c_uint32_t in #(
7140 no|yes) ;; #(
7141 *)
7142
7143cat >>confdefs.h <<\_ACEOF
7144#define _UINT32_T 1
7145_ACEOF
7146
7147
7148cat >>confdefs.h <<_ACEOF
7149#define uint32_t $ac_cv_c_uint32_t
7150_ACEOF
7151;;
7152 esac
7153
7154
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007155 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7156echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007157if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007158 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007159else
7160 ac_cv_c_uint64_t=no
7161 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7162 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7163 cat >conftest.$ac_ext <<_ACEOF
7164/* confdefs.h. */
7165_ACEOF
7166cat confdefs.h >>conftest.$ac_ext
7167cat >>conftest.$ac_ext <<_ACEOF
7168/* end confdefs.h. */
7169$ac_includes_default
7170int
7171main ()
7172{
7173static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7174test_array [0] = 0
7175
7176 ;
7177 return 0;
7178}
7179_ACEOF
7180rm -f conftest.$ac_objext
7181if { (ac_try="$ac_compile"
7182case "(($ac_try" in
7183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7184 *) ac_try_echo=$ac_try;;
7185esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007187 (eval "$ac_compile") 2>conftest.er1
7188 ac_status=$?
7189 grep -v '^ *+' conftest.er1 >conftest.err
7190 rm -f conftest.er1
7191 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007193 (exit $ac_status); } && {
7194 test -z "$ac_c_werror_flag" ||
7195 test ! -s conftest.err
7196 } && test -s conftest.$ac_objext; then
7197 case $ac_type in
7198 uint64_t) ac_cv_c_uint64_t=yes ;;
7199 *) ac_cv_c_uint64_t=$ac_type ;;
7200esac
7201
7202else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007203 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007204sed 's/^/| /' conftest.$ac_ext >&5
7205
7206
7207fi
7208
7209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7210 test "$ac_cv_c_uint64_t" != no && break
7211 done
7212fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007213{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7214echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007215 case $ac_cv_c_uint64_t in #(
7216 no|yes) ;; #(
7217 *)
7218
7219cat >>confdefs.h <<\_ACEOF
7220#define _UINT64_T 1
7221_ACEOF
7222
7223
7224cat >>confdefs.h <<_ACEOF
7225#define uint64_t $ac_cv_c_uint64_t
7226_ACEOF
7227;;
7228 esac
7229
7230
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007231 { echo "$as_me:$LINENO: checking for int32_t" >&5
7232echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007233if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007234 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007235else
7236 ac_cv_c_int32_t=no
7237 for ac_type in 'int32_t' 'int' 'long int' \
7238 'long long int' 'short int' 'signed char'; do
7239 cat >conftest.$ac_ext <<_ACEOF
7240/* confdefs.h. */
7241_ACEOF
7242cat confdefs.h >>conftest.$ac_ext
7243cat >>conftest.$ac_ext <<_ACEOF
7244/* end confdefs.h. */
7245$ac_includes_default
7246int
7247main ()
7248{
7249static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7250test_array [0] = 0
7251
7252 ;
7253 return 0;
7254}
7255_ACEOF
7256rm -f conftest.$ac_objext
7257if { (ac_try="$ac_compile"
7258case "(($ac_try" in
7259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7260 *) ac_try_echo=$ac_try;;
7261esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007263 (eval "$ac_compile") 2>conftest.er1
7264 ac_status=$?
7265 grep -v '^ *+' conftest.er1 >conftest.err
7266 rm -f conftest.er1
7267 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007269 (exit $ac_status); } && {
7270 test -z "$ac_c_werror_flag" ||
7271 test ! -s conftest.err
7272 } && test -s conftest.$ac_objext; then
7273 cat >conftest.$ac_ext <<_ACEOF
7274/* confdefs.h. */
7275_ACEOF
7276cat confdefs.h >>conftest.$ac_ext
7277cat >>conftest.$ac_ext <<_ACEOF
7278/* end confdefs.h. */
7279$ac_includes_default
7280int
7281main ()
7282{
7283static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007284 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007285test_array [0] = 0
7286
7287 ;
7288 return 0;
7289}
7290_ACEOF
7291rm -f conftest.$ac_objext
7292if { (ac_try="$ac_compile"
7293case "(($ac_try" in
7294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7295 *) ac_try_echo=$ac_try;;
7296esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007298 (eval "$ac_compile") 2>conftest.er1
7299 ac_status=$?
7300 grep -v '^ *+' conftest.er1 >conftest.err
7301 rm -f conftest.er1
7302 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007304 (exit $ac_status); } && {
7305 test -z "$ac_c_werror_flag" ||
7306 test ! -s conftest.err
7307 } && test -s conftest.$ac_objext; then
7308 :
7309else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007310 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007311sed 's/^/| /' conftest.$ac_ext >&5
7312
7313 case $ac_type in
7314 int32_t) ac_cv_c_int32_t=yes ;;
7315 *) ac_cv_c_int32_t=$ac_type ;;
7316esac
7317
7318fi
7319
7320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7321else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007322 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007323sed 's/^/| /' conftest.$ac_ext >&5
7324
7325
7326fi
7327
7328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7329 test "$ac_cv_c_int32_t" != no && break
7330 done
7331fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007332{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7333echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007334 case $ac_cv_c_int32_t in #(
7335 no|yes) ;; #(
7336 *)
7337
7338cat >>confdefs.h <<_ACEOF
7339#define int32_t $ac_cv_c_int32_t
7340_ACEOF
7341;;
7342 esac
7343
7344
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007345 { echo "$as_me:$LINENO: checking for int64_t" >&5
7346echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007347if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007348 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007349else
7350 ac_cv_c_int64_t=no
7351 for ac_type in 'int64_t' 'int' 'long int' \
7352 'long long int' 'short int' 'signed char'; do
7353 cat >conftest.$ac_ext <<_ACEOF
7354/* confdefs.h. */
7355_ACEOF
7356cat confdefs.h >>conftest.$ac_ext
7357cat >>conftest.$ac_ext <<_ACEOF
7358/* end confdefs.h. */
7359$ac_includes_default
7360int
7361main ()
7362{
7363static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7364test_array [0] = 0
7365
7366 ;
7367 return 0;
7368}
7369_ACEOF
7370rm -f conftest.$ac_objext
7371if { (ac_try="$ac_compile"
7372case "(($ac_try" in
7373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7374 *) ac_try_echo=$ac_try;;
7375esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007377 (eval "$ac_compile") 2>conftest.er1
7378 ac_status=$?
7379 grep -v '^ *+' conftest.er1 >conftest.err
7380 rm -f conftest.er1
7381 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007383 (exit $ac_status); } && {
7384 test -z "$ac_c_werror_flag" ||
7385 test ! -s conftest.err
7386 } && test -s conftest.$ac_objext; then
7387 cat >conftest.$ac_ext <<_ACEOF
7388/* confdefs.h. */
7389_ACEOF
7390cat confdefs.h >>conftest.$ac_ext
7391cat >>conftest.$ac_ext <<_ACEOF
7392/* end confdefs.h. */
7393$ac_includes_default
7394int
7395main ()
7396{
7397static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007398 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007399test_array [0] = 0
7400
7401 ;
7402 return 0;
7403}
7404_ACEOF
7405rm -f conftest.$ac_objext
7406if { (ac_try="$ac_compile"
7407case "(($ac_try" in
7408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7409 *) ac_try_echo=$ac_try;;
7410esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007412 (eval "$ac_compile") 2>conftest.er1
7413 ac_status=$?
7414 grep -v '^ *+' conftest.er1 >conftest.err
7415 rm -f conftest.er1
7416 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007418 (exit $ac_status); } && {
7419 test -z "$ac_c_werror_flag" ||
7420 test ! -s conftest.err
7421 } && test -s conftest.$ac_objext; then
7422 :
7423else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007424 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007425sed 's/^/| /' conftest.$ac_ext >&5
7426
7427 case $ac_type in
7428 int64_t) ac_cv_c_int64_t=yes ;;
7429 *) ac_cv_c_int64_t=$ac_type ;;
7430esac
7431
7432fi
7433
7434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7435else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007436 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007437sed 's/^/| /' conftest.$ac_ext >&5
7438
7439
7440fi
7441
7442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7443 test "$ac_cv_c_int64_t" != no && break
7444 done
7445fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007446{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7447echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007448 case $ac_cv_c_int64_t in #(
7449 no|yes) ;; #(
7450 *)
7451
7452cat >>confdefs.h <<_ACEOF
7453#define int64_t $ac_cv_c_int64_t
7454_ACEOF
7455;;
7456 esac
7457
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007458{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7459echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007460if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007461 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007462else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007463 cat >conftest.$ac_ext <<_ACEOF
7464/* confdefs.h. */
7465_ACEOF
7466cat confdefs.h >>conftest.$ac_ext
7467cat >>conftest.$ac_ext <<_ACEOF
7468/* end confdefs.h. */
7469$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007470typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007471int
7472main ()
7473{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007474if ((ac__type_new_ *) 0)
7475 return 0;
7476if (sizeof (ac__type_new_))
7477 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007478 ;
7479 return 0;
7480}
7481_ACEOF
7482rm -f conftest.$ac_objext
7483if { (ac_try="$ac_compile"
7484case "(($ac_try" in
7485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7486 *) ac_try_echo=$ac_try;;
7487esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007489 (eval "$ac_compile") 2>conftest.er1
7490 ac_status=$?
7491 grep -v '^ *+' conftest.er1 >conftest.err
7492 rm -f conftest.er1
7493 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007495 (exit $ac_status); } && {
7496 test -z "$ac_c_werror_flag" ||
7497 test ! -s conftest.err
7498 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007499 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007500else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007501 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007502sed 's/^/| /' conftest.$ac_ext >&5
7503
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007504 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007506
7507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007508fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007509{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7510echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7511if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007512
7513cat >>confdefs.h <<\_ACEOF
7514#define HAVE_SSIZE_T 1
7515_ACEOF
7516
7517fi
7518
Jack Jansendd19cf82001-12-06 22:36:17 +00007519
Michael W. Hudson54241132001-12-07 15:38:26 +00007520# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007521# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007522{ echo "$as_me:$LINENO: checking for int" >&5
7523echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7524if test "${ac_cv_type_int+set}" = set; then
7525 echo $ECHO_N "(cached) $ECHO_C" >&6
7526else
7527 cat >conftest.$ac_ext <<_ACEOF
7528/* confdefs.h. */
7529_ACEOF
7530cat confdefs.h >>conftest.$ac_ext
7531cat >>conftest.$ac_ext <<_ACEOF
7532/* end confdefs.h. */
7533$ac_includes_default
7534typedef int ac__type_new_;
7535int
7536main ()
7537{
7538if ((ac__type_new_ *) 0)
7539 return 0;
7540if (sizeof (ac__type_new_))
7541 return 0;
7542 ;
7543 return 0;
7544}
7545_ACEOF
7546rm -f conftest.$ac_objext
7547if { (ac_try="$ac_compile"
7548case "(($ac_try" in
7549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7550 *) ac_try_echo=$ac_try;;
7551esac
7552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7553 (eval "$ac_compile") 2>conftest.er1
7554 ac_status=$?
7555 grep -v '^ *+' conftest.er1 >conftest.err
7556 rm -f conftest.er1
7557 cat conftest.err >&5
7558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7559 (exit $ac_status); } && {
7560 test -z "$ac_c_werror_flag" ||
7561 test ! -s conftest.err
7562 } && test -s conftest.$ac_objext; then
7563 ac_cv_type_int=yes
7564else
7565 echo "$as_me: failed program was:" >&5
7566sed 's/^/| /' conftest.$ac_ext >&5
7567
7568 ac_cv_type_int=no
7569fi
7570
7571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7572fi
7573{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7574echo "${ECHO_T}$ac_cv_type_int" >&6; }
7575
Martin v. Löwiseba40652007-08-30 20:10:57 +00007576# The cast to long int works around a bug in the HP C Compiler
7577# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7578# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7579# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007580{ echo "$as_me:$LINENO: checking size of int" >&5
7581echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007582if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007583 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007584else
Martin v. Löwis11437992002-04-12 09:54:03 +00007585 if test "$cross_compiling" = yes; then
7586 # Depending upon the size, compute the lo and hi bounds.
7587cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007588/* confdefs.h. */
7589_ACEOF
7590cat confdefs.h >>conftest.$ac_ext
7591cat >>conftest.$ac_ext <<_ACEOF
7592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007593$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007594 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007595int
7596main ()
7597{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007598static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007599test_array [0] = 0
7600
7601 ;
7602 return 0;
7603}
7604_ACEOF
7605rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007606if { (ac_try="$ac_compile"
7607case "(($ac_try" in
7608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7609 *) ac_try_echo=$ac_try;;
7610esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007612 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007614 grep -v '^ *+' conftest.er1 >conftest.err
7615 rm -f conftest.er1
7616 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007618 (exit $ac_status); } && {
7619 test -z "$ac_c_werror_flag" ||
7620 test ! -s conftest.err
7621 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007622 ac_lo=0 ac_mid=0
7623 while :; do
7624 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007625/* confdefs.h. */
7626_ACEOF
7627cat confdefs.h >>conftest.$ac_ext
7628cat >>conftest.$ac_ext <<_ACEOF
7629/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007630$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007631 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007632int
7633main ()
7634{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007635static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007636test_array [0] = 0
7637
7638 ;
7639 return 0;
7640}
7641_ACEOF
7642rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007643if { (ac_try="$ac_compile"
7644case "(($ac_try" in
7645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7646 *) ac_try_echo=$ac_try;;
7647esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007649 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007651 grep -v '^ *+' conftest.er1 >conftest.err
7652 rm -f conftest.er1
7653 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007655 (exit $ac_status); } && {
7656 test -z "$ac_c_werror_flag" ||
7657 test ! -s conftest.err
7658 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007659 ac_hi=$ac_mid; break
7660else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007662sed 's/^/| /' conftest.$ac_ext >&5
7663
Martin v. Löwiseba40652007-08-30 20:10:57 +00007664 ac_lo=`expr $ac_mid + 1`
7665 if test $ac_lo -le $ac_mid; then
7666 ac_lo= ac_hi=
7667 break
7668 fi
7669 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007670fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007671
7672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007673 done
7674else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007676sed 's/^/| /' conftest.$ac_ext >&5
7677
Martin v. Löwiseba40652007-08-30 20:10:57 +00007678 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007679/* confdefs.h. */
7680_ACEOF
7681cat confdefs.h >>conftest.$ac_ext
7682cat >>conftest.$ac_ext <<_ACEOF
7683/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007684$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007685 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007686int
7687main ()
7688{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007689static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007690test_array [0] = 0
7691
7692 ;
7693 return 0;
7694}
7695_ACEOF
7696rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007697if { (ac_try="$ac_compile"
7698case "(($ac_try" in
7699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7700 *) ac_try_echo=$ac_try;;
7701esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007703 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007705 grep -v '^ *+' conftest.er1 >conftest.err
7706 rm -f conftest.er1
7707 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007709 (exit $ac_status); } && {
7710 test -z "$ac_c_werror_flag" ||
7711 test ! -s conftest.err
7712 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007713 ac_hi=-1 ac_mid=-1
7714 while :; do
7715 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007716/* confdefs.h. */
7717_ACEOF
7718cat confdefs.h >>conftest.$ac_ext
7719cat >>conftest.$ac_ext <<_ACEOF
7720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007721$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007722 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007723int
7724main ()
7725{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007726static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007727test_array [0] = 0
7728
7729 ;
7730 return 0;
7731}
7732_ACEOF
7733rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007734if { (ac_try="$ac_compile"
7735case "(($ac_try" in
7736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7737 *) ac_try_echo=$ac_try;;
7738esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007740 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007742 grep -v '^ *+' conftest.er1 >conftest.err
7743 rm -f conftest.er1
7744 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007746 (exit $ac_status); } && {
7747 test -z "$ac_c_werror_flag" ||
7748 test ! -s conftest.err
7749 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007750 ac_lo=$ac_mid; break
7751else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007753sed 's/^/| /' conftest.$ac_ext >&5
7754
Martin v. Löwiseba40652007-08-30 20:10:57 +00007755 ac_hi=`expr '(' $ac_mid ')' - 1`
7756 if test $ac_mid -le $ac_hi; then
7757 ac_lo= ac_hi=
7758 break
7759 fi
7760 ac_mid=`expr 2 '*' $ac_mid`
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 +00007764 done
7765else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007767sed 's/^/| /' conftest.$ac_ext >&5
7768
Martin v. Löwiseba40652007-08-30 20:10:57 +00007769 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007770fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007771
7772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007773fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007774
7775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007776# Binary search between lo and hi bounds.
7777while test "x$ac_lo" != "x$ac_hi"; do
7778 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7779 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007780/* confdefs.h. */
7781_ACEOF
7782cat confdefs.h >>conftest.$ac_ext
7783cat >>conftest.$ac_ext <<_ACEOF
7784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007785$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007786 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007787int
7788main ()
7789{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007790static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007791test_array [0] = 0
7792
7793 ;
7794 return 0;
7795}
7796_ACEOF
7797rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007798if { (ac_try="$ac_compile"
7799case "(($ac_try" in
7800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7801 *) ac_try_echo=$ac_try;;
7802esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007804 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007806 grep -v '^ *+' conftest.er1 >conftest.err
7807 rm -f conftest.er1
7808 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007810 (exit $ac_status); } && {
7811 test -z "$ac_c_werror_flag" ||
7812 test ! -s conftest.err
7813 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007814 ac_hi=$ac_mid
7815else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007817sed 's/^/| /' conftest.$ac_ext >&5
7818
Martin v. Löwiseba40652007-08-30 20:10:57 +00007819 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007821
7822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007823done
7824case $ac_lo in
7825?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007826'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007827 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007828See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007829echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007830See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007831 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007832 else
7833 ac_cv_sizeof_int=0
7834 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007835esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007836else
Martin v. Löwis11437992002-04-12 09:54:03 +00007837 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007838/* confdefs.h. */
7839_ACEOF
7840cat confdefs.h >>conftest.$ac_ext
7841cat >>conftest.$ac_ext <<_ACEOF
7842/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007843$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007844 typedef int ac__type_sizeof_;
7845static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7846static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007847#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007848#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007849int
7850main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007851{
Martin v. Löwis11437992002-04-12 09:54:03 +00007852
7853 FILE *f = fopen ("conftest.val", "w");
7854 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007855 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007856 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007857 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007858 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007859 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007860 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007861 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 }
7863 else
7864 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007865 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007866 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007867 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007868 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007869 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007870 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007871
7872 ;
7873 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007874}
Martin v. Löwis11437992002-04-12 09:54:03 +00007875_ACEOF
7876rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007877if { (ac_try="$ac_link"
7878case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007887 { (case "(($ac_try" in
7888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7889 *) ac_try_echo=$ac_try;;
7890esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007892 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007893 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007895 (exit $ac_status); }; }; then
7896 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007897else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007898 echo "$as_me: program exited with status $ac_status" >&5
7899echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007900sed 's/^/| /' conftest.$ac_ext >&5
7901
Martin v. Löwis11437992002-04-12 09:54:03 +00007902( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007903if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007904 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007905See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007906echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007907See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007908 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007909 else
7910 ac_cv_sizeof_int=0
7911 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007912fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007913rm -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 +00007914fi
7915rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007916fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007917{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7918echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007919
7920
7921
Martin v. Löwis11437992002-04-12 09:54:03 +00007922cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007923#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007924_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007925
7926
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007927{ echo "$as_me:$LINENO: checking for long" >&5
7928echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7929if test "${ac_cv_type_long+set}" = set; then
7930 echo $ECHO_N "(cached) $ECHO_C" >&6
7931else
7932 cat >conftest.$ac_ext <<_ACEOF
7933/* confdefs.h. */
7934_ACEOF
7935cat confdefs.h >>conftest.$ac_ext
7936cat >>conftest.$ac_ext <<_ACEOF
7937/* end confdefs.h. */
7938$ac_includes_default
7939typedef long ac__type_new_;
7940int
7941main ()
7942{
7943if ((ac__type_new_ *) 0)
7944 return 0;
7945if (sizeof (ac__type_new_))
7946 return 0;
7947 ;
7948 return 0;
7949}
7950_ACEOF
7951rm -f conftest.$ac_objext
7952if { (ac_try="$ac_compile"
7953case "(($ac_try" in
7954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7955 *) ac_try_echo=$ac_try;;
7956esac
7957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7958 (eval "$ac_compile") 2>conftest.er1
7959 ac_status=$?
7960 grep -v '^ *+' conftest.er1 >conftest.err
7961 rm -f conftest.er1
7962 cat conftest.err >&5
7963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7964 (exit $ac_status); } && {
7965 test -z "$ac_c_werror_flag" ||
7966 test ! -s conftest.err
7967 } && test -s conftest.$ac_objext; then
7968 ac_cv_type_long=yes
7969else
7970 echo "$as_me: failed program was:" >&5
7971sed 's/^/| /' conftest.$ac_ext >&5
7972
7973 ac_cv_type_long=no
7974fi
7975
7976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7977fi
7978{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7979echo "${ECHO_T}$ac_cv_type_long" >&6; }
7980
Martin v. Löwiseba40652007-08-30 20:10:57 +00007981# The cast to long int works around a bug in the HP C Compiler
7982# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7983# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7984# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007985{ echo "$as_me:$LINENO: checking size of long" >&5
7986echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007987if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007988 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007989else
Martin v. Löwis11437992002-04-12 09:54:03 +00007990 if test "$cross_compiling" = yes; then
7991 # Depending upon the size, compute the lo and hi bounds.
7992cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007993/* confdefs.h. */
7994_ACEOF
7995cat confdefs.h >>conftest.$ac_ext
7996cat >>conftest.$ac_ext <<_ACEOF
7997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007998$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007999 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008000int
8001main ()
8002{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008003static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008004test_array [0] = 0
8005
8006 ;
8007 return 0;
8008}
8009_ACEOF
8010rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008011if { (ac_try="$ac_compile"
8012case "(($ac_try" in
8013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8014 *) ac_try_echo=$ac_try;;
8015esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008017 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008019 grep -v '^ *+' conftest.er1 >conftest.err
8020 rm -f conftest.er1
8021 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008023 (exit $ac_status); } && {
8024 test -z "$ac_c_werror_flag" ||
8025 test ! -s conftest.err
8026 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008027 ac_lo=0 ac_mid=0
8028 while :; do
8029 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008030/* confdefs.h. */
8031_ACEOF
8032cat confdefs.h >>conftest.$ac_ext
8033cat >>conftest.$ac_ext <<_ACEOF
8034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008035$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008036 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008037int
8038main ()
8039{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008040static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008041test_array [0] = 0
8042
8043 ;
8044 return 0;
8045}
8046_ACEOF
8047rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008048if { (ac_try="$ac_compile"
8049case "(($ac_try" in
8050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8051 *) ac_try_echo=$ac_try;;
8052esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008054 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008056 grep -v '^ *+' conftest.er1 >conftest.err
8057 rm -f conftest.er1
8058 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008060 (exit $ac_status); } && {
8061 test -z "$ac_c_werror_flag" ||
8062 test ! -s conftest.err
8063 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008064 ac_hi=$ac_mid; break
8065else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008066 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008067sed 's/^/| /' conftest.$ac_ext >&5
8068
Martin v. Löwiseba40652007-08-30 20:10:57 +00008069 ac_lo=`expr $ac_mid + 1`
8070 if test $ac_lo -le $ac_mid; then
8071 ac_lo= ac_hi=
8072 break
8073 fi
8074 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008075fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008076
8077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008078 done
8079else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008081sed 's/^/| /' conftest.$ac_ext >&5
8082
Martin v. Löwiseba40652007-08-30 20:10:57 +00008083 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008084/* confdefs.h. */
8085_ACEOF
8086cat confdefs.h >>conftest.$ac_ext
8087cat >>conftest.$ac_ext <<_ACEOF
8088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008089$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008090 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008091int
8092main ()
8093{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008094static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008095test_array [0] = 0
8096
8097 ;
8098 return 0;
8099}
8100_ACEOF
8101rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008102if { (ac_try="$ac_compile"
8103case "(($ac_try" in
8104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8105 *) ac_try_echo=$ac_try;;
8106esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008108 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008110 grep -v '^ *+' conftest.er1 >conftest.err
8111 rm -f conftest.er1
8112 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008114 (exit $ac_status); } && {
8115 test -z "$ac_c_werror_flag" ||
8116 test ! -s conftest.err
8117 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008118 ac_hi=-1 ac_mid=-1
8119 while :; do
8120 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008121/* confdefs.h. */
8122_ACEOF
8123cat confdefs.h >>conftest.$ac_ext
8124cat >>conftest.$ac_ext <<_ACEOF
8125/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008126$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008127 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008128int
8129main ()
8130{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008131static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008132test_array [0] = 0
8133
8134 ;
8135 return 0;
8136}
8137_ACEOF
8138rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008139if { (ac_try="$ac_compile"
8140case "(($ac_try" in
8141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8142 *) ac_try_echo=$ac_try;;
8143esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008145 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008147 grep -v '^ *+' conftest.er1 >conftest.err
8148 rm -f conftest.er1
8149 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008151 (exit $ac_status); } && {
8152 test -z "$ac_c_werror_flag" ||
8153 test ! -s conftest.err
8154 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008155 ac_lo=$ac_mid; break
8156else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008158sed 's/^/| /' conftest.$ac_ext >&5
8159
Martin v. Löwiseba40652007-08-30 20:10:57 +00008160 ac_hi=`expr '(' $ac_mid ')' - 1`
8161 if test $ac_mid -le $ac_hi; then
8162 ac_lo= ac_hi=
8163 break
8164 fi
8165 ac_mid=`expr 2 '*' $ac_mid`
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 +00008169 done
8170else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008172sed 's/^/| /' conftest.$ac_ext >&5
8173
Martin v. Löwiseba40652007-08-30 20:10:57 +00008174 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008176
8177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008178fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008179
8180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008181# Binary search between lo and hi bounds.
8182while test "x$ac_lo" != "x$ac_hi"; do
8183 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008185/* confdefs.h. */
8186_ACEOF
8187cat confdefs.h >>conftest.$ac_ext
8188cat >>conftest.$ac_ext <<_ACEOF
8189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008190$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008191 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008192int
8193main ()
8194{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008195static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008196test_array [0] = 0
8197
8198 ;
8199 return 0;
8200}
8201_ACEOF
8202rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008203if { (ac_try="$ac_compile"
8204case "(($ac_try" in
8205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8206 *) ac_try_echo=$ac_try;;
8207esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008209 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008211 grep -v '^ *+' conftest.er1 >conftest.err
8212 rm -f conftest.er1
8213 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008215 (exit $ac_status); } && {
8216 test -z "$ac_c_werror_flag" ||
8217 test ! -s conftest.err
8218 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008219 ac_hi=$ac_mid
8220else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008222sed 's/^/| /' conftest.$ac_ext >&5
8223
Martin v. Löwiseba40652007-08-30 20:10:57 +00008224 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008226
8227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008228done
8229case $ac_lo in
8230?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008231'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008232 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008233See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008234echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008235See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008236 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008237 else
8238 ac_cv_sizeof_long=0
8239 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008240esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008241else
Martin v. Löwis11437992002-04-12 09:54:03 +00008242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008243/* confdefs.h. */
8244_ACEOF
8245cat confdefs.h >>conftest.$ac_ext
8246cat >>conftest.$ac_ext <<_ACEOF
8247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008248$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008249 typedef long ac__type_sizeof_;
8250static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8251static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008252#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008253#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008254int
8255main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008256{
Martin v. Löwis11437992002-04-12 09:54:03 +00008257
8258 FILE *f = fopen ("conftest.val", "w");
8259 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008260 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008261 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008262 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008263 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008264 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008265 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008266 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008267 }
8268 else
8269 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008270 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008271 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008272 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008273 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008274 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008275 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008276
8277 ;
8278 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008279}
Martin v. Löwis11437992002-04-12 09:54:03 +00008280_ACEOF
8281rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008282if { (ac_try="$ac_link"
8283case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008292 { (case "(($ac_try" in
8293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8294 *) ac_try_echo=$ac_try;;
8295esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008297 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008298 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008300 (exit $ac_status); }; }; then
8301 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008302else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008303 echo "$as_me: program exited with status $ac_status" >&5
8304echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008305sed 's/^/| /' conftest.$ac_ext >&5
8306
Martin v. Löwis11437992002-04-12 09:54:03 +00008307( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008308if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008309 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008310See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008311echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008312See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008313 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008314 else
8315 ac_cv_sizeof_long=0
8316 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008318rm -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 +00008319fi
8320rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008321fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008322{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8323echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008324
8325
8326
Martin v. Löwis11437992002-04-12 09:54:03 +00008327cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008328#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008329_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008330
8331
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008332{ echo "$as_me:$LINENO: checking for void *" >&5
8333echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8334if test "${ac_cv_type_void_p+set}" = set; then
8335 echo $ECHO_N "(cached) $ECHO_C" >&6
8336else
8337 cat >conftest.$ac_ext <<_ACEOF
8338/* confdefs.h. */
8339_ACEOF
8340cat confdefs.h >>conftest.$ac_ext
8341cat >>conftest.$ac_ext <<_ACEOF
8342/* end confdefs.h. */
8343$ac_includes_default
8344typedef void * ac__type_new_;
8345int
8346main ()
8347{
8348if ((ac__type_new_ *) 0)
8349 return 0;
8350if (sizeof (ac__type_new_))
8351 return 0;
8352 ;
8353 return 0;
8354}
8355_ACEOF
8356rm -f conftest.$ac_objext
8357if { (ac_try="$ac_compile"
8358case "(($ac_try" in
8359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8360 *) ac_try_echo=$ac_try;;
8361esac
8362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8363 (eval "$ac_compile") 2>conftest.er1
8364 ac_status=$?
8365 grep -v '^ *+' conftest.er1 >conftest.err
8366 rm -f conftest.er1
8367 cat conftest.err >&5
8368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8369 (exit $ac_status); } && {
8370 test -z "$ac_c_werror_flag" ||
8371 test ! -s conftest.err
8372 } && test -s conftest.$ac_objext; then
8373 ac_cv_type_void_p=yes
8374else
8375 echo "$as_me: failed program was:" >&5
8376sed 's/^/| /' conftest.$ac_ext >&5
8377
8378 ac_cv_type_void_p=no
8379fi
8380
8381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8382fi
8383{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8384echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8385
Martin v. Löwiseba40652007-08-30 20:10:57 +00008386# The cast to long int works around a bug in the HP C Compiler
8387# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8388# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8389# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008390{ echo "$as_me:$LINENO: checking size of void *" >&5
8391echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008392if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008393 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008394else
Martin v. Löwis11437992002-04-12 09:54:03 +00008395 if test "$cross_compiling" = yes; then
8396 # Depending upon the size, compute the lo and hi bounds.
8397cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008398/* confdefs.h. */
8399_ACEOF
8400cat confdefs.h >>conftest.$ac_ext
8401cat >>conftest.$ac_ext <<_ACEOF
8402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008403$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008404 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008405int
8406main ()
8407{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008408static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008409test_array [0] = 0
8410
8411 ;
8412 return 0;
8413}
8414_ACEOF
8415rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008416if { (ac_try="$ac_compile"
8417case "(($ac_try" in
8418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8419 *) ac_try_echo=$ac_try;;
8420esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008422 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008423 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008424 grep -v '^ *+' conftest.er1 >conftest.err
8425 rm -f conftest.er1
8426 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008428 (exit $ac_status); } && {
8429 test -z "$ac_c_werror_flag" ||
8430 test ! -s conftest.err
8431 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008432 ac_lo=0 ac_mid=0
8433 while :; do
8434 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008435/* confdefs.h. */
8436_ACEOF
8437cat confdefs.h >>conftest.$ac_ext
8438cat >>conftest.$ac_ext <<_ACEOF
8439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008440$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008441 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008442int
8443main ()
8444{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008445static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008446test_array [0] = 0
8447
8448 ;
8449 return 0;
8450}
8451_ACEOF
8452rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008453if { (ac_try="$ac_compile"
8454case "(($ac_try" in
8455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8456 *) ac_try_echo=$ac_try;;
8457esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008459 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008460 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008461 grep -v '^ *+' conftest.er1 >conftest.err
8462 rm -f conftest.er1
8463 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008465 (exit $ac_status); } && {
8466 test -z "$ac_c_werror_flag" ||
8467 test ! -s conftest.err
8468 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008469 ac_hi=$ac_mid; break
8470else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008472sed 's/^/| /' conftest.$ac_ext >&5
8473
Martin v. Löwiseba40652007-08-30 20:10:57 +00008474 ac_lo=`expr $ac_mid + 1`
8475 if test $ac_lo -le $ac_mid; then
8476 ac_lo= ac_hi=
8477 break
8478 fi
8479 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008480fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008481
8482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008483 done
8484else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008486sed 's/^/| /' conftest.$ac_ext >&5
8487
Martin v. Löwiseba40652007-08-30 20:10:57 +00008488 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008489/* confdefs.h. */
8490_ACEOF
8491cat confdefs.h >>conftest.$ac_ext
8492cat >>conftest.$ac_ext <<_ACEOF
8493/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008494$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008495 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008496int
8497main ()
8498{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008499static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008500test_array [0] = 0
8501
8502 ;
8503 return 0;
8504}
8505_ACEOF
8506rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008507if { (ac_try="$ac_compile"
8508case "(($ac_try" in
8509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8510 *) ac_try_echo=$ac_try;;
8511esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008513 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008515 grep -v '^ *+' conftest.er1 >conftest.err
8516 rm -f conftest.er1
8517 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008519 (exit $ac_status); } && {
8520 test -z "$ac_c_werror_flag" ||
8521 test ! -s conftest.err
8522 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008523 ac_hi=-1 ac_mid=-1
8524 while :; do
8525 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008526/* confdefs.h. */
8527_ACEOF
8528cat confdefs.h >>conftest.$ac_ext
8529cat >>conftest.$ac_ext <<_ACEOF
8530/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008531$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008532 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008533int
8534main ()
8535{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008536static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008537test_array [0] = 0
8538
8539 ;
8540 return 0;
8541}
8542_ACEOF
8543rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008544if { (ac_try="$ac_compile"
8545case "(($ac_try" in
8546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8547 *) ac_try_echo=$ac_try;;
8548esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008550 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008551 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008552 grep -v '^ *+' conftest.er1 >conftest.err
8553 rm -f conftest.er1
8554 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008556 (exit $ac_status); } && {
8557 test -z "$ac_c_werror_flag" ||
8558 test ! -s conftest.err
8559 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008560 ac_lo=$ac_mid; break
8561else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008563sed 's/^/| /' conftest.$ac_ext >&5
8564
Martin v. Löwiseba40652007-08-30 20:10:57 +00008565 ac_hi=`expr '(' $ac_mid ')' - 1`
8566 if test $ac_mid -le $ac_hi; then
8567 ac_lo= ac_hi=
8568 break
8569 fi
8570 ac_mid=`expr 2 '*' $ac_mid`
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 +00008574 done
8575else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008577sed 's/^/| /' conftest.$ac_ext >&5
8578
Martin v. Löwiseba40652007-08-30 20:10:57 +00008579 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008580fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008581
8582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008583fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008584
8585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008586# Binary search between lo and hi bounds.
8587while test "x$ac_lo" != "x$ac_hi"; do
8588 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008590/* confdefs.h. */
8591_ACEOF
8592cat confdefs.h >>conftest.$ac_ext
8593cat >>conftest.$ac_ext <<_ACEOF
8594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008595$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008596 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008597int
8598main ()
8599{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008600static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008601test_array [0] = 0
8602
8603 ;
8604 return 0;
8605}
8606_ACEOF
8607rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008608if { (ac_try="$ac_compile"
8609case "(($ac_try" in
8610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8611 *) ac_try_echo=$ac_try;;
8612esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008616 grep -v '^ *+' conftest.er1 >conftest.err
8617 rm -f conftest.er1
8618 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008620 (exit $ac_status); } && {
8621 test -z "$ac_c_werror_flag" ||
8622 test ! -s conftest.err
8623 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 ac_hi=$ac_mid
8625else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008627sed 's/^/| /' conftest.$ac_ext >&5
8628
Martin v. Löwiseba40652007-08-30 20:10:57 +00008629 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008631
8632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008633done
8634case $ac_lo in
8635?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008636'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008637 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008638See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008639echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008640See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008641 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008642 else
8643 ac_cv_sizeof_void_p=0
8644 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008645esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008646else
Martin v. Löwis11437992002-04-12 09:54:03 +00008647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008648/* confdefs.h. */
8649_ACEOF
8650cat confdefs.h >>conftest.$ac_ext
8651cat >>conftest.$ac_ext <<_ACEOF
8652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008653$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008654 typedef void * ac__type_sizeof_;
8655static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8656static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008657#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008658#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008659int
8660main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008661{
Martin v. Löwis11437992002-04-12 09:54:03 +00008662
8663 FILE *f = fopen ("conftest.val", "w");
8664 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008665 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008666 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008667 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008668 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008669 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008670 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008671 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008672 }
8673 else
8674 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008675 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008676 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008677 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008678 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008679 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008680 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008681
8682 ;
8683 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008684}
Martin v. Löwis11437992002-04-12 09:54:03 +00008685_ACEOF
8686rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008687if { (ac_try="$ac_link"
8688case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008697 { (case "(($ac_try" in
8698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8699 *) ac_try_echo=$ac_try;;
8700esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008702 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008703 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 (exit $ac_status); }; }; then
8706 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008707else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008708 echo "$as_me: program exited with status $ac_status" >&5
8709echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008710sed 's/^/| /' conftest.$ac_ext >&5
8711
Martin v. Löwis11437992002-04-12 09:54:03 +00008712( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008713if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008714 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008715See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008716echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008717See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008718 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008719 else
8720 ac_cv_sizeof_void_p=0
8721 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008723rm -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 +00008724fi
8725rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008726fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008727{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8728echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008729
8730
8731
Martin v. Löwis11437992002-04-12 09:54:03 +00008732cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008733#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008734_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008735
8736
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008737{ echo "$as_me:$LINENO: checking for short" >&5
8738echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8739if test "${ac_cv_type_short+set}" = set; then
8740 echo $ECHO_N "(cached) $ECHO_C" >&6
8741else
8742 cat >conftest.$ac_ext <<_ACEOF
8743/* confdefs.h. */
8744_ACEOF
8745cat confdefs.h >>conftest.$ac_ext
8746cat >>conftest.$ac_ext <<_ACEOF
8747/* end confdefs.h. */
8748$ac_includes_default
8749typedef short ac__type_new_;
8750int
8751main ()
8752{
8753if ((ac__type_new_ *) 0)
8754 return 0;
8755if (sizeof (ac__type_new_))
8756 return 0;
8757 ;
8758 return 0;
8759}
8760_ACEOF
8761rm -f conftest.$ac_objext
8762if { (ac_try="$ac_compile"
8763case "(($ac_try" in
8764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8765 *) ac_try_echo=$ac_try;;
8766esac
8767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8768 (eval "$ac_compile") 2>conftest.er1
8769 ac_status=$?
8770 grep -v '^ *+' conftest.er1 >conftest.err
8771 rm -f conftest.er1
8772 cat conftest.err >&5
8773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8774 (exit $ac_status); } && {
8775 test -z "$ac_c_werror_flag" ||
8776 test ! -s conftest.err
8777 } && test -s conftest.$ac_objext; then
8778 ac_cv_type_short=yes
8779else
8780 echo "$as_me: failed program was:" >&5
8781sed 's/^/| /' conftest.$ac_ext >&5
8782
8783 ac_cv_type_short=no
8784fi
8785
8786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8787fi
8788{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8789echo "${ECHO_T}$ac_cv_type_short" >&6; }
8790
Martin v. Löwiseba40652007-08-30 20:10:57 +00008791# The cast to long int works around a bug in the HP C Compiler
8792# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8793# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8794# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008795{ echo "$as_me:$LINENO: checking size of short" >&5
8796echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008797if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008798 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008799else
Martin v. Löwis11437992002-04-12 09:54:03 +00008800 if test "$cross_compiling" = yes; then
8801 # Depending upon the size, compute the lo and hi bounds.
8802cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008803/* confdefs.h. */
8804_ACEOF
8805cat confdefs.h >>conftest.$ac_ext
8806cat >>conftest.$ac_ext <<_ACEOF
8807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008808$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008809 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008810int
8811main ()
8812{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008813static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008814test_array [0] = 0
8815
8816 ;
8817 return 0;
8818}
8819_ACEOF
8820rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008821if { (ac_try="$ac_compile"
8822case "(($ac_try" in
8823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8824 *) ac_try_echo=$ac_try;;
8825esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008827 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008828 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008829 grep -v '^ *+' conftest.er1 >conftest.err
8830 rm -f conftest.er1
8831 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008833 (exit $ac_status); } && {
8834 test -z "$ac_c_werror_flag" ||
8835 test ! -s conftest.err
8836 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008837 ac_lo=0 ac_mid=0
8838 while :; do
8839 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008840/* confdefs.h. */
8841_ACEOF
8842cat confdefs.h >>conftest.$ac_ext
8843cat >>conftest.$ac_ext <<_ACEOF
8844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008845$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008846 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008847int
8848main ()
8849{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008850static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008851test_array [0] = 0
8852
8853 ;
8854 return 0;
8855}
8856_ACEOF
8857rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008858if { (ac_try="$ac_compile"
8859case "(($ac_try" in
8860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8861 *) ac_try_echo=$ac_try;;
8862esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008864 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008865 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008866 grep -v '^ *+' conftest.er1 >conftest.err
8867 rm -f conftest.er1
8868 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008870 (exit $ac_status); } && {
8871 test -z "$ac_c_werror_flag" ||
8872 test ! -s conftest.err
8873 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008874 ac_hi=$ac_mid; break
8875else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008877sed 's/^/| /' conftest.$ac_ext >&5
8878
Martin v. Löwiseba40652007-08-30 20:10:57 +00008879 ac_lo=`expr $ac_mid + 1`
8880 if test $ac_lo -le $ac_mid; then
8881 ac_lo= ac_hi=
8882 break
8883 fi
8884 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008885fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008886
8887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008888 done
8889else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008891sed 's/^/| /' conftest.$ac_ext >&5
8892
Martin v. Löwiseba40652007-08-30 20:10:57 +00008893 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008894/* confdefs.h. */
8895_ACEOF
8896cat confdefs.h >>conftest.$ac_ext
8897cat >>conftest.$ac_ext <<_ACEOF
8898/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008899$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008900 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008901int
8902main ()
8903{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008904static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008905test_array [0] = 0
8906
8907 ;
8908 return 0;
8909}
8910_ACEOF
8911rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008912if { (ac_try="$ac_compile"
8913case "(($ac_try" in
8914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8915 *) ac_try_echo=$ac_try;;
8916esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008918 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008920 grep -v '^ *+' conftest.er1 >conftest.err
8921 rm -f conftest.er1
8922 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008924 (exit $ac_status); } && {
8925 test -z "$ac_c_werror_flag" ||
8926 test ! -s conftest.err
8927 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008928 ac_hi=-1 ac_mid=-1
8929 while :; do
8930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008931/* confdefs.h. */
8932_ACEOF
8933cat confdefs.h >>conftest.$ac_ext
8934cat >>conftest.$ac_ext <<_ACEOF
8935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008936$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008937 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008938int
8939main ()
8940{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008941static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008942test_array [0] = 0
8943
8944 ;
8945 return 0;
8946}
8947_ACEOF
8948rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008949if { (ac_try="$ac_compile"
8950case "(($ac_try" in
8951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8952 *) ac_try_echo=$ac_try;;
8953esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008955 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008957 grep -v '^ *+' conftest.er1 >conftest.err
8958 rm -f conftest.er1
8959 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008961 (exit $ac_status); } && {
8962 test -z "$ac_c_werror_flag" ||
8963 test ! -s conftest.err
8964 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008965 ac_lo=$ac_mid; break
8966else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008968sed 's/^/| /' conftest.$ac_ext >&5
8969
Martin v. Löwiseba40652007-08-30 20:10:57 +00008970 ac_hi=`expr '(' $ac_mid ')' - 1`
8971 if test $ac_mid -le $ac_hi; then
8972 ac_lo= ac_hi=
8973 break
8974 fi
8975 ac_mid=`expr 2 '*' $ac_mid`
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 +00008979 done
8980else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008982sed 's/^/| /' conftest.$ac_ext >&5
8983
Martin v. Löwiseba40652007-08-30 20:10:57 +00008984 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008985fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008986
8987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008988fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008989
8990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008991# Binary search between lo and hi bounds.
8992while test "x$ac_lo" != "x$ac_hi"; do
8993 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008995/* confdefs.h. */
8996_ACEOF
8997cat confdefs.h >>conftest.$ac_ext
8998cat >>conftest.$ac_ext <<_ACEOF
8999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009000$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009001 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009002int
9003main ()
9004{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009005static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009006test_array [0] = 0
9007
9008 ;
9009 return 0;
9010}
9011_ACEOF
9012rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009013if { (ac_try="$ac_compile"
9014case "(($ac_try" in
9015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9016 *) ac_try_echo=$ac_try;;
9017esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009019 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009021 grep -v '^ *+' conftest.er1 >conftest.err
9022 rm -f conftest.er1
9023 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009025 (exit $ac_status); } && {
9026 test -z "$ac_c_werror_flag" ||
9027 test ! -s conftest.err
9028 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009029 ac_hi=$ac_mid
9030else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009032sed 's/^/| /' conftest.$ac_ext >&5
9033
Martin v. Löwiseba40652007-08-30 20:10:57 +00009034 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009035fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009036
9037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009038done
9039case $ac_lo in
9040?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009041'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009042 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009043See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009044echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009045See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009046 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009047 else
9048 ac_cv_sizeof_short=0
9049 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009050esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009051else
Martin v. Löwis11437992002-04-12 09:54:03 +00009052 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009053/* confdefs.h. */
9054_ACEOF
9055cat confdefs.h >>conftest.$ac_ext
9056cat >>conftest.$ac_ext <<_ACEOF
9057/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009058$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009059 typedef short ac__type_sizeof_;
9060static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9061static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009062#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009063#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009064int
9065main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009066{
Martin v. Löwis11437992002-04-12 09:54:03 +00009067
9068 FILE *f = fopen ("conftest.val", "w");
9069 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009070 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009071 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009072 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009073 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009074 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009075 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009076 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009077 }
9078 else
9079 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009080 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009081 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009082 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009083 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009084 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009085 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009086
9087 ;
9088 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009089}
Martin v. Löwis11437992002-04-12 09:54:03 +00009090_ACEOF
9091rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009092if { (ac_try="$ac_link"
9093case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009102 { (case "(($ac_try" in
9103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9104 *) ac_try_echo=$ac_try;;
9105esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009107 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009108 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009110 (exit $ac_status); }; }; then
9111 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009112else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009113 echo "$as_me: program exited with status $ac_status" >&5
9114echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009115sed 's/^/| /' conftest.$ac_ext >&5
9116
Martin v. Löwis11437992002-04-12 09:54:03 +00009117( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009118if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009119 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009120See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009121echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009122See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009123 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009124 else
9125 ac_cv_sizeof_short=0
9126 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009128rm -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 +00009129fi
9130rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009131fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009132{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9133echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009134
9135
9136
Martin v. Löwis11437992002-04-12 09:54:03 +00009137cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009138#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009139_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009140
9141
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009142{ echo "$as_me:$LINENO: checking for float" >&5
9143echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9144if test "${ac_cv_type_float+set}" = set; then
9145 echo $ECHO_N "(cached) $ECHO_C" >&6
9146else
9147 cat >conftest.$ac_ext <<_ACEOF
9148/* confdefs.h. */
9149_ACEOF
9150cat confdefs.h >>conftest.$ac_ext
9151cat >>conftest.$ac_ext <<_ACEOF
9152/* end confdefs.h. */
9153$ac_includes_default
9154typedef float ac__type_new_;
9155int
9156main ()
9157{
9158if ((ac__type_new_ *) 0)
9159 return 0;
9160if (sizeof (ac__type_new_))
9161 return 0;
9162 ;
9163 return 0;
9164}
9165_ACEOF
9166rm -f conftest.$ac_objext
9167if { (ac_try="$ac_compile"
9168case "(($ac_try" in
9169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9170 *) ac_try_echo=$ac_try;;
9171esac
9172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9173 (eval "$ac_compile") 2>conftest.er1
9174 ac_status=$?
9175 grep -v '^ *+' conftest.er1 >conftest.err
9176 rm -f conftest.er1
9177 cat conftest.err >&5
9178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9179 (exit $ac_status); } && {
9180 test -z "$ac_c_werror_flag" ||
9181 test ! -s conftest.err
9182 } && test -s conftest.$ac_objext; then
9183 ac_cv_type_float=yes
9184else
9185 echo "$as_me: failed program was:" >&5
9186sed 's/^/| /' conftest.$ac_ext >&5
9187
9188 ac_cv_type_float=no
9189fi
9190
9191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9192fi
9193{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9194echo "${ECHO_T}$ac_cv_type_float" >&6; }
9195
Martin v. Löwiseba40652007-08-30 20:10:57 +00009196# The cast to long int works around a bug in the HP C Compiler
9197# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9198# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9199# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009200{ echo "$as_me:$LINENO: checking size of float" >&5
9201echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009202if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009203 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009204else
Martin v. Löwis11437992002-04-12 09:54:03 +00009205 if test "$cross_compiling" = yes; then
9206 # Depending upon the size, compute the lo and hi bounds.
9207cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009208/* confdefs.h. */
9209_ACEOF
9210cat confdefs.h >>conftest.$ac_ext
9211cat >>conftest.$ac_ext <<_ACEOF
9212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009213$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009214 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009215int
9216main ()
9217{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009218static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009219test_array [0] = 0
9220
9221 ;
9222 return 0;
9223}
9224_ACEOF
9225rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009226if { (ac_try="$ac_compile"
9227case "(($ac_try" in
9228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9229 *) ac_try_echo=$ac_try;;
9230esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009232 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009233 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009234 grep -v '^ *+' conftest.er1 >conftest.err
9235 rm -f conftest.er1
9236 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009238 (exit $ac_status); } && {
9239 test -z "$ac_c_werror_flag" ||
9240 test ! -s conftest.err
9241 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009242 ac_lo=0 ac_mid=0
9243 while :; do
9244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009245/* confdefs.h. */
9246_ACEOF
9247cat confdefs.h >>conftest.$ac_ext
9248cat >>conftest.$ac_ext <<_ACEOF
9249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009250$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009251 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009252int
9253main ()
9254{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009255static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009256test_array [0] = 0
9257
9258 ;
9259 return 0;
9260}
9261_ACEOF
9262rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009263if { (ac_try="$ac_compile"
9264case "(($ac_try" in
9265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9266 *) ac_try_echo=$ac_try;;
9267esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009269 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009270 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009271 grep -v '^ *+' conftest.er1 >conftest.err
9272 rm -f conftest.er1
9273 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009275 (exit $ac_status); } && {
9276 test -z "$ac_c_werror_flag" ||
9277 test ! -s conftest.err
9278 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009279 ac_hi=$ac_mid; break
9280else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009281 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009282sed 's/^/| /' conftest.$ac_ext >&5
9283
Martin v. Löwiseba40652007-08-30 20:10:57 +00009284 ac_lo=`expr $ac_mid + 1`
9285 if test $ac_lo -le $ac_mid; then
9286 ac_lo= ac_hi=
9287 break
9288 fi
9289 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009291
9292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009293 done
9294else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009296sed 's/^/| /' conftest.$ac_ext >&5
9297
Martin v. Löwiseba40652007-08-30 20:10:57 +00009298 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009299/* confdefs.h. */
9300_ACEOF
9301cat confdefs.h >>conftest.$ac_ext
9302cat >>conftest.$ac_ext <<_ACEOF
9303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009304$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009305 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009306int
9307main ()
9308{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009309static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009310test_array [0] = 0
9311
9312 ;
9313 return 0;
9314}
9315_ACEOF
9316rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009317if { (ac_try="$ac_compile"
9318case "(($ac_try" in
9319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9320 *) ac_try_echo=$ac_try;;
9321esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009323 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009325 grep -v '^ *+' conftest.er1 >conftest.err
9326 rm -f conftest.er1
9327 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009329 (exit $ac_status); } && {
9330 test -z "$ac_c_werror_flag" ||
9331 test ! -s conftest.err
9332 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009333 ac_hi=-1 ac_mid=-1
9334 while :; do
9335 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009336/* confdefs.h. */
9337_ACEOF
9338cat confdefs.h >>conftest.$ac_ext
9339cat >>conftest.$ac_ext <<_ACEOF
9340/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009341$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009342 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009343int
9344main ()
9345{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009346static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009347test_array [0] = 0
9348
9349 ;
9350 return 0;
9351}
9352_ACEOF
9353rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009354if { (ac_try="$ac_compile"
9355case "(($ac_try" in
9356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9357 *) ac_try_echo=$ac_try;;
9358esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009360 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009362 grep -v '^ *+' conftest.er1 >conftest.err
9363 rm -f conftest.er1
9364 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009366 (exit $ac_status); } && {
9367 test -z "$ac_c_werror_flag" ||
9368 test ! -s conftest.err
9369 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009370 ac_lo=$ac_mid; break
9371else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009373sed 's/^/| /' conftest.$ac_ext >&5
9374
Martin v. Löwiseba40652007-08-30 20:10:57 +00009375 ac_hi=`expr '(' $ac_mid ')' - 1`
9376 if test $ac_mid -le $ac_hi; then
9377 ac_lo= ac_hi=
9378 break
9379 fi
9380 ac_mid=`expr 2 '*' $ac_mid`
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 +00009384 done
9385else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009386 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009387sed 's/^/| /' conftest.$ac_ext >&5
9388
Martin v. Löwiseba40652007-08-30 20:10:57 +00009389 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009390fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009391
9392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009393fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009394
9395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009396# Binary search between lo and hi bounds.
9397while test "x$ac_lo" != "x$ac_hi"; do
9398 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9399 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009400/* confdefs.h. */
9401_ACEOF
9402cat confdefs.h >>conftest.$ac_ext
9403cat >>conftest.$ac_ext <<_ACEOF
9404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009405$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009406 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009407int
9408main ()
9409{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009410static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009411test_array [0] = 0
9412
9413 ;
9414 return 0;
9415}
9416_ACEOF
9417rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009418if { (ac_try="$ac_compile"
9419case "(($ac_try" in
9420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9421 *) ac_try_echo=$ac_try;;
9422esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009424 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009426 grep -v '^ *+' conftest.er1 >conftest.err
9427 rm -f conftest.er1
9428 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009430 (exit $ac_status); } && {
9431 test -z "$ac_c_werror_flag" ||
9432 test ! -s conftest.err
9433 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009434 ac_hi=$ac_mid
9435else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009437sed 's/^/| /' conftest.$ac_ext >&5
9438
Martin v. Löwiseba40652007-08-30 20:10:57 +00009439 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009441
9442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009443done
9444case $ac_lo in
9445?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009446'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009447 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009448See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009449echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009450See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009451 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009452 else
9453 ac_cv_sizeof_float=0
9454 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009455esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009456else
Martin v. Löwis11437992002-04-12 09:54:03 +00009457 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009458/* confdefs.h. */
9459_ACEOF
9460cat confdefs.h >>conftest.$ac_ext
9461cat >>conftest.$ac_ext <<_ACEOF
9462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009463$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009464 typedef float ac__type_sizeof_;
9465static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9466static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009467#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009468#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009469int
9470main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009471{
Martin v. Löwis11437992002-04-12 09:54:03 +00009472
9473 FILE *f = fopen ("conftest.val", "w");
9474 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009475 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009476 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009478 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009479 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009480 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009481 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 }
9483 else
9484 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009485 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009486 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009487 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009488 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009489 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009490 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009491
9492 ;
9493 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009494}
Martin v. Löwis11437992002-04-12 09:54:03 +00009495_ACEOF
9496rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009497if { (ac_try="$ac_link"
9498case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009507 { (case "(($ac_try" in
9508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9509 *) ac_try_echo=$ac_try;;
9510esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009512 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009515 (exit $ac_status); }; }; then
9516 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009517else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009518 echo "$as_me: program exited with status $ac_status" >&5
9519echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009520sed 's/^/| /' conftest.$ac_ext >&5
9521
Martin v. Löwis11437992002-04-12 09:54:03 +00009522( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009523if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009524 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009525See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009526echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009527See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009528 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009529 else
9530 ac_cv_sizeof_float=0
9531 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009532fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009533rm -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 +00009534fi
9535rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009536fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009537{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9538echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009539
9540
9541
Martin v. Löwis11437992002-04-12 09:54:03 +00009542cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009543#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009544_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009545
9546
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009547{ echo "$as_me:$LINENO: checking for double" >&5
9548echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9549if test "${ac_cv_type_double+set}" = set; then
9550 echo $ECHO_N "(cached) $ECHO_C" >&6
9551else
9552 cat >conftest.$ac_ext <<_ACEOF
9553/* confdefs.h. */
9554_ACEOF
9555cat confdefs.h >>conftest.$ac_ext
9556cat >>conftest.$ac_ext <<_ACEOF
9557/* end confdefs.h. */
9558$ac_includes_default
9559typedef double ac__type_new_;
9560int
9561main ()
9562{
9563if ((ac__type_new_ *) 0)
9564 return 0;
9565if (sizeof (ac__type_new_))
9566 return 0;
9567 ;
9568 return 0;
9569}
9570_ACEOF
9571rm -f conftest.$ac_objext
9572if { (ac_try="$ac_compile"
9573case "(($ac_try" in
9574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9575 *) ac_try_echo=$ac_try;;
9576esac
9577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9578 (eval "$ac_compile") 2>conftest.er1
9579 ac_status=$?
9580 grep -v '^ *+' conftest.er1 >conftest.err
9581 rm -f conftest.er1
9582 cat conftest.err >&5
9583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9584 (exit $ac_status); } && {
9585 test -z "$ac_c_werror_flag" ||
9586 test ! -s conftest.err
9587 } && test -s conftest.$ac_objext; then
9588 ac_cv_type_double=yes
9589else
9590 echo "$as_me: failed program was:" >&5
9591sed 's/^/| /' conftest.$ac_ext >&5
9592
9593 ac_cv_type_double=no
9594fi
9595
9596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9597fi
9598{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9599echo "${ECHO_T}$ac_cv_type_double" >&6; }
9600
Martin v. Löwiseba40652007-08-30 20:10:57 +00009601# The cast to long int works around a bug in the HP C Compiler
9602# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9603# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9604# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009605{ echo "$as_me:$LINENO: checking size of double" >&5
9606echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009607if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009608 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009609else
Martin v. Löwis11437992002-04-12 09:54:03 +00009610 if test "$cross_compiling" = yes; then
9611 # Depending upon the size, compute the lo and hi bounds.
9612cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009613/* confdefs.h. */
9614_ACEOF
9615cat confdefs.h >>conftest.$ac_ext
9616cat >>conftest.$ac_ext <<_ACEOF
9617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009618$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009619 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009620int
9621main ()
9622{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009623static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009624test_array [0] = 0
9625
9626 ;
9627 return 0;
9628}
9629_ACEOF
9630rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009631if { (ac_try="$ac_compile"
9632case "(($ac_try" in
9633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9634 *) ac_try_echo=$ac_try;;
9635esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009637 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009638 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009639 grep -v '^ *+' conftest.er1 >conftest.err
9640 rm -f conftest.er1
9641 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009643 (exit $ac_status); } && {
9644 test -z "$ac_c_werror_flag" ||
9645 test ! -s conftest.err
9646 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009647 ac_lo=0 ac_mid=0
9648 while :; do
9649 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009650/* confdefs.h. */
9651_ACEOF
9652cat confdefs.h >>conftest.$ac_ext
9653cat >>conftest.$ac_ext <<_ACEOF
9654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009655$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009656 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009657int
9658main ()
9659{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009660static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009661test_array [0] = 0
9662
9663 ;
9664 return 0;
9665}
9666_ACEOF
9667rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009668if { (ac_try="$ac_compile"
9669case "(($ac_try" in
9670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9671 *) ac_try_echo=$ac_try;;
9672esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009674 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009676 grep -v '^ *+' conftest.er1 >conftest.err
9677 rm -f conftest.er1
9678 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009680 (exit $ac_status); } && {
9681 test -z "$ac_c_werror_flag" ||
9682 test ! -s conftest.err
9683 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009684 ac_hi=$ac_mid; break
9685else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009687sed 's/^/| /' conftest.$ac_ext >&5
9688
Martin v. Löwiseba40652007-08-30 20:10:57 +00009689 ac_lo=`expr $ac_mid + 1`
9690 if test $ac_lo -le $ac_mid; then
9691 ac_lo= ac_hi=
9692 break
9693 fi
9694 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009696
9697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 done
9699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009701sed 's/^/| /' conftest.$ac_ext >&5
9702
Martin v. Löwiseba40652007-08-30 20:10:57 +00009703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009704/* confdefs.h. */
9705_ACEOF
9706cat confdefs.h >>conftest.$ac_ext
9707cat >>conftest.$ac_ext <<_ACEOF
9708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009709$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009710 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009711int
9712main ()
9713{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009714static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009715test_array [0] = 0
9716
9717 ;
9718 return 0;
9719}
9720_ACEOF
9721rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009722if { (ac_try="$ac_compile"
9723case "(($ac_try" in
9724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9725 *) ac_try_echo=$ac_try;;
9726esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009728 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009730 grep -v '^ *+' conftest.er1 >conftest.err
9731 rm -f conftest.er1
9732 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009734 (exit $ac_status); } && {
9735 test -z "$ac_c_werror_flag" ||
9736 test ! -s conftest.err
9737 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009738 ac_hi=-1 ac_mid=-1
9739 while :; do
9740 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009741/* confdefs.h. */
9742_ACEOF
9743cat confdefs.h >>conftest.$ac_ext
9744cat >>conftest.$ac_ext <<_ACEOF
9745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009746$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009747 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009748int
9749main ()
9750{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009751static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009752test_array [0] = 0
9753
9754 ;
9755 return 0;
9756}
9757_ACEOF
9758rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009759if { (ac_try="$ac_compile"
9760case "(($ac_try" in
9761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9762 *) ac_try_echo=$ac_try;;
9763esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009767 grep -v '^ *+' conftest.er1 >conftest.err
9768 rm -f conftest.er1
9769 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009771 (exit $ac_status); } && {
9772 test -z "$ac_c_werror_flag" ||
9773 test ! -s conftest.err
9774 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009775 ac_lo=$ac_mid; break
9776else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009778sed 's/^/| /' conftest.$ac_ext >&5
9779
Martin v. Löwiseba40652007-08-30 20:10:57 +00009780 ac_hi=`expr '(' $ac_mid ')' - 1`
9781 if test $ac_mid -le $ac_hi; then
9782 ac_lo= ac_hi=
9783 break
9784 fi
9785 ac_mid=`expr 2 '*' $ac_mid`
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 +00009789 done
9790else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009792sed 's/^/| /' conftest.$ac_ext >&5
9793
Martin v. Löwiseba40652007-08-30 20:10:57 +00009794 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009796
9797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009798fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009799
9800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009801# Binary search between lo and hi bounds.
9802while test "x$ac_lo" != "x$ac_hi"; do
9803 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009805/* confdefs.h. */
9806_ACEOF
9807cat confdefs.h >>conftest.$ac_ext
9808cat >>conftest.$ac_ext <<_ACEOF
9809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009810$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009811 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009812int
9813main ()
9814{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009815static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009816test_array [0] = 0
9817
9818 ;
9819 return 0;
9820}
9821_ACEOF
9822rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009823if { (ac_try="$ac_compile"
9824case "(($ac_try" in
9825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9826 *) ac_try_echo=$ac_try;;
9827esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009829 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009831 grep -v '^ *+' conftest.er1 >conftest.err
9832 rm -f conftest.er1
9833 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009835 (exit $ac_status); } && {
9836 test -z "$ac_c_werror_flag" ||
9837 test ! -s conftest.err
9838 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009839 ac_hi=$ac_mid
9840else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009842sed 's/^/| /' conftest.$ac_ext >&5
9843
Martin v. Löwiseba40652007-08-30 20:10:57 +00009844 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009846
9847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009848done
9849case $ac_lo in
9850?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009851'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009852 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009853See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009854echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009855See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009856 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009857 else
9858 ac_cv_sizeof_double=0
9859 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009860esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009861else
Martin v. Löwis11437992002-04-12 09:54:03 +00009862 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009863/* confdefs.h. */
9864_ACEOF
9865cat confdefs.h >>conftest.$ac_ext
9866cat >>conftest.$ac_ext <<_ACEOF
9867/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009868$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009869 typedef double ac__type_sizeof_;
9870static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9871static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009872#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009873#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009874int
9875main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009876{
Martin v. Löwis11437992002-04-12 09:54:03 +00009877
9878 FILE *f = fopen ("conftest.val", "w");
9879 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009880 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009881 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009883 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009884 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009885 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009886 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 }
9888 else
9889 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009890 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009891 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009892 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009893 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009894 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009895 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009896
9897 ;
9898 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009899}
Martin v. Löwis11437992002-04-12 09:54:03 +00009900_ACEOF
9901rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009902if { (ac_try="$ac_link"
9903case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009912 { (case "(($ac_try" in
9913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9914 *) ac_try_echo=$ac_try;;
9915esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009917 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009918 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009920 (exit $ac_status); }; }; then
9921 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009922else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009923 echo "$as_me: program exited with status $ac_status" >&5
9924echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009925sed 's/^/| /' conftest.$ac_ext >&5
9926
Martin v. Löwis11437992002-04-12 09:54:03 +00009927( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009928if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009929 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009930See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009931echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009932See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009933 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009934 else
9935 ac_cv_sizeof_double=0
9936 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009938rm -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 +00009939fi
9940rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009941fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009942{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9943echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009944
9945
9946
Martin v. Löwis11437992002-04-12 09:54:03 +00009947cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009948#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009949_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009950
9951
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009952{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9953echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9954if test "${ac_cv_type_fpos_t+set}" = set; then
9955 echo $ECHO_N "(cached) $ECHO_C" >&6
9956else
9957 cat >conftest.$ac_ext <<_ACEOF
9958/* confdefs.h. */
9959_ACEOF
9960cat confdefs.h >>conftest.$ac_ext
9961cat >>conftest.$ac_ext <<_ACEOF
9962/* end confdefs.h. */
9963$ac_includes_default
9964typedef fpos_t ac__type_new_;
9965int
9966main ()
9967{
9968if ((ac__type_new_ *) 0)
9969 return 0;
9970if (sizeof (ac__type_new_))
9971 return 0;
9972 ;
9973 return 0;
9974}
9975_ACEOF
9976rm -f conftest.$ac_objext
9977if { (ac_try="$ac_compile"
9978case "(($ac_try" in
9979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9980 *) ac_try_echo=$ac_try;;
9981esac
9982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9983 (eval "$ac_compile") 2>conftest.er1
9984 ac_status=$?
9985 grep -v '^ *+' conftest.er1 >conftest.err
9986 rm -f conftest.er1
9987 cat conftest.err >&5
9988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9989 (exit $ac_status); } && {
9990 test -z "$ac_c_werror_flag" ||
9991 test ! -s conftest.err
9992 } && test -s conftest.$ac_objext; then
9993 ac_cv_type_fpos_t=yes
9994else
9995 echo "$as_me: failed program was:" >&5
9996sed 's/^/| /' conftest.$ac_ext >&5
9997
9998 ac_cv_type_fpos_t=no
9999fi
10000
10001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10002fi
10003{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10004echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10005
Martin v. Löwiseba40652007-08-30 20:10:57 +000010006# The cast to long int works around a bug in the HP C Compiler
10007# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10008# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10009# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010010{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10011echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010012if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010013 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010014else
Martin v. Löwis11437992002-04-12 09:54:03 +000010015 if test "$cross_compiling" = yes; then
10016 # Depending upon the size, compute the lo and hi bounds.
10017cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010018/* confdefs.h. */
10019_ACEOF
10020cat confdefs.h >>conftest.$ac_ext
10021cat >>conftest.$ac_ext <<_ACEOF
10022/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010023$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010024 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010025int
10026main ()
10027{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010028static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010029test_array [0] = 0
10030
10031 ;
10032 return 0;
10033}
10034_ACEOF
10035rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010036if { (ac_try="$ac_compile"
10037case "(($ac_try" in
10038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10039 *) ac_try_echo=$ac_try;;
10040esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010042 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010044 grep -v '^ *+' conftest.er1 >conftest.err
10045 rm -f conftest.er1
10046 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010048 (exit $ac_status); } && {
10049 test -z "$ac_c_werror_flag" ||
10050 test ! -s conftest.err
10051 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010052 ac_lo=0 ac_mid=0
10053 while :; do
10054 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010055/* confdefs.h. */
10056_ACEOF
10057cat confdefs.h >>conftest.$ac_ext
10058cat >>conftest.$ac_ext <<_ACEOF
10059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010060$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010061 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010062int
10063main ()
10064{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010065static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010066test_array [0] = 0
10067
10068 ;
10069 return 0;
10070}
10071_ACEOF
10072rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010073if { (ac_try="$ac_compile"
10074case "(($ac_try" in
10075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10076 *) ac_try_echo=$ac_try;;
10077esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010079 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010081 grep -v '^ *+' conftest.er1 >conftest.err
10082 rm -f conftest.er1
10083 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010085 (exit $ac_status); } && {
10086 test -z "$ac_c_werror_flag" ||
10087 test ! -s conftest.err
10088 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010089 ac_hi=$ac_mid; break
10090else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010092sed 's/^/| /' conftest.$ac_ext >&5
10093
Martin v. Löwiseba40652007-08-30 20:10:57 +000010094 ac_lo=`expr $ac_mid + 1`
10095 if test $ac_lo -le $ac_mid; then
10096 ac_lo= ac_hi=
10097 break
10098 fi
10099 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010100fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010101
10102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010103 done
10104else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010106sed 's/^/| /' conftest.$ac_ext >&5
10107
Martin v. Löwiseba40652007-08-30 20:10:57 +000010108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010109/* confdefs.h. */
10110_ACEOF
10111cat confdefs.h >>conftest.$ac_ext
10112cat >>conftest.$ac_ext <<_ACEOF
10113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010114$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010115 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010116int
10117main ()
10118{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010119static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010120test_array [0] = 0
10121
10122 ;
10123 return 0;
10124}
10125_ACEOF
10126rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010127if { (ac_try="$ac_compile"
10128case "(($ac_try" in
10129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10130 *) ac_try_echo=$ac_try;;
10131esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010133 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010135 grep -v '^ *+' conftest.er1 >conftest.err
10136 rm -f conftest.er1
10137 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010139 (exit $ac_status); } && {
10140 test -z "$ac_c_werror_flag" ||
10141 test ! -s conftest.err
10142 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010143 ac_hi=-1 ac_mid=-1
10144 while :; do
10145 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010146/* confdefs.h. */
10147_ACEOF
10148cat confdefs.h >>conftest.$ac_ext
10149cat >>conftest.$ac_ext <<_ACEOF
10150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010151$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010152 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010153int
10154main ()
10155{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010156static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010157test_array [0] = 0
10158
10159 ;
10160 return 0;
10161}
10162_ACEOF
10163rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010164if { (ac_try="$ac_compile"
10165case "(($ac_try" in
10166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10167 *) ac_try_echo=$ac_try;;
10168esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010170 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010172 grep -v '^ *+' conftest.er1 >conftest.err
10173 rm -f conftest.er1
10174 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010176 (exit $ac_status); } && {
10177 test -z "$ac_c_werror_flag" ||
10178 test ! -s conftest.err
10179 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010180 ac_lo=$ac_mid; break
10181else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010183sed 's/^/| /' conftest.$ac_ext >&5
10184
Martin v. Löwiseba40652007-08-30 20:10:57 +000010185 ac_hi=`expr '(' $ac_mid ')' - 1`
10186 if test $ac_mid -le $ac_hi; then
10187 ac_lo= ac_hi=
10188 break
10189 fi
10190 ac_mid=`expr 2 '*' $ac_mid`
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 +000010194 done
10195else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010197sed 's/^/| /' conftest.$ac_ext >&5
10198
Martin v. Löwiseba40652007-08-30 20:10:57 +000010199 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010200fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010201
10202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010204
10205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010206# Binary search between lo and hi bounds.
10207while test "x$ac_lo" != "x$ac_hi"; do
10208 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10209 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010210/* confdefs.h. */
10211_ACEOF
10212cat confdefs.h >>conftest.$ac_ext
10213cat >>conftest.$ac_ext <<_ACEOF
10214/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010215$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010216 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010217int
10218main ()
10219{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010220static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010221test_array [0] = 0
10222
10223 ;
10224 return 0;
10225}
10226_ACEOF
10227rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010228if { (ac_try="$ac_compile"
10229case "(($ac_try" in
10230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10231 *) ac_try_echo=$ac_try;;
10232esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010234 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010236 grep -v '^ *+' conftest.er1 >conftest.err
10237 rm -f conftest.er1
10238 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010240 (exit $ac_status); } && {
10241 test -z "$ac_c_werror_flag" ||
10242 test ! -s conftest.err
10243 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010244 ac_hi=$ac_mid
10245else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010247sed 's/^/| /' conftest.$ac_ext >&5
10248
Martin v. Löwiseba40652007-08-30 20:10:57 +000010249 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010250fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010251
10252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010253done
10254case $ac_lo in
10255?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010256'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010257 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010258See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010259echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010260See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010261 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010262 else
10263 ac_cv_sizeof_fpos_t=0
10264 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010265esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010266else
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010268/* confdefs.h. */
10269_ACEOF
10270cat confdefs.h >>conftest.$ac_ext
10271cat >>conftest.$ac_ext <<_ACEOF
10272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010273$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010274 typedef fpos_t ac__type_sizeof_;
10275static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10276static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010277#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010278#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010279int
10280main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010281{
Martin v. Löwis11437992002-04-12 09:54:03 +000010282
10283 FILE *f = fopen ("conftest.val", "w");
10284 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010285 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010286 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010287 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010288 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010289 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010290 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010291 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 }
10293 else
10294 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010295 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010296 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010297 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010298 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010299 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010300 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010301
10302 ;
10303 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010304}
Martin v. Löwis11437992002-04-12 09:54:03 +000010305_ACEOF
10306rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010307if { (ac_try="$ac_link"
10308case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010317 { (case "(($ac_try" in
10318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10319 *) ac_try_echo=$ac_try;;
10320esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010322 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010323 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010325 (exit $ac_status); }; }; then
10326 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010327else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010328 echo "$as_me: program exited with status $ac_status" >&5
10329echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010330sed 's/^/| /' conftest.$ac_ext >&5
10331
Martin v. Löwis11437992002-04-12 09:54:03 +000010332( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010333if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010334 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010335See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010336echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010337See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010338 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010339 else
10340 ac_cv_sizeof_fpos_t=0
10341 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010343rm -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 +000010344fi
10345rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010346fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010347{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10348echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010349
10350
10351
Martin v. Löwis11437992002-04-12 09:54:03 +000010352cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010353#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010354_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010355
Michael W. Hudson54241132001-12-07 15:38:26 +000010356
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010357{ echo "$as_me:$LINENO: checking for size_t" >&5
10358echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10359if test "${ac_cv_type_size_t+set}" = set; then
10360 echo $ECHO_N "(cached) $ECHO_C" >&6
10361else
10362 cat >conftest.$ac_ext <<_ACEOF
10363/* confdefs.h. */
10364_ACEOF
10365cat confdefs.h >>conftest.$ac_ext
10366cat >>conftest.$ac_ext <<_ACEOF
10367/* end confdefs.h. */
10368$ac_includes_default
10369typedef size_t ac__type_new_;
10370int
10371main ()
10372{
10373if ((ac__type_new_ *) 0)
10374 return 0;
10375if (sizeof (ac__type_new_))
10376 return 0;
10377 ;
10378 return 0;
10379}
10380_ACEOF
10381rm -f conftest.$ac_objext
10382if { (ac_try="$ac_compile"
10383case "(($ac_try" in
10384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10385 *) ac_try_echo=$ac_try;;
10386esac
10387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10388 (eval "$ac_compile") 2>conftest.er1
10389 ac_status=$?
10390 grep -v '^ *+' conftest.er1 >conftest.err
10391 rm -f conftest.er1
10392 cat conftest.err >&5
10393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10394 (exit $ac_status); } && {
10395 test -z "$ac_c_werror_flag" ||
10396 test ! -s conftest.err
10397 } && test -s conftest.$ac_objext; then
10398 ac_cv_type_size_t=yes
10399else
10400 echo "$as_me: failed program was:" >&5
10401sed 's/^/| /' conftest.$ac_ext >&5
10402
10403 ac_cv_type_size_t=no
10404fi
10405
10406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10407fi
10408{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10409echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10410
Martin v. Löwiseba40652007-08-30 20:10:57 +000010411# The cast to long int works around a bug in the HP C Compiler
10412# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10413# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10414# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010415{ echo "$as_me:$LINENO: checking size of size_t" >&5
10416echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010417if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010418 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010419else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010420 if test "$cross_compiling" = yes; then
10421 # Depending upon the size, compute the lo and hi bounds.
10422cat >conftest.$ac_ext <<_ACEOF
10423/* confdefs.h. */
10424_ACEOF
10425cat confdefs.h >>conftest.$ac_ext
10426cat >>conftest.$ac_ext <<_ACEOF
10427/* end confdefs.h. */
10428$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010429 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010430int
10431main ()
10432{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010433static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010434test_array [0] = 0
10435
10436 ;
10437 return 0;
10438}
10439_ACEOF
10440rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010441if { (ac_try="$ac_compile"
10442case "(($ac_try" in
10443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10444 *) ac_try_echo=$ac_try;;
10445esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010447 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010448 ac_status=$?
10449 grep -v '^ *+' conftest.er1 >conftest.err
10450 rm -f conftest.er1
10451 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010453 (exit $ac_status); } && {
10454 test -z "$ac_c_werror_flag" ||
10455 test ! -s conftest.err
10456 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010457 ac_lo=0 ac_mid=0
10458 while :; do
10459 cat >conftest.$ac_ext <<_ACEOF
10460/* confdefs.h. */
10461_ACEOF
10462cat confdefs.h >>conftest.$ac_ext
10463cat >>conftest.$ac_ext <<_ACEOF
10464/* end confdefs.h. */
10465$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010466 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010467int
10468main ()
10469{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010470static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010471test_array [0] = 0
10472
10473 ;
10474 return 0;
10475}
10476_ACEOF
10477rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010478if { (ac_try="$ac_compile"
10479case "(($ac_try" in
10480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10481 *) ac_try_echo=$ac_try;;
10482esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010484 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010485 ac_status=$?
10486 grep -v '^ *+' conftest.er1 >conftest.err
10487 rm -f conftest.er1
10488 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010490 (exit $ac_status); } && {
10491 test -z "$ac_c_werror_flag" ||
10492 test ! -s conftest.err
10493 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010494 ac_hi=$ac_mid; break
10495else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010496 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010497sed 's/^/| /' conftest.$ac_ext >&5
10498
Martin v. Löwiseba40652007-08-30 20:10:57 +000010499 ac_lo=`expr $ac_mid + 1`
10500 if test $ac_lo -le $ac_mid; then
10501 ac_lo= ac_hi=
10502 break
10503 fi
10504 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010506
10507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010508 done
10509else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010510 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010511sed 's/^/| /' conftest.$ac_ext >&5
10512
Martin v. Löwiseba40652007-08-30 20:10:57 +000010513 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010514/* confdefs.h. */
10515_ACEOF
10516cat confdefs.h >>conftest.$ac_ext
10517cat >>conftest.$ac_ext <<_ACEOF
10518/* end confdefs.h. */
10519$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010520 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010521int
10522main ()
10523{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010524static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010525test_array [0] = 0
10526
10527 ;
10528 return 0;
10529}
10530_ACEOF
10531rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010532if { (ac_try="$ac_compile"
10533case "(($ac_try" in
10534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10535 *) ac_try_echo=$ac_try;;
10536esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010538 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010539 ac_status=$?
10540 grep -v '^ *+' conftest.er1 >conftest.err
10541 rm -f conftest.er1
10542 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010544 (exit $ac_status); } && {
10545 test -z "$ac_c_werror_flag" ||
10546 test ! -s conftest.err
10547 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010548 ac_hi=-1 ac_mid=-1
10549 while :; do
10550 cat >conftest.$ac_ext <<_ACEOF
10551/* confdefs.h. */
10552_ACEOF
10553cat confdefs.h >>conftest.$ac_ext
10554cat >>conftest.$ac_ext <<_ACEOF
10555/* end confdefs.h. */
10556$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010557 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010558int
10559main ()
10560{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010561static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010562test_array [0] = 0
10563
10564 ;
10565 return 0;
10566}
10567_ACEOF
10568rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010569if { (ac_try="$ac_compile"
10570case "(($ac_try" in
10571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10572 *) ac_try_echo=$ac_try;;
10573esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010575 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010576 ac_status=$?
10577 grep -v '^ *+' conftest.er1 >conftest.err
10578 rm -f conftest.er1
10579 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010581 (exit $ac_status); } && {
10582 test -z "$ac_c_werror_flag" ||
10583 test ! -s conftest.err
10584 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010585 ac_lo=$ac_mid; break
10586else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010587 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010588sed 's/^/| /' conftest.$ac_ext >&5
10589
Martin v. Löwiseba40652007-08-30 20:10:57 +000010590 ac_hi=`expr '(' $ac_mid ')' - 1`
10591 if test $ac_mid -le $ac_hi; then
10592 ac_lo= ac_hi=
10593 break
10594 fi
10595 ac_mid=`expr 2 '*' $ac_mid`
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 +000010599 done
10600else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010601 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010602sed 's/^/| /' conftest.$ac_ext >&5
10603
Martin v. Löwiseba40652007-08-30 20:10:57 +000010604 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010605fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010606
10607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010609
10610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010611# Binary search between lo and hi bounds.
10612while test "x$ac_lo" != "x$ac_hi"; do
10613 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10614 cat >conftest.$ac_ext <<_ACEOF
10615/* confdefs.h. */
10616_ACEOF
10617cat confdefs.h >>conftest.$ac_ext
10618cat >>conftest.$ac_ext <<_ACEOF
10619/* end confdefs.h. */
10620$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010621 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010622int
10623main ()
10624{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010625static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010626test_array [0] = 0
10627
10628 ;
10629 return 0;
10630}
10631_ACEOF
10632rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010633if { (ac_try="$ac_compile"
10634case "(($ac_try" in
10635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10636 *) ac_try_echo=$ac_try;;
10637esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010639 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010640 ac_status=$?
10641 grep -v '^ *+' conftest.er1 >conftest.err
10642 rm -f conftest.er1
10643 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010645 (exit $ac_status); } && {
10646 test -z "$ac_c_werror_flag" ||
10647 test ! -s conftest.err
10648 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010649 ac_hi=$ac_mid
10650else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010651 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010652sed 's/^/| /' conftest.$ac_ext >&5
10653
Martin v. Löwiseba40652007-08-30 20:10:57 +000010654 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010656
10657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010658done
10659case $ac_lo in
10660?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010661'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010662 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010663See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010664echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010665See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010666 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010667 else
10668 ac_cv_sizeof_size_t=0
10669 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670esac
10671else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010672 cat >conftest.$ac_ext <<_ACEOF
10673/* confdefs.h. */
10674_ACEOF
10675cat confdefs.h >>conftest.$ac_ext
10676cat >>conftest.$ac_ext <<_ACEOF
10677/* end confdefs.h. */
10678$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010679 typedef size_t ac__type_sizeof_;
10680static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10681static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010682#include <stdio.h>
10683#include <stdlib.h>
10684int
10685main ()
10686{
10687
10688 FILE *f = fopen ("conftest.val", "w");
10689 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010690 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010691 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010692 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010693 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010694 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010695 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010696 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010697 }
10698 else
10699 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010700 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010701 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010702 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010703 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010704 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010705 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010706
10707 ;
10708 return 0;
10709}
10710_ACEOF
10711rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010712if { (ac_try="$ac_link"
10713case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010722 { (case "(($ac_try" in
10723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10724 *) ac_try_echo=$ac_try;;
10725esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010727 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010728 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010730 (exit $ac_status); }; }; then
10731 ac_cv_sizeof_size_t=`cat conftest.val`
10732else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010733 echo "$as_me: program exited with status $ac_status" >&5
10734echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010735sed 's/^/| /' conftest.$ac_ext >&5
10736
10737( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010738if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010739 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010740See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010741echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010742See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010743 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010744 else
10745 ac_cv_sizeof_size_t=0
10746 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010748rm -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 +000010749fi
10750rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010751fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010752{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10753echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010754
10755
10756
Martin v. Löwis18e16552006-02-15 17:27:45 +000010757cat >>confdefs.h <<_ACEOF
10758#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10759_ACEOF
10760
10761
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010762{ echo "$as_me:$LINENO: checking for pid_t" >&5
10763echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10764if test "${ac_cv_type_pid_t+set}" = set; then
10765 echo $ECHO_N "(cached) $ECHO_C" >&6
10766else
10767 cat >conftest.$ac_ext <<_ACEOF
10768/* confdefs.h. */
10769_ACEOF
10770cat confdefs.h >>conftest.$ac_ext
10771cat >>conftest.$ac_ext <<_ACEOF
10772/* end confdefs.h. */
10773$ac_includes_default
10774typedef pid_t ac__type_new_;
10775int
10776main ()
10777{
10778if ((ac__type_new_ *) 0)
10779 return 0;
10780if (sizeof (ac__type_new_))
10781 return 0;
10782 ;
10783 return 0;
10784}
10785_ACEOF
10786rm -f conftest.$ac_objext
10787if { (ac_try="$ac_compile"
10788case "(($ac_try" in
10789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10790 *) ac_try_echo=$ac_try;;
10791esac
10792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10793 (eval "$ac_compile") 2>conftest.er1
10794 ac_status=$?
10795 grep -v '^ *+' conftest.er1 >conftest.err
10796 rm -f conftest.er1
10797 cat conftest.err >&5
10798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10799 (exit $ac_status); } && {
10800 test -z "$ac_c_werror_flag" ||
10801 test ! -s conftest.err
10802 } && test -s conftest.$ac_objext; then
10803 ac_cv_type_pid_t=yes
10804else
10805 echo "$as_me: failed program was:" >&5
10806sed 's/^/| /' conftest.$ac_ext >&5
10807
10808 ac_cv_type_pid_t=no
10809fi
10810
10811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10812fi
10813{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10814echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10815
Christian Heimes951cc0f2008-01-31 23:08:23 +000010816# The cast to long int works around a bug in the HP C Compiler
10817# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10818# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10819# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010820{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10821echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010822if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010823 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010824else
10825 if test "$cross_compiling" = yes; then
10826 # Depending upon the size, compute the lo and hi bounds.
10827cat >conftest.$ac_ext <<_ACEOF
10828/* confdefs.h. */
10829_ACEOF
10830cat confdefs.h >>conftest.$ac_ext
10831cat >>conftest.$ac_ext <<_ACEOF
10832/* end confdefs.h. */
10833$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010834 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010835int
10836main ()
10837{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010838static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010839test_array [0] = 0
10840
10841 ;
10842 return 0;
10843}
10844_ACEOF
10845rm -f conftest.$ac_objext
10846if { (ac_try="$ac_compile"
10847case "(($ac_try" in
10848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10849 *) ac_try_echo=$ac_try;;
10850esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010852 (eval "$ac_compile") 2>conftest.er1
10853 ac_status=$?
10854 grep -v '^ *+' conftest.er1 >conftest.err
10855 rm -f conftest.er1
10856 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010858 (exit $ac_status); } && {
10859 test -z "$ac_c_werror_flag" ||
10860 test ! -s conftest.err
10861 } && test -s conftest.$ac_objext; then
10862 ac_lo=0 ac_mid=0
10863 while :; do
10864 cat >conftest.$ac_ext <<_ACEOF
10865/* confdefs.h. */
10866_ACEOF
10867cat confdefs.h >>conftest.$ac_ext
10868cat >>conftest.$ac_ext <<_ACEOF
10869/* end confdefs.h. */
10870$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010871 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010872int
10873main ()
10874{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010875static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010876test_array [0] = 0
10877
10878 ;
10879 return 0;
10880}
10881_ACEOF
10882rm -f conftest.$ac_objext
10883if { (ac_try="$ac_compile"
10884case "(($ac_try" in
10885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10886 *) ac_try_echo=$ac_try;;
10887esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010889 (eval "$ac_compile") 2>conftest.er1
10890 ac_status=$?
10891 grep -v '^ *+' conftest.er1 >conftest.err
10892 rm -f conftest.er1
10893 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010895 (exit $ac_status); } && {
10896 test -z "$ac_c_werror_flag" ||
10897 test ! -s conftest.err
10898 } && test -s conftest.$ac_objext; then
10899 ac_hi=$ac_mid; break
10900else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010901 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010902sed 's/^/| /' conftest.$ac_ext >&5
10903
10904 ac_lo=`expr $ac_mid + 1`
10905 if test $ac_lo -le $ac_mid; then
10906 ac_lo= ac_hi=
10907 break
10908 fi
10909 ac_mid=`expr 2 '*' $ac_mid + 1`
10910fi
10911
10912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10913 done
10914else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010915 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010916sed 's/^/| /' conftest.$ac_ext >&5
10917
10918 cat >conftest.$ac_ext <<_ACEOF
10919/* confdefs.h. */
10920_ACEOF
10921cat confdefs.h >>conftest.$ac_ext
10922cat >>conftest.$ac_ext <<_ACEOF
10923/* end confdefs.h. */
10924$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010925 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010926int
10927main ()
10928{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010929static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010930test_array [0] = 0
10931
10932 ;
10933 return 0;
10934}
10935_ACEOF
10936rm -f conftest.$ac_objext
10937if { (ac_try="$ac_compile"
10938case "(($ac_try" in
10939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10940 *) ac_try_echo=$ac_try;;
10941esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010943 (eval "$ac_compile") 2>conftest.er1
10944 ac_status=$?
10945 grep -v '^ *+' conftest.er1 >conftest.err
10946 rm -f conftest.er1
10947 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010949 (exit $ac_status); } && {
10950 test -z "$ac_c_werror_flag" ||
10951 test ! -s conftest.err
10952 } && test -s conftest.$ac_objext; then
10953 ac_hi=-1 ac_mid=-1
10954 while :; do
10955 cat >conftest.$ac_ext <<_ACEOF
10956/* confdefs.h. */
10957_ACEOF
10958cat confdefs.h >>conftest.$ac_ext
10959cat >>conftest.$ac_ext <<_ACEOF
10960/* end confdefs.h. */
10961$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010962 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010963int
10964main ()
10965{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010966static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010967test_array [0] = 0
10968
10969 ;
10970 return 0;
10971}
10972_ACEOF
10973rm -f conftest.$ac_objext
10974if { (ac_try="$ac_compile"
10975case "(($ac_try" in
10976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10977 *) ac_try_echo=$ac_try;;
10978esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010980 (eval "$ac_compile") 2>conftest.er1
10981 ac_status=$?
10982 grep -v '^ *+' conftest.er1 >conftest.err
10983 rm -f conftest.er1
10984 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010986 (exit $ac_status); } && {
10987 test -z "$ac_c_werror_flag" ||
10988 test ! -s conftest.err
10989 } && test -s conftest.$ac_objext; then
10990 ac_lo=$ac_mid; break
10991else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010992 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010993sed 's/^/| /' conftest.$ac_ext >&5
10994
10995 ac_hi=`expr '(' $ac_mid ')' - 1`
10996 if test $ac_mid -le $ac_hi; then
10997 ac_lo= ac_hi=
10998 break
10999 fi
11000 ac_mid=`expr 2 '*' $ac_mid`
11001fi
11002
11003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11004 done
11005else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011006 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011007sed 's/^/| /' conftest.$ac_ext >&5
11008
11009 ac_lo= ac_hi=
11010fi
11011
11012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11013fi
11014
11015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11016# Binary search between lo and hi bounds.
11017while test "x$ac_lo" != "x$ac_hi"; do
11018 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11019 cat >conftest.$ac_ext <<_ACEOF
11020/* confdefs.h. */
11021_ACEOF
11022cat confdefs.h >>conftest.$ac_ext
11023cat >>conftest.$ac_ext <<_ACEOF
11024/* end confdefs.h. */
11025$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011026 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011027int
11028main ()
11029{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011030static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011031test_array [0] = 0
11032
11033 ;
11034 return 0;
11035}
11036_ACEOF
11037rm -f conftest.$ac_objext
11038if { (ac_try="$ac_compile"
11039case "(($ac_try" in
11040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11041 *) ac_try_echo=$ac_try;;
11042esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011044 (eval "$ac_compile") 2>conftest.er1
11045 ac_status=$?
11046 grep -v '^ *+' conftest.er1 >conftest.err
11047 rm -f conftest.er1
11048 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011050 (exit $ac_status); } && {
11051 test -z "$ac_c_werror_flag" ||
11052 test ! -s conftest.err
11053 } && test -s conftest.$ac_objext; then
11054 ac_hi=$ac_mid
11055else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011056 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011057sed 's/^/| /' conftest.$ac_ext >&5
11058
11059 ac_lo=`expr '(' $ac_mid ')' + 1`
11060fi
11061
11062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11063done
11064case $ac_lo in
11065?*) ac_cv_sizeof_pid_t=$ac_lo;;
11066'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011067 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011068See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011069echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011070See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011071 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011072 else
11073 ac_cv_sizeof_pid_t=0
11074 fi ;;
11075esac
11076else
11077 cat >conftest.$ac_ext <<_ACEOF
11078/* confdefs.h. */
11079_ACEOF
11080cat confdefs.h >>conftest.$ac_ext
11081cat >>conftest.$ac_ext <<_ACEOF
11082/* end confdefs.h. */
11083$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011084 typedef pid_t ac__type_sizeof_;
11085static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11086static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011087#include <stdio.h>
11088#include <stdlib.h>
11089int
11090main ()
11091{
11092
11093 FILE *f = fopen ("conftest.val", "w");
11094 if (! f)
11095 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011096 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011097 {
11098 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011099 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011100 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011101 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011102 }
11103 else
11104 {
11105 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011106 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011107 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011108 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011109 }
11110 return ferror (f) || fclose (f) != 0;
11111
11112 ;
11113 return 0;
11114}
11115_ACEOF
11116rm -f conftest$ac_exeext
11117if { (ac_try="$ac_link"
11118case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
11127 { (case "(($ac_try" in
11128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11129 *) ac_try_echo=$ac_try;;
11130esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011132 (eval "$ac_try") 2>&5
11133 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011135 (exit $ac_status); }; }; then
11136 ac_cv_sizeof_pid_t=`cat conftest.val`
11137else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011138 echo "$as_me: program exited with status $ac_status" >&5
11139echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011140sed 's/^/| /' conftest.$ac_ext >&5
11141
11142( exit $ac_status )
11143if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011144 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011145See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011146echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011147See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011148 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011149 else
11150 ac_cv_sizeof_pid_t=0
11151 fi
11152fi
11153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11154fi
11155rm -f conftest.val
11156fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011157{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11158echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011159
11160
11161
11162cat >>confdefs.h <<_ACEOF
11163#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11164_ACEOF
11165
11166
Michael W. Hudson54241132001-12-07 15:38:26 +000011167
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011168{ echo "$as_me:$LINENO: checking for long long support" >&5
11169echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011170have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011171cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011172/* confdefs.h. */
11173_ACEOF
11174cat confdefs.h >>conftest.$ac_ext
11175cat >>conftest.$ac_ext <<_ACEOF
11176/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011177
Martin v. Löwis11437992002-04-12 09:54:03 +000011178int
11179main ()
11180{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011181long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011182 ;
11183 return 0;
11184}
11185_ACEOF
11186rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011187if { (ac_try="$ac_compile"
11188case "(($ac_try" in
11189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11190 *) ac_try_echo=$ac_try;;
11191esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011193 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011194 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011195 grep -v '^ *+' conftest.er1 >conftest.err
11196 rm -f conftest.er1
11197 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011199 (exit $ac_status); } && {
11200 test -z "$ac_c_werror_flag" ||
11201 test ! -s conftest.err
11202 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011203
11204
11205cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011206#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011207_ACEOF
11208
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011209 have_long_long=yes
11210
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011211else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011213sed 's/^/| /' conftest.$ac_ext >&5
11214
Martin v. Löwiseba40652007-08-30 20:10:57 +000011215
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011217
11218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011219{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11220echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011221if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011222{ echo "$as_me:$LINENO: checking for long long" >&5
11223echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11224if test "${ac_cv_type_long_long+set}" = set; then
11225 echo $ECHO_N "(cached) $ECHO_C" >&6
11226else
11227 cat >conftest.$ac_ext <<_ACEOF
11228/* confdefs.h. */
11229_ACEOF
11230cat confdefs.h >>conftest.$ac_ext
11231cat >>conftest.$ac_ext <<_ACEOF
11232/* end confdefs.h. */
11233$ac_includes_default
11234typedef long long ac__type_new_;
11235int
11236main ()
11237{
11238if ((ac__type_new_ *) 0)
11239 return 0;
11240if (sizeof (ac__type_new_))
11241 return 0;
11242 ;
11243 return 0;
11244}
11245_ACEOF
11246rm -f conftest.$ac_objext
11247if { (ac_try="$ac_compile"
11248case "(($ac_try" in
11249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11250 *) ac_try_echo=$ac_try;;
11251esac
11252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11253 (eval "$ac_compile") 2>conftest.er1
11254 ac_status=$?
11255 grep -v '^ *+' conftest.er1 >conftest.err
11256 rm -f conftest.er1
11257 cat conftest.err >&5
11258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11259 (exit $ac_status); } && {
11260 test -z "$ac_c_werror_flag" ||
11261 test ! -s conftest.err
11262 } && test -s conftest.$ac_objext; then
11263 ac_cv_type_long_long=yes
11264else
11265 echo "$as_me: failed program was:" >&5
11266sed 's/^/| /' conftest.$ac_ext >&5
11267
11268 ac_cv_type_long_long=no
11269fi
11270
11271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11272fi
11273{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11274echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11275
Martin v. Löwiseba40652007-08-30 20:10:57 +000011276# The cast to long int works around a bug in the HP C Compiler
11277# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11278# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11279# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011280{ echo "$as_me:$LINENO: checking size of long long" >&5
11281echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011282if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011283 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011284else
Martin v. Löwis11437992002-04-12 09:54:03 +000011285 if test "$cross_compiling" = yes; then
11286 # Depending upon the size, compute the lo and hi bounds.
11287cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011288/* confdefs.h. */
11289_ACEOF
11290cat confdefs.h >>conftest.$ac_ext
11291cat >>conftest.$ac_ext <<_ACEOF
11292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011293$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011294 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011295int
11296main ()
11297{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011298static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011299test_array [0] = 0
11300
11301 ;
11302 return 0;
11303}
11304_ACEOF
11305rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011306if { (ac_try="$ac_compile"
11307case "(($ac_try" in
11308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11309 *) ac_try_echo=$ac_try;;
11310esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011312 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011314 grep -v '^ *+' conftest.er1 >conftest.err
11315 rm -f conftest.er1
11316 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011318 (exit $ac_status); } && {
11319 test -z "$ac_c_werror_flag" ||
11320 test ! -s conftest.err
11321 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011322 ac_lo=0 ac_mid=0
11323 while :; do
11324 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011325/* confdefs.h. */
11326_ACEOF
11327cat confdefs.h >>conftest.$ac_ext
11328cat >>conftest.$ac_ext <<_ACEOF
11329/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011330$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011331 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011332int
11333main ()
11334{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011335static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011336test_array [0] = 0
11337
11338 ;
11339 return 0;
11340}
11341_ACEOF
11342rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011343if { (ac_try="$ac_compile"
11344case "(($ac_try" in
11345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11346 *) ac_try_echo=$ac_try;;
11347esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011349 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011350 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011351 grep -v '^ *+' conftest.er1 >conftest.err
11352 rm -f conftest.er1
11353 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011355 (exit $ac_status); } && {
11356 test -z "$ac_c_werror_flag" ||
11357 test ! -s conftest.err
11358 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011359 ac_hi=$ac_mid; break
11360else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011362sed 's/^/| /' conftest.$ac_ext >&5
11363
Martin v. Löwiseba40652007-08-30 20:10:57 +000011364 ac_lo=`expr $ac_mid + 1`
11365 if test $ac_lo -le $ac_mid; then
11366 ac_lo= ac_hi=
11367 break
11368 fi
11369 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011370fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011371
11372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011373 done
11374else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011376sed 's/^/| /' conftest.$ac_ext >&5
11377
Martin v. Löwiseba40652007-08-30 20:10:57 +000011378 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011379/* confdefs.h. */
11380_ACEOF
11381cat confdefs.h >>conftest.$ac_ext
11382cat >>conftest.$ac_ext <<_ACEOF
11383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011384$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011385 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011386int
11387main ()
11388{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011389static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011390test_array [0] = 0
11391
11392 ;
11393 return 0;
11394}
11395_ACEOF
11396rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011397if { (ac_try="$ac_compile"
11398case "(($ac_try" in
11399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11400 *) ac_try_echo=$ac_try;;
11401esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011403 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011404 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011405 grep -v '^ *+' conftest.er1 >conftest.err
11406 rm -f conftest.er1
11407 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011409 (exit $ac_status); } && {
11410 test -z "$ac_c_werror_flag" ||
11411 test ! -s conftest.err
11412 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011413 ac_hi=-1 ac_mid=-1
11414 while :; do
11415 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011416/* confdefs.h. */
11417_ACEOF
11418cat confdefs.h >>conftest.$ac_ext
11419cat >>conftest.$ac_ext <<_ACEOF
11420/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011421$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011422 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011423int
11424main ()
11425{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011426static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011427test_array [0] = 0
11428
11429 ;
11430 return 0;
11431}
11432_ACEOF
11433rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011434if { (ac_try="$ac_compile"
11435case "(($ac_try" in
11436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11437 *) ac_try_echo=$ac_try;;
11438esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011440 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011441 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011442 grep -v '^ *+' conftest.er1 >conftest.err
11443 rm -f conftest.er1
11444 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011446 (exit $ac_status); } && {
11447 test -z "$ac_c_werror_flag" ||
11448 test ! -s conftest.err
11449 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011450 ac_lo=$ac_mid; break
11451else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011452 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011453sed 's/^/| /' conftest.$ac_ext >&5
11454
Martin v. Löwiseba40652007-08-30 20:10:57 +000011455 ac_hi=`expr '(' $ac_mid ')' - 1`
11456 if test $ac_mid -le $ac_hi; then
11457 ac_lo= ac_hi=
11458 break
11459 fi
11460 ac_mid=`expr 2 '*' $ac_mid`
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 +000011464 done
11465else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011467sed 's/^/| /' conftest.$ac_ext >&5
11468
Martin v. Löwiseba40652007-08-30 20:10:57 +000011469 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011470fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011471
11472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011473fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011474
11475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011476# Binary search between lo and hi bounds.
11477while test "x$ac_lo" != "x$ac_hi"; do
11478 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11479 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011480/* confdefs.h. */
11481_ACEOF
11482cat confdefs.h >>conftest.$ac_ext
11483cat >>conftest.$ac_ext <<_ACEOF
11484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011485$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011486 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011487int
11488main ()
11489{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011490static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011491test_array [0] = 0
11492
11493 ;
11494 return 0;
11495}
11496_ACEOF
11497rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011498if { (ac_try="$ac_compile"
11499case "(($ac_try" in
11500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11501 *) ac_try_echo=$ac_try;;
11502esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011504 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011506 grep -v '^ *+' conftest.er1 >conftest.err
11507 rm -f conftest.er1
11508 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011510 (exit $ac_status); } && {
11511 test -z "$ac_c_werror_flag" ||
11512 test ! -s conftest.err
11513 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 ac_hi=$ac_mid
11515else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011517sed 's/^/| /' conftest.$ac_ext >&5
11518
Martin v. Löwiseba40652007-08-30 20:10:57 +000011519 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011520fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011521
11522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011523done
11524case $ac_lo in
11525?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011526'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011527 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011528See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011529echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011530See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011531 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011532 else
11533 ac_cv_sizeof_long_long=0
11534 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011535esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011536else
Martin v. Löwis11437992002-04-12 09:54:03 +000011537 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011538/* confdefs.h. */
11539_ACEOF
11540cat confdefs.h >>conftest.$ac_ext
11541cat >>conftest.$ac_ext <<_ACEOF
11542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011543$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011544 typedef long long ac__type_sizeof_;
11545static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11546static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011547#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011548#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011549int
11550main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011551{
Martin v. Löwis11437992002-04-12 09:54:03 +000011552
11553 FILE *f = fopen ("conftest.val", "w");
11554 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011555 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011556 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011557 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011558 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011559 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011560 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011561 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011562 }
11563 else
11564 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011565 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011566 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011567 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011568 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011569 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011570 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011571
11572 ;
11573 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011574}
Martin v. Löwis11437992002-04-12 09:54:03 +000011575_ACEOF
11576rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011577if { (ac_try="$ac_link"
11578case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011587 { (case "(($ac_try" in
11588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11589 *) ac_try_echo=$ac_try;;
11590esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011592 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011593 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011595 (exit $ac_status); }; }; then
11596 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011597else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011598 echo "$as_me: program exited with status $ac_status" >&5
11599echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011600sed 's/^/| /' conftest.$ac_ext >&5
11601
Martin v. Löwis11437992002-04-12 09:54:03 +000011602( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011603if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011604 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011605See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011606echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011607See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011608 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011609 else
11610 ac_cv_sizeof_long_long=0
11611 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011613rm -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 +000011614fi
11615rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011616fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011617{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11618echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011619
11620
11621
Martin v. Löwis11437992002-04-12 09:54:03 +000011622cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011623#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011624_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011625
Michael W. Hudson54241132001-12-07 15:38:26 +000011626
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011627fi
11628
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011629{ echo "$as_me:$LINENO: checking for long double support" >&5
11630echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011631have_long_double=no
11632cat >conftest.$ac_ext <<_ACEOF
11633/* confdefs.h. */
11634_ACEOF
11635cat confdefs.h >>conftest.$ac_ext
11636cat >>conftest.$ac_ext <<_ACEOF
11637/* end confdefs.h. */
11638
11639int
11640main ()
11641{
11642long double x; x = (long double)0.;
11643 ;
11644 return 0;
11645}
11646_ACEOF
11647rm -f conftest.$ac_objext
11648if { (ac_try="$ac_compile"
11649case "(($ac_try" in
11650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11651 *) ac_try_echo=$ac_try;;
11652esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011654 (eval "$ac_compile") 2>conftest.er1
11655 ac_status=$?
11656 grep -v '^ *+' conftest.er1 >conftest.err
11657 rm -f conftest.er1
11658 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011660 (exit $ac_status); } && {
11661 test -z "$ac_c_werror_flag" ||
11662 test ! -s conftest.err
11663 } && test -s conftest.$ac_objext; then
11664
11665
11666cat >>confdefs.h <<\_ACEOF
11667#define HAVE_LONG_DOUBLE 1
11668_ACEOF
11669
11670 have_long_double=yes
11671
11672else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011673 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011674sed 's/^/| /' conftest.$ac_ext >&5
11675
11676
11677fi
11678
11679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011680{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11681echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011682if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011683{ echo "$as_me:$LINENO: checking for long double" >&5
11684echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11685if test "${ac_cv_type_long_double+set}" = set; then
11686 echo $ECHO_N "(cached) $ECHO_C" >&6
11687else
11688 cat >conftest.$ac_ext <<_ACEOF
11689/* confdefs.h. */
11690_ACEOF
11691cat confdefs.h >>conftest.$ac_ext
11692cat >>conftest.$ac_ext <<_ACEOF
11693/* end confdefs.h. */
11694$ac_includes_default
11695typedef long double ac__type_new_;
11696int
11697main ()
11698{
11699if ((ac__type_new_ *) 0)
11700 return 0;
11701if (sizeof (ac__type_new_))
11702 return 0;
11703 ;
11704 return 0;
11705}
11706_ACEOF
11707rm -f conftest.$ac_objext
11708if { (ac_try="$ac_compile"
11709case "(($ac_try" in
11710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11711 *) ac_try_echo=$ac_try;;
11712esac
11713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11714 (eval "$ac_compile") 2>conftest.er1
11715 ac_status=$?
11716 grep -v '^ *+' conftest.er1 >conftest.err
11717 rm -f conftest.er1
11718 cat conftest.err >&5
11719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11720 (exit $ac_status); } && {
11721 test -z "$ac_c_werror_flag" ||
11722 test ! -s conftest.err
11723 } && test -s conftest.$ac_objext; then
11724 ac_cv_type_long_double=yes
11725else
11726 echo "$as_me: failed program was:" >&5
11727sed 's/^/| /' conftest.$ac_ext >&5
11728
11729 ac_cv_type_long_double=no
11730fi
11731
11732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11733fi
11734{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11735echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11736
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011737# The cast to long int works around a bug in the HP C Compiler
11738# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11739# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11740# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011741{ echo "$as_me:$LINENO: checking size of long double" >&5
11742echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011743if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011744 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011745else
11746 if test "$cross_compiling" = yes; then
11747 # Depending upon the size, compute the lo and hi bounds.
11748cat >conftest.$ac_ext <<_ACEOF
11749/* confdefs.h. */
11750_ACEOF
11751cat confdefs.h >>conftest.$ac_ext
11752cat >>conftest.$ac_ext <<_ACEOF
11753/* end confdefs.h. */
11754$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011755 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011756int
11757main ()
11758{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011759static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011760test_array [0] = 0
11761
11762 ;
11763 return 0;
11764}
11765_ACEOF
11766rm -f conftest.$ac_objext
11767if { (ac_try="$ac_compile"
11768case "(($ac_try" in
11769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11770 *) ac_try_echo=$ac_try;;
11771esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011773 (eval "$ac_compile") 2>conftest.er1
11774 ac_status=$?
11775 grep -v '^ *+' conftest.er1 >conftest.err
11776 rm -f conftest.er1
11777 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011779 (exit $ac_status); } && {
11780 test -z "$ac_c_werror_flag" ||
11781 test ! -s conftest.err
11782 } && test -s conftest.$ac_objext; then
11783 ac_lo=0 ac_mid=0
11784 while :; do
11785 cat >conftest.$ac_ext <<_ACEOF
11786/* confdefs.h. */
11787_ACEOF
11788cat confdefs.h >>conftest.$ac_ext
11789cat >>conftest.$ac_ext <<_ACEOF
11790/* end confdefs.h. */
11791$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011792 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011793int
11794main ()
11795{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011796static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011797test_array [0] = 0
11798
11799 ;
11800 return 0;
11801}
11802_ACEOF
11803rm -f conftest.$ac_objext
11804if { (ac_try="$ac_compile"
11805case "(($ac_try" in
11806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11807 *) ac_try_echo=$ac_try;;
11808esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011810 (eval "$ac_compile") 2>conftest.er1
11811 ac_status=$?
11812 grep -v '^ *+' conftest.er1 >conftest.err
11813 rm -f conftest.er1
11814 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011816 (exit $ac_status); } && {
11817 test -z "$ac_c_werror_flag" ||
11818 test ! -s conftest.err
11819 } && test -s conftest.$ac_objext; then
11820 ac_hi=$ac_mid; break
11821else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011822 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011823sed 's/^/| /' conftest.$ac_ext >&5
11824
11825 ac_lo=`expr $ac_mid + 1`
11826 if test $ac_lo -le $ac_mid; then
11827 ac_lo= ac_hi=
11828 break
11829 fi
11830 ac_mid=`expr 2 '*' $ac_mid + 1`
11831fi
11832
11833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11834 done
11835else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011836 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011837sed 's/^/| /' conftest.$ac_ext >&5
11838
11839 cat >conftest.$ac_ext <<_ACEOF
11840/* confdefs.h. */
11841_ACEOF
11842cat confdefs.h >>conftest.$ac_ext
11843cat >>conftest.$ac_ext <<_ACEOF
11844/* end confdefs.h. */
11845$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011846 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011847int
11848main ()
11849{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011850static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011851test_array [0] = 0
11852
11853 ;
11854 return 0;
11855}
11856_ACEOF
11857rm -f conftest.$ac_objext
11858if { (ac_try="$ac_compile"
11859case "(($ac_try" in
11860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11861 *) ac_try_echo=$ac_try;;
11862esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011864 (eval "$ac_compile") 2>conftest.er1
11865 ac_status=$?
11866 grep -v '^ *+' conftest.er1 >conftest.err
11867 rm -f conftest.er1
11868 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011870 (exit $ac_status); } && {
11871 test -z "$ac_c_werror_flag" ||
11872 test ! -s conftest.err
11873 } && test -s conftest.$ac_objext; then
11874 ac_hi=-1 ac_mid=-1
11875 while :; do
11876 cat >conftest.$ac_ext <<_ACEOF
11877/* confdefs.h. */
11878_ACEOF
11879cat confdefs.h >>conftest.$ac_ext
11880cat >>conftest.$ac_ext <<_ACEOF
11881/* end confdefs.h. */
11882$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011883 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011884int
11885main ()
11886{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011887static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011888test_array [0] = 0
11889
11890 ;
11891 return 0;
11892}
11893_ACEOF
11894rm -f conftest.$ac_objext
11895if { (ac_try="$ac_compile"
11896case "(($ac_try" in
11897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11898 *) ac_try_echo=$ac_try;;
11899esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011901 (eval "$ac_compile") 2>conftest.er1
11902 ac_status=$?
11903 grep -v '^ *+' conftest.er1 >conftest.err
11904 rm -f conftest.er1
11905 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011907 (exit $ac_status); } && {
11908 test -z "$ac_c_werror_flag" ||
11909 test ! -s conftest.err
11910 } && test -s conftest.$ac_objext; then
11911 ac_lo=$ac_mid; break
11912else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011913 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011914sed 's/^/| /' conftest.$ac_ext >&5
11915
11916 ac_hi=`expr '(' $ac_mid ')' - 1`
11917 if test $ac_mid -le $ac_hi; then
11918 ac_lo= ac_hi=
11919 break
11920 fi
11921 ac_mid=`expr 2 '*' $ac_mid`
11922fi
11923
11924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11925 done
11926else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011927 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011928sed 's/^/| /' conftest.$ac_ext >&5
11929
11930 ac_lo= ac_hi=
11931fi
11932
11933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11934fi
11935
11936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11937# Binary search between lo and hi bounds.
11938while test "x$ac_lo" != "x$ac_hi"; do
11939 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11940 cat >conftest.$ac_ext <<_ACEOF
11941/* confdefs.h. */
11942_ACEOF
11943cat confdefs.h >>conftest.$ac_ext
11944cat >>conftest.$ac_ext <<_ACEOF
11945/* end confdefs.h. */
11946$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011947 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011948int
11949main ()
11950{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011951static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011952test_array [0] = 0
11953
11954 ;
11955 return 0;
11956}
11957_ACEOF
11958rm -f conftest.$ac_objext
11959if { (ac_try="$ac_compile"
11960case "(($ac_try" in
11961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11962 *) ac_try_echo=$ac_try;;
11963esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011965 (eval "$ac_compile") 2>conftest.er1
11966 ac_status=$?
11967 grep -v '^ *+' conftest.er1 >conftest.err
11968 rm -f conftest.er1
11969 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011971 (exit $ac_status); } && {
11972 test -z "$ac_c_werror_flag" ||
11973 test ! -s conftest.err
11974 } && test -s conftest.$ac_objext; then
11975 ac_hi=$ac_mid
11976else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011977 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011978sed 's/^/| /' conftest.$ac_ext >&5
11979
11980 ac_lo=`expr '(' $ac_mid ')' + 1`
11981fi
11982
11983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11984done
11985case $ac_lo in
11986?*) ac_cv_sizeof_long_double=$ac_lo;;
11987'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011988 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011989See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011990echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011991See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011992 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011993 else
11994 ac_cv_sizeof_long_double=0
11995 fi ;;
11996esac
11997else
11998 cat >conftest.$ac_ext <<_ACEOF
11999/* confdefs.h. */
12000_ACEOF
12001cat confdefs.h >>conftest.$ac_ext
12002cat >>conftest.$ac_ext <<_ACEOF
12003/* end confdefs.h. */
12004$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012005 typedef long double ac__type_sizeof_;
12006static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12007static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012008#include <stdio.h>
12009#include <stdlib.h>
12010int
12011main ()
12012{
12013
12014 FILE *f = fopen ("conftest.val", "w");
12015 if (! f)
12016 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012017 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012018 {
12019 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012020 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012021 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012022 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012023 }
12024 else
12025 {
12026 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012027 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012028 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012029 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012030 }
12031 return ferror (f) || fclose (f) != 0;
12032
12033 ;
12034 return 0;
12035}
12036_ACEOF
12037rm -f conftest$ac_exeext
12038if { (ac_try="$ac_link"
12039case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
12048 { (case "(($ac_try" in
12049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12050 *) ac_try_echo=$ac_try;;
12051esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012053 (eval "$ac_try") 2>&5
12054 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012056 (exit $ac_status); }; }; then
12057 ac_cv_sizeof_long_double=`cat conftest.val`
12058else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012059 echo "$as_me: program exited with status $ac_status" >&5
12060echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012061sed 's/^/| /' conftest.$ac_ext >&5
12062
12063( exit $ac_status )
12064if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012065 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012066See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012067echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012068See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012069 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012070 else
12071 ac_cv_sizeof_long_double=0
12072 fi
12073fi
12074rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12075fi
12076rm -f conftest.val
12077fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012078{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12079echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012080
12081
12082
12083cat >>confdefs.h <<_ACEOF
12084#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12085_ACEOF
12086
12087
12088fi
12089
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012090{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12091echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012092have_c99_bool=no
12093cat >conftest.$ac_ext <<_ACEOF
12094/* confdefs.h. */
12095_ACEOF
12096cat confdefs.h >>conftest.$ac_ext
12097cat >>conftest.$ac_ext <<_ACEOF
12098/* end confdefs.h. */
12099
12100int
12101main ()
12102{
12103_Bool x; x = (_Bool)0;
12104 ;
12105 return 0;
12106}
12107_ACEOF
12108rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012109if { (ac_try="$ac_compile"
12110case "(($ac_try" in
12111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12112 *) ac_try_echo=$ac_try;;
12113esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012115 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012116 ac_status=$?
12117 grep -v '^ *+' conftest.er1 >conftest.err
12118 rm -f conftest.er1
12119 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012121 (exit $ac_status); } && {
12122 test -z "$ac_c_werror_flag" ||
12123 test ! -s conftest.err
12124 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012125
12126
12127cat >>confdefs.h <<\_ACEOF
12128#define HAVE_C99_BOOL 1
12129_ACEOF
12130
12131 have_c99_bool=yes
12132
12133else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012134 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012135sed 's/^/| /' conftest.$ac_ext >&5
12136
Martin v. Löwiseba40652007-08-30 20:10:57 +000012137
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012139
12140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012141{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12142echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012143if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012144{ echo "$as_me:$LINENO: checking for _Bool" >&5
12145echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12146if test "${ac_cv_type__Bool+set}" = set; then
12147 echo $ECHO_N "(cached) $ECHO_C" >&6
12148else
12149 cat >conftest.$ac_ext <<_ACEOF
12150/* confdefs.h. */
12151_ACEOF
12152cat confdefs.h >>conftest.$ac_ext
12153cat >>conftest.$ac_ext <<_ACEOF
12154/* end confdefs.h. */
12155$ac_includes_default
12156typedef _Bool ac__type_new_;
12157int
12158main ()
12159{
12160if ((ac__type_new_ *) 0)
12161 return 0;
12162if (sizeof (ac__type_new_))
12163 return 0;
12164 ;
12165 return 0;
12166}
12167_ACEOF
12168rm -f conftest.$ac_objext
12169if { (ac_try="$ac_compile"
12170case "(($ac_try" in
12171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12172 *) ac_try_echo=$ac_try;;
12173esac
12174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12175 (eval "$ac_compile") 2>conftest.er1
12176 ac_status=$?
12177 grep -v '^ *+' conftest.er1 >conftest.err
12178 rm -f conftest.er1
12179 cat conftest.err >&5
12180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12181 (exit $ac_status); } && {
12182 test -z "$ac_c_werror_flag" ||
12183 test ! -s conftest.err
12184 } && test -s conftest.$ac_objext; then
12185 ac_cv_type__Bool=yes
12186else
12187 echo "$as_me: failed program was:" >&5
12188sed 's/^/| /' conftest.$ac_ext >&5
12189
12190 ac_cv_type__Bool=no
12191fi
12192
12193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12194fi
12195{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12196echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12197
Martin v. Löwiseba40652007-08-30 20:10:57 +000012198# The cast to long int works around a bug in the HP C Compiler
12199# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12200# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12201# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012202{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12203echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012204if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012205 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012206else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012207 if test "$cross_compiling" = yes; then
12208 # Depending upon the size, compute the lo and hi bounds.
12209cat >conftest.$ac_ext <<_ACEOF
12210/* confdefs.h. */
12211_ACEOF
12212cat confdefs.h >>conftest.$ac_ext
12213cat >>conftest.$ac_ext <<_ACEOF
12214/* end confdefs.h. */
12215$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012216 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012217int
12218main ()
12219{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012220static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012221test_array [0] = 0
12222
12223 ;
12224 return 0;
12225}
12226_ACEOF
12227rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012228if { (ac_try="$ac_compile"
12229case "(($ac_try" in
12230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12231 *) ac_try_echo=$ac_try;;
12232esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012234 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012235 ac_status=$?
12236 grep -v '^ *+' conftest.er1 >conftest.err
12237 rm -f conftest.er1
12238 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012240 (exit $ac_status); } && {
12241 test -z "$ac_c_werror_flag" ||
12242 test ! -s conftest.err
12243 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012244 ac_lo=0 ac_mid=0
12245 while :; do
12246 cat >conftest.$ac_ext <<_ACEOF
12247/* confdefs.h. */
12248_ACEOF
12249cat confdefs.h >>conftest.$ac_ext
12250cat >>conftest.$ac_ext <<_ACEOF
12251/* end confdefs.h. */
12252$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012253 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012254int
12255main ()
12256{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012257static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012258test_array [0] = 0
12259
12260 ;
12261 return 0;
12262}
12263_ACEOF
12264rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012265if { (ac_try="$ac_compile"
12266case "(($ac_try" in
12267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12268 *) ac_try_echo=$ac_try;;
12269esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012271 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012272 ac_status=$?
12273 grep -v '^ *+' conftest.er1 >conftest.err
12274 rm -f conftest.er1
12275 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012277 (exit $ac_status); } && {
12278 test -z "$ac_c_werror_flag" ||
12279 test ! -s conftest.err
12280 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012281 ac_hi=$ac_mid; break
12282else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012283 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012284sed 's/^/| /' conftest.$ac_ext >&5
12285
Martin v. Löwiseba40652007-08-30 20:10:57 +000012286 ac_lo=`expr $ac_mid + 1`
12287 if test $ac_lo -le $ac_mid; then
12288 ac_lo= ac_hi=
12289 break
12290 fi
12291 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012293
12294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012295 done
12296else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012297 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012298sed 's/^/| /' conftest.$ac_ext >&5
12299
Martin v. Löwiseba40652007-08-30 20:10:57 +000012300 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012301/* confdefs.h. */
12302_ACEOF
12303cat confdefs.h >>conftest.$ac_ext
12304cat >>conftest.$ac_ext <<_ACEOF
12305/* end confdefs.h. */
12306$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012307 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012308int
12309main ()
12310{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012311static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012312test_array [0] = 0
12313
12314 ;
12315 return 0;
12316}
12317_ACEOF
12318rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012319if { (ac_try="$ac_compile"
12320case "(($ac_try" in
12321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12322 *) ac_try_echo=$ac_try;;
12323esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012325 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012326 ac_status=$?
12327 grep -v '^ *+' conftest.er1 >conftest.err
12328 rm -f conftest.er1
12329 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012331 (exit $ac_status); } && {
12332 test -z "$ac_c_werror_flag" ||
12333 test ! -s conftest.err
12334 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012335 ac_hi=-1 ac_mid=-1
12336 while :; do
12337 cat >conftest.$ac_ext <<_ACEOF
12338/* confdefs.h. */
12339_ACEOF
12340cat confdefs.h >>conftest.$ac_ext
12341cat >>conftest.$ac_ext <<_ACEOF
12342/* end confdefs.h. */
12343$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012344 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012345int
12346main ()
12347{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012348static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012349test_array [0] = 0
12350
12351 ;
12352 return 0;
12353}
12354_ACEOF
12355rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012356if { (ac_try="$ac_compile"
12357case "(($ac_try" in
12358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12359 *) ac_try_echo=$ac_try;;
12360esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012362 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012363 ac_status=$?
12364 grep -v '^ *+' conftest.er1 >conftest.err
12365 rm -f conftest.er1
12366 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012368 (exit $ac_status); } && {
12369 test -z "$ac_c_werror_flag" ||
12370 test ! -s conftest.err
12371 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012372 ac_lo=$ac_mid; break
12373else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012374 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012375sed 's/^/| /' conftest.$ac_ext >&5
12376
Martin v. Löwiseba40652007-08-30 20:10:57 +000012377 ac_hi=`expr '(' $ac_mid ')' - 1`
12378 if test $ac_mid -le $ac_hi; then
12379 ac_lo= ac_hi=
12380 break
12381 fi
12382 ac_mid=`expr 2 '*' $ac_mid`
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 +000012386 done
12387else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012388 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012389sed 's/^/| /' conftest.$ac_ext >&5
12390
Martin v. Löwiseba40652007-08-30 20:10:57 +000012391 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012393
12394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012396
12397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012398# Binary search between lo and hi bounds.
12399while test "x$ac_lo" != "x$ac_hi"; do
12400 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12401 cat >conftest.$ac_ext <<_ACEOF
12402/* confdefs.h. */
12403_ACEOF
12404cat confdefs.h >>conftest.$ac_ext
12405cat >>conftest.$ac_ext <<_ACEOF
12406/* end confdefs.h. */
12407$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012408 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012409int
12410main ()
12411{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012412static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012413test_array [0] = 0
12414
12415 ;
12416 return 0;
12417}
12418_ACEOF
12419rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012420if { (ac_try="$ac_compile"
12421case "(($ac_try" in
12422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12423 *) ac_try_echo=$ac_try;;
12424esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012426 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012427 ac_status=$?
12428 grep -v '^ *+' conftest.er1 >conftest.err
12429 rm -f conftest.er1
12430 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012432 (exit $ac_status); } && {
12433 test -z "$ac_c_werror_flag" ||
12434 test ! -s conftest.err
12435 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012436 ac_hi=$ac_mid
12437else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012438 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012439sed 's/^/| /' conftest.$ac_ext >&5
12440
Martin v. Löwiseba40652007-08-30 20:10:57 +000012441 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012443
12444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012445done
12446case $ac_lo in
12447?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012448'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012449 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012450See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012451echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012452See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012453 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012454 else
12455 ac_cv_sizeof__Bool=0
12456 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012457esac
12458else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012459 cat >conftest.$ac_ext <<_ACEOF
12460/* confdefs.h. */
12461_ACEOF
12462cat confdefs.h >>conftest.$ac_ext
12463cat >>conftest.$ac_ext <<_ACEOF
12464/* end confdefs.h. */
12465$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012466 typedef _Bool ac__type_sizeof_;
12467static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12468static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012469#include <stdio.h>
12470#include <stdlib.h>
12471int
12472main ()
12473{
12474
12475 FILE *f = fopen ("conftest.val", "w");
12476 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012477 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012478 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012479 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012480 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012481 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012482 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012483 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012484 }
12485 else
12486 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012487 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012488 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012489 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012490 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012491 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012492 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012493
12494 ;
12495 return 0;
12496}
12497_ACEOF
12498rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012499if { (ac_try="$ac_link"
12500case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012509 { (case "(($ac_try" in
12510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12511 *) ac_try_echo=$ac_try;;
12512esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012514 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012515 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012517 (exit $ac_status); }; }; then
12518 ac_cv_sizeof__Bool=`cat conftest.val`
12519else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012520 echo "$as_me: program exited with status $ac_status" >&5
12521echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012522sed 's/^/| /' conftest.$ac_ext >&5
12523
12524( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012525if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012526 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012527See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012528echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012529See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012530 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012531 else
12532 ac_cv_sizeof__Bool=0
12533 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012535rm -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 +000012536fi
12537rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012538fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012539{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12540echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012541
12542
12543
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012544cat >>confdefs.h <<_ACEOF
12545#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12546_ACEOF
12547
12548
12549fi
12550
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012551{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12552echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012553if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012554 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012555else
12556 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012557/* confdefs.h. */
12558_ACEOF
12559cat confdefs.h >>conftest.$ac_ext
12560cat >>conftest.$ac_ext <<_ACEOF
12561/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012562#ifdef HAVE_STDINT_H
12563 #include <stdint.h>
12564 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012565
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012566typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012567int
12568main ()
12569{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012570if ((ac__type_new_ *) 0)
12571 return 0;
12572if (sizeof (ac__type_new_))
12573 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012574 ;
12575 return 0;
12576}
12577_ACEOF
12578rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012579if { (ac_try="$ac_compile"
12580case "(($ac_try" in
12581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12582 *) ac_try_echo=$ac_try;;
12583esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012585 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012586 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012587 grep -v '^ *+' conftest.er1 >conftest.err
12588 rm -f conftest.er1
12589 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012591 (exit $ac_status); } && {
12592 test -z "$ac_c_werror_flag" ||
12593 test ! -s conftest.err
12594 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012595 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012596else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012597 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012598sed 's/^/| /' conftest.$ac_ext >&5
12599
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012600 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012602
12603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012604fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012605{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12606echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12607if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012608
12609cat >>confdefs.h <<_ACEOF
12610#define HAVE_UINTPTR_T 1
12611_ACEOF
12612
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012613{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12614echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12615if test "${ac_cv_type_uintptr_t+set}" = set; then
12616 echo $ECHO_N "(cached) $ECHO_C" >&6
12617else
12618 cat >conftest.$ac_ext <<_ACEOF
12619/* confdefs.h. */
12620_ACEOF
12621cat confdefs.h >>conftest.$ac_ext
12622cat >>conftest.$ac_ext <<_ACEOF
12623/* end confdefs.h. */
12624$ac_includes_default
12625typedef uintptr_t ac__type_new_;
12626int
12627main ()
12628{
12629if ((ac__type_new_ *) 0)
12630 return 0;
12631if (sizeof (ac__type_new_))
12632 return 0;
12633 ;
12634 return 0;
12635}
12636_ACEOF
12637rm -f conftest.$ac_objext
12638if { (ac_try="$ac_compile"
12639case "(($ac_try" in
12640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12641 *) ac_try_echo=$ac_try;;
12642esac
12643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12644 (eval "$ac_compile") 2>conftest.er1
12645 ac_status=$?
12646 grep -v '^ *+' conftest.er1 >conftest.err
12647 rm -f conftest.er1
12648 cat conftest.err >&5
12649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12650 (exit $ac_status); } && {
12651 test -z "$ac_c_werror_flag" ||
12652 test ! -s conftest.err
12653 } && test -s conftest.$ac_objext; then
12654 ac_cv_type_uintptr_t=yes
12655else
12656 echo "$as_me: failed program was:" >&5
12657sed 's/^/| /' conftest.$ac_ext >&5
12658
12659 ac_cv_type_uintptr_t=no
12660fi
12661
12662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12663fi
12664{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12665echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12666
Martin v. Löwiseba40652007-08-30 20:10:57 +000012667# The cast to long int works around a bug in the HP C Compiler
12668# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12669# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12670# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012671{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12672echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012673if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012674 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012675else
Martin v. Löwis11437992002-04-12 09:54:03 +000012676 if test "$cross_compiling" = yes; then
12677 # Depending upon the size, compute the lo and hi bounds.
12678cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012679/* confdefs.h. */
12680_ACEOF
12681cat confdefs.h >>conftest.$ac_ext
12682cat >>conftest.$ac_ext <<_ACEOF
12683/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012684$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012685 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012686int
12687main ()
12688{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012689static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012690test_array [0] = 0
12691
12692 ;
12693 return 0;
12694}
12695_ACEOF
12696rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012697if { (ac_try="$ac_compile"
12698case "(($ac_try" in
12699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12700 *) ac_try_echo=$ac_try;;
12701esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012703 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012705 grep -v '^ *+' conftest.er1 >conftest.err
12706 rm -f conftest.er1
12707 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012709 (exit $ac_status); } && {
12710 test -z "$ac_c_werror_flag" ||
12711 test ! -s conftest.err
12712 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012713 ac_lo=0 ac_mid=0
12714 while :; do
12715 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012716/* confdefs.h. */
12717_ACEOF
12718cat confdefs.h >>conftest.$ac_ext
12719cat >>conftest.$ac_ext <<_ACEOF
12720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012721$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012722 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012723int
12724main ()
12725{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012726static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012727test_array [0] = 0
12728
12729 ;
12730 return 0;
12731}
12732_ACEOF
12733rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012734if { (ac_try="$ac_compile"
12735case "(($ac_try" in
12736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12737 *) ac_try_echo=$ac_try;;
12738esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012740 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012742 grep -v '^ *+' conftest.er1 >conftest.err
12743 rm -f conftest.er1
12744 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012746 (exit $ac_status); } && {
12747 test -z "$ac_c_werror_flag" ||
12748 test ! -s conftest.err
12749 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012750 ac_hi=$ac_mid; break
12751else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012753sed 's/^/| /' conftest.$ac_ext >&5
12754
Martin v. Löwiseba40652007-08-30 20:10:57 +000012755 ac_lo=`expr $ac_mid + 1`
12756 if test $ac_lo -le $ac_mid; then
12757 ac_lo= ac_hi=
12758 break
12759 fi
12760 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012762
12763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012764 done
12765else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012767sed 's/^/| /' conftest.$ac_ext >&5
12768
Martin v. Löwiseba40652007-08-30 20:10:57 +000012769 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012770/* confdefs.h. */
12771_ACEOF
12772cat confdefs.h >>conftest.$ac_ext
12773cat >>conftest.$ac_ext <<_ACEOF
12774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012775$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012776 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012777int
12778main ()
12779{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012780static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012781test_array [0] = 0
12782
12783 ;
12784 return 0;
12785}
12786_ACEOF
12787rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012788if { (ac_try="$ac_compile"
12789case "(($ac_try" in
12790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12791 *) ac_try_echo=$ac_try;;
12792esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012794 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012795 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012796 grep -v '^ *+' conftest.er1 >conftest.err
12797 rm -f conftest.er1
12798 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012800 (exit $ac_status); } && {
12801 test -z "$ac_c_werror_flag" ||
12802 test ! -s conftest.err
12803 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012804 ac_hi=-1 ac_mid=-1
12805 while :; do
12806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012807/* confdefs.h. */
12808_ACEOF
12809cat confdefs.h >>conftest.$ac_ext
12810cat >>conftest.$ac_ext <<_ACEOF
12811/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012812$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012813 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012814int
12815main ()
12816{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012817static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012818test_array [0] = 0
12819
12820 ;
12821 return 0;
12822}
12823_ACEOF
12824rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012825if { (ac_try="$ac_compile"
12826case "(($ac_try" in
12827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12828 *) ac_try_echo=$ac_try;;
12829esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012831 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012832 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012833 grep -v '^ *+' conftest.er1 >conftest.err
12834 rm -f conftest.er1
12835 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012837 (exit $ac_status); } && {
12838 test -z "$ac_c_werror_flag" ||
12839 test ! -s conftest.err
12840 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012841 ac_lo=$ac_mid; break
12842else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012844sed 's/^/| /' conftest.$ac_ext >&5
12845
Martin v. Löwiseba40652007-08-30 20:10:57 +000012846 ac_hi=`expr '(' $ac_mid ')' - 1`
12847 if test $ac_mid -le $ac_hi; then
12848 ac_lo= ac_hi=
12849 break
12850 fi
12851 ac_mid=`expr 2 '*' $ac_mid`
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 +000012855 done
12856else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012858sed 's/^/| /' conftest.$ac_ext >&5
12859
Martin v. Löwiseba40652007-08-30 20:10:57 +000012860 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012861fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012862
12863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012865
12866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012867# Binary search between lo and hi bounds.
12868while test "x$ac_lo" != "x$ac_hi"; do
12869 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12870 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012871/* confdefs.h. */
12872_ACEOF
12873cat confdefs.h >>conftest.$ac_ext
12874cat >>conftest.$ac_ext <<_ACEOF
12875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012876$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012877 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012878int
12879main ()
12880{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012881static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012882test_array [0] = 0
12883
12884 ;
12885 return 0;
12886}
12887_ACEOF
12888rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012889if { (ac_try="$ac_compile"
12890case "(($ac_try" in
12891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12892 *) ac_try_echo=$ac_try;;
12893esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012895 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012896 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012897 grep -v '^ *+' conftest.er1 >conftest.err
12898 rm -f conftest.er1
12899 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012901 (exit $ac_status); } && {
12902 test -z "$ac_c_werror_flag" ||
12903 test ! -s conftest.err
12904 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012905 ac_hi=$ac_mid
12906else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012908sed 's/^/| /' conftest.$ac_ext >&5
12909
Martin v. Löwiseba40652007-08-30 20:10:57 +000012910 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012911fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012912
12913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012914done
12915case $ac_lo in
12916?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012917'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012918 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012919See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012920echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012921See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012922 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012923 else
12924 ac_cv_sizeof_uintptr_t=0
12925 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012926esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012927else
Martin v. Löwis11437992002-04-12 09:54:03 +000012928 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012929/* confdefs.h. */
12930_ACEOF
12931cat confdefs.h >>conftest.$ac_ext
12932cat >>conftest.$ac_ext <<_ACEOF
12933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012934$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012935 typedef uintptr_t ac__type_sizeof_;
12936static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12937static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012938#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012939#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012940int
12941main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012942{
Martin v. Löwis11437992002-04-12 09:54:03 +000012943
12944 FILE *f = fopen ("conftest.val", "w");
12945 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012946 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012947 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012948 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012949 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012950 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012951 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012952 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 }
12954 else
12955 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012956 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012957 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012958 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012959 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012960 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012961 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012962
12963 ;
12964 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012965}
Martin v. Löwis11437992002-04-12 09:54:03 +000012966_ACEOF
12967rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012968if { (ac_try="$ac_link"
12969case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012978 { (case "(($ac_try" in
12979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12980 *) ac_try_echo=$ac_try;;
12981esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012983 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012984 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012986 (exit $ac_status); }; }; then
12987 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012988else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012989 echo "$as_me: program exited with status $ac_status" >&5
12990echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012991sed 's/^/| /' conftest.$ac_ext >&5
12992
Martin v. Löwis11437992002-04-12 09:54:03 +000012993( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012994if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012995 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012996See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012997echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012998See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012999 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013000 else
13001 ac_cv_sizeof_uintptr_t=0
13002 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013004rm -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 +000013005fi
13006rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013007fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013008{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13009echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013010
13011
13012
Martin v. Löwis11437992002-04-12 09:54:03 +000013013cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013014#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013015_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013016
Michael W. Hudson54241132001-12-07 15:38:26 +000013017
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013018fi
13019
Martin v. Löwisebe26702006-10-02 14:55:51 +000013020
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013021{ echo "$as_me:$LINENO: checking for off_t" >&5
13022echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13023if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013024 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013025else
Martin v. Löwis11437992002-04-12 09:54:03 +000013026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013027/* confdefs.h. */
13028_ACEOF
13029cat confdefs.h >>conftest.$ac_ext
13030cat >>conftest.$ac_ext <<_ACEOF
13031/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013032
13033#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013034#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013035#endif
13036
13037
13038typedef off_t ac__type_new_;
13039int
13040main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013041{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013042if ((ac__type_new_ *) 0)
13043 return 0;
13044if (sizeof (ac__type_new_))
13045 return 0;
13046 ;
13047 return 0;
13048}
13049_ACEOF
13050rm -f conftest.$ac_objext
13051if { (ac_try="$ac_compile"
13052case "(($ac_try" in
13053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13054 *) ac_try_echo=$ac_try;;
13055esac
13056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13057 (eval "$ac_compile") 2>conftest.er1
13058 ac_status=$?
13059 grep -v '^ *+' conftest.er1 >conftest.err
13060 rm -f conftest.er1
13061 cat conftest.err >&5
13062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13063 (exit $ac_status); } && {
13064 test -z "$ac_c_werror_flag" ||
13065 test ! -s conftest.err
13066 } && test -s conftest.$ac_objext; then
13067 ac_cv_type_off_t=yes
13068else
13069 echo "$as_me: failed program was:" >&5
13070sed 's/^/| /' conftest.$ac_ext >&5
13071
13072 ac_cv_type_off_t=no
13073fi
13074
13075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13076fi
13077{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13078echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13079
13080# The cast to long int works around a bug in the HP C Compiler
13081# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13082# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13083# This bug is HP SR number 8606223364.
13084{ echo "$as_me:$LINENO: checking size of off_t" >&5
13085echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13086if test "${ac_cv_sizeof_off_t+set}" = set; then
13087 echo $ECHO_N "(cached) $ECHO_C" >&6
13088else
13089 if test "$cross_compiling" = yes; then
13090 # Depending upon the size, compute the lo and hi bounds.
13091cat >conftest.$ac_ext <<_ACEOF
13092/* confdefs.h. */
13093_ACEOF
13094cat confdefs.h >>conftest.$ac_ext
13095cat >>conftest.$ac_ext <<_ACEOF
13096/* end confdefs.h. */
13097
13098#ifdef HAVE_SYS_TYPES_H
13099#include <sys/types.h>
13100#endif
13101
13102
13103 typedef off_t ac__type_sizeof_;
13104int
13105main ()
13106{
13107static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13108test_array [0] = 0
13109
13110 ;
13111 return 0;
13112}
13113_ACEOF
13114rm -f conftest.$ac_objext
13115if { (ac_try="$ac_compile"
13116case "(($ac_try" in
13117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13118 *) ac_try_echo=$ac_try;;
13119esac
13120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13121 (eval "$ac_compile") 2>conftest.er1
13122 ac_status=$?
13123 grep -v '^ *+' conftest.er1 >conftest.err
13124 rm -f conftest.er1
13125 cat conftest.err >&5
13126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13127 (exit $ac_status); } && {
13128 test -z "$ac_c_werror_flag" ||
13129 test ! -s conftest.err
13130 } && test -s conftest.$ac_objext; then
13131 ac_lo=0 ac_mid=0
13132 while :; do
13133 cat >conftest.$ac_ext <<_ACEOF
13134/* confdefs.h. */
13135_ACEOF
13136cat confdefs.h >>conftest.$ac_ext
13137cat >>conftest.$ac_ext <<_ACEOF
13138/* end confdefs.h. */
13139
13140#ifdef HAVE_SYS_TYPES_H
13141#include <sys/types.h>
13142#endif
13143
13144
13145 typedef off_t ac__type_sizeof_;
13146int
13147main ()
13148{
13149static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13150test_array [0] = 0
13151
13152 ;
13153 return 0;
13154}
13155_ACEOF
13156rm -f conftest.$ac_objext
13157if { (ac_try="$ac_compile"
13158case "(($ac_try" in
13159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13160 *) ac_try_echo=$ac_try;;
13161esac
13162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13163 (eval "$ac_compile") 2>conftest.er1
13164 ac_status=$?
13165 grep -v '^ *+' conftest.er1 >conftest.err
13166 rm -f conftest.er1
13167 cat conftest.err >&5
13168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13169 (exit $ac_status); } && {
13170 test -z "$ac_c_werror_flag" ||
13171 test ! -s conftest.err
13172 } && test -s conftest.$ac_objext; then
13173 ac_hi=$ac_mid; break
13174else
13175 echo "$as_me: failed program was:" >&5
13176sed 's/^/| /' conftest.$ac_ext >&5
13177
13178 ac_lo=`expr $ac_mid + 1`
13179 if test $ac_lo -le $ac_mid; then
13180 ac_lo= ac_hi=
13181 break
13182 fi
13183 ac_mid=`expr 2 '*' $ac_mid + 1`
13184fi
13185
13186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13187 done
13188else
13189 echo "$as_me: failed program was:" >&5
13190sed 's/^/| /' conftest.$ac_ext >&5
13191
13192 cat >conftest.$ac_ext <<_ACEOF
13193/* confdefs.h. */
13194_ACEOF
13195cat confdefs.h >>conftest.$ac_ext
13196cat >>conftest.$ac_ext <<_ACEOF
13197/* end confdefs.h. */
13198
13199#ifdef HAVE_SYS_TYPES_H
13200#include <sys/types.h>
13201#endif
13202
13203
13204 typedef off_t ac__type_sizeof_;
13205int
13206main ()
13207{
13208static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13209test_array [0] = 0
13210
13211 ;
13212 return 0;
13213}
13214_ACEOF
13215rm -f conftest.$ac_objext
13216if { (ac_try="$ac_compile"
13217case "(($ac_try" in
13218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13219 *) ac_try_echo=$ac_try;;
13220esac
13221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13222 (eval "$ac_compile") 2>conftest.er1
13223 ac_status=$?
13224 grep -v '^ *+' conftest.er1 >conftest.err
13225 rm -f conftest.er1
13226 cat conftest.err >&5
13227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13228 (exit $ac_status); } && {
13229 test -z "$ac_c_werror_flag" ||
13230 test ! -s conftest.err
13231 } && test -s conftest.$ac_objext; then
13232 ac_hi=-1 ac_mid=-1
13233 while :; do
13234 cat >conftest.$ac_ext <<_ACEOF
13235/* confdefs.h. */
13236_ACEOF
13237cat confdefs.h >>conftest.$ac_ext
13238cat >>conftest.$ac_ext <<_ACEOF
13239/* end confdefs.h. */
13240
13241#ifdef HAVE_SYS_TYPES_H
13242#include <sys/types.h>
13243#endif
13244
13245
13246 typedef off_t ac__type_sizeof_;
13247int
13248main ()
13249{
13250static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13251test_array [0] = 0
13252
13253 ;
13254 return 0;
13255}
13256_ACEOF
13257rm -f conftest.$ac_objext
13258if { (ac_try="$ac_compile"
13259case "(($ac_try" in
13260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13261 *) ac_try_echo=$ac_try;;
13262esac
13263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13264 (eval "$ac_compile") 2>conftest.er1
13265 ac_status=$?
13266 grep -v '^ *+' conftest.er1 >conftest.err
13267 rm -f conftest.er1
13268 cat conftest.err >&5
13269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13270 (exit $ac_status); } && {
13271 test -z "$ac_c_werror_flag" ||
13272 test ! -s conftest.err
13273 } && test -s conftest.$ac_objext; then
13274 ac_lo=$ac_mid; break
13275else
13276 echo "$as_me: failed program was:" >&5
13277sed 's/^/| /' conftest.$ac_ext >&5
13278
13279 ac_hi=`expr '(' $ac_mid ')' - 1`
13280 if test $ac_mid -le $ac_hi; then
13281 ac_lo= ac_hi=
13282 break
13283 fi
13284 ac_mid=`expr 2 '*' $ac_mid`
13285fi
13286
13287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13288 done
13289else
13290 echo "$as_me: failed program was:" >&5
13291sed 's/^/| /' conftest.$ac_ext >&5
13292
13293 ac_lo= ac_hi=
13294fi
13295
13296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13297fi
13298
13299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13300# Binary search between lo and hi bounds.
13301while test "x$ac_lo" != "x$ac_hi"; do
13302 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13303 cat >conftest.$ac_ext <<_ACEOF
13304/* confdefs.h. */
13305_ACEOF
13306cat confdefs.h >>conftest.$ac_ext
13307cat >>conftest.$ac_ext <<_ACEOF
13308/* end confdefs.h. */
13309
13310#ifdef HAVE_SYS_TYPES_H
13311#include <sys/types.h>
13312#endif
13313
13314
13315 typedef off_t ac__type_sizeof_;
13316int
13317main ()
13318{
13319static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13320test_array [0] = 0
13321
13322 ;
13323 return 0;
13324}
13325_ACEOF
13326rm -f conftest.$ac_objext
13327if { (ac_try="$ac_compile"
13328case "(($ac_try" in
13329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13330 *) ac_try_echo=$ac_try;;
13331esac
13332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13333 (eval "$ac_compile") 2>conftest.er1
13334 ac_status=$?
13335 grep -v '^ *+' conftest.er1 >conftest.err
13336 rm -f conftest.er1
13337 cat conftest.err >&5
13338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13339 (exit $ac_status); } && {
13340 test -z "$ac_c_werror_flag" ||
13341 test ! -s conftest.err
13342 } && test -s conftest.$ac_objext; then
13343 ac_hi=$ac_mid
13344else
13345 echo "$as_me: failed program was:" >&5
13346sed 's/^/| /' conftest.$ac_ext >&5
13347
13348 ac_lo=`expr '(' $ac_mid ')' + 1`
13349fi
13350
13351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13352done
13353case $ac_lo in
13354?*) ac_cv_sizeof_off_t=$ac_lo;;
13355'') if test "$ac_cv_type_off_t" = yes; then
13356 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13357See \`config.log' for more details." >&5
13358echo "$as_me: error: cannot compute sizeof (off_t)
13359See \`config.log' for more details." >&2;}
13360 { (exit 77); exit 77; }; }
13361 else
13362 ac_cv_sizeof_off_t=0
13363 fi ;;
13364esac
13365else
13366 cat >conftest.$ac_ext <<_ACEOF
13367/* confdefs.h. */
13368_ACEOF
13369cat confdefs.h >>conftest.$ac_ext
13370cat >>conftest.$ac_ext <<_ACEOF
13371/* end confdefs.h. */
13372
13373#ifdef HAVE_SYS_TYPES_H
13374#include <sys/types.h>
13375#endif
13376
13377
13378 typedef off_t ac__type_sizeof_;
13379static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13380static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13381#include <stdio.h>
13382#include <stdlib.h>
13383int
13384main ()
13385{
13386
13387 FILE *f = fopen ("conftest.val", "w");
13388 if (! f)
13389 return 1;
13390 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13391 {
13392 long int i = longval ();
13393 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13394 return 1;
13395 fprintf (f, "%ld\n", i);
13396 }
13397 else
13398 {
13399 unsigned long int i = ulongval ();
13400 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13401 return 1;
13402 fprintf (f, "%lu\n", i);
13403 }
13404 return ferror (f) || fclose (f) != 0;
13405
13406 ;
13407 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013408}
Martin v. Löwis11437992002-04-12 09:54:03 +000013409_ACEOF
13410rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013411if { (ac_try="$ac_link"
13412case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013421 { (case "(($ac_try" in
13422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13423 *) ac_try_echo=$ac_try;;
13424esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013426 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013427 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013429 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013430 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013431else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013432 echo "$as_me: program exited with status $ac_status" >&5
13433echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013434sed 's/^/| /' conftest.$ac_ext >&5
13435
Martin v. Löwis11437992002-04-12 09:54:03 +000013436( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013437if test "$ac_cv_type_off_t" = yes; then
13438 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13439See \`config.log' for more details." >&5
13440echo "$as_me: error: cannot compute sizeof (off_t)
13441See \`config.log' for more details." >&2;}
13442 { (exit 77); exit 77; }; }
13443 else
13444 ac_cv_sizeof_off_t=0
13445 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013447rm -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 +000013448fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013449rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013450fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013451{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13452echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013453
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013454
13455
Martin v. Löwis11437992002-04-12 09:54:03 +000013456cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013457#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013458_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013459
Michael W. Hudson54241132001-12-07 15:38:26 +000013460
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013461
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013462{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13463echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013464if test "$have_long_long" = yes -a \
13465 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13466 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013467
Martin v. Löwis11437992002-04-12 09:54:03 +000013468cat >>confdefs.h <<\_ACEOF
13469#define HAVE_LARGEFILE_SUPPORT 1
13470_ACEOF
13471
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013472 { echo "$as_me:$LINENO: result: yes" >&5
13473echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013474else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013475 { echo "$as_me:$LINENO: result: no" >&5
13476echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013477fi
13478
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013479{ echo "$as_me:$LINENO: checking for time_t" >&5
13480echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13481if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013482 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013483else
Martin v. Löwis11437992002-04-12 09:54:03 +000013484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013485/* confdefs.h. */
13486_ACEOF
13487cat confdefs.h >>conftest.$ac_ext
13488cat >>conftest.$ac_ext <<_ACEOF
13489/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013490
13491#ifdef HAVE_SYS_TYPES_H
13492#include <sys/types.h>
13493#endif
13494#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013495#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013496#endif
13497
13498
13499typedef time_t ac__type_new_;
13500int
13501main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013502{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013503if ((ac__type_new_ *) 0)
13504 return 0;
13505if (sizeof (ac__type_new_))
13506 return 0;
13507 ;
13508 return 0;
13509}
13510_ACEOF
13511rm -f conftest.$ac_objext
13512if { (ac_try="$ac_compile"
13513case "(($ac_try" in
13514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13515 *) ac_try_echo=$ac_try;;
13516esac
13517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13518 (eval "$ac_compile") 2>conftest.er1
13519 ac_status=$?
13520 grep -v '^ *+' conftest.er1 >conftest.err
13521 rm -f conftest.er1
13522 cat conftest.err >&5
13523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13524 (exit $ac_status); } && {
13525 test -z "$ac_c_werror_flag" ||
13526 test ! -s conftest.err
13527 } && test -s conftest.$ac_objext; then
13528 ac_cv_type_time_t=yes
13529else
13530 echo "$as_me: failed program was:" >&5
13531sed 's/^/| /' conftest.$ac_ext >&5
13532
13533 ac_cv_type_time_t=no
13534fi
13535
13536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13537fi
13538{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13539echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13540
13541# The cast to long int works around a bug in the HP C Compiler
13542# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13543# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13544# This bug is HP SR number 8606223364.
13545{ echo "$as_me:$LINENO: checking size of time_t" >&5
13546echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13547if test "${ac_cv_sizeof_time_t+set}" = set; then
13548 echo $ECHO_N "(cached) $ECHO_C" >&6
13549else
13550 if test "$cross_compiling" = yes; then
13551 # Depending upon the size, compute the lo and hi bounds.
13552cat >conftest.$ac_ext <<_ACEOF
13553/* confdefs.h. */
13554_ACEOF
13555cat confdefs.h >>conftest.$ac_ext
13556cat >>conftest.$ac_ext <<_ACEOF
13557/* end confdefs.h. */
13558
13559#ifdef HAVE_SYS_TYPES_H
13560#include <sys/types.h>
13561#endif
13562#ifdef HAVE_TIME_H
13563#include <time.h>
13564#endif
13565
13566
13567 typedef time_t ac__type_sizeof_;
13568int
13569main ()
13570{
13571static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13572test_array [0] = 0
13573
13574 ;
13575 return 0;
13576}
13577_ACEOF
13578rm -f conftest.$ac_objext
13579if { (ac_try="$ac_compile"
13580case "(($ac_try" in
13581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13582 *) ac_try_echo=$ac_try;;
13583esac
13584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13585 (eval "$ac_compile") 2>conftest.er1
13586 ac_status=$?
13587 grep -v '^ *+' conftest.er1 >conftest.err
13588 rm -f conftest.er1
13589 cat conftest.err >&5
13590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13591 (exit $ac_status); } && {
13592 test -z "$ac_c_werror_flag" ||
13593 test ! -s conftest.err
13594 } && test -s conftest.$ac_objext; then
13595 ac_lo=0 ac_mid=0
13596 while :; do
13597 cat >conftest.$ac_ext <<_ACEOF
13598/* confdefs.h. */
13599_ACEOF
13600cat confdefs.h >>conftest.$ac_ext
13601cat >>conftest.$ac_ext <<_ACEOF
13602/* end confdefs.h. */
13603
13604#ifdef HAVE_SYS_TYPES_H
13605#include <sys/types.h>
13606#endif
13607#ifdef HAVE_TIME_H
13608#include <time.h>
13609#endif
13610
13611
13612 typedef time_t ac__type_sizeof_;
13613int
13614main ()
13615{
13616static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13617test_array [0] = 0
13618
13619 ;
13620 return 0;
13621}
13622_ACEOF
13623rm -f conftest.$ac_objext
13624if { (ac_try="$ac_compile"
13625case "(($ac_try" in
13626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13627 *) ac_try_echo=$ac_try;;
13628esac
13629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13630 (eval "$ac_compile") 2>conftest.er1
13631 ac_status=$?
13632 grep -v '^ *+' conftest.er1 >conftest.err
13633 rm -f conftest.er1
13634 cat conftest.err >&5
13635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13636 (exit $ac_status); } && {
13637 test -z "$ac_c_werror_flag" ||
13638 test ! -s conftest.err
13639 } && test -s conftest.$ac_objext; then
13640 ac_hi=$ac_mid; break
13641else
13642 echo "$as_me: failed program was:" >&5
13643sed 's/^/| /' conftest.$ac_ext >&5
13644
13645 ac_lo=`expr $ac_mid + 1`
13646 if test $ac_lo -le $ac_mid; then
13647 ac_lo= ac_hi=
13648 break
13649 fi
13650 ac_mid=`expr 2 '*' $ac_mid + 1`
13651fi
13652
13653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13654 done
13655else
13656 echo "$as_me: failed program was:" >&5
13657sed 's/^/| /' conftest.$ac_ext >&5
13658
13659 cat >conftest.$ac_ext <<_ACEOF
13660/* confdefs.h. */
13661_ACEOF
13662cat confdefs.h >>conftest.$ac_ext
13663cat >>conftest.$ac_ext <<_ACEOF
13664/* end confdefs.h. */
13665
13666#ifdef HAVE_SYS_TYPES_H
13667#include <sys/types.h>
13668#endif
13669#ifdef HAVE_TIME_H
13670#include <time.h>
13671#endif
13672
13673
13674 typedef time_t ac__type_sizeof_;
13675int
13676main ()
13677{
13678static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13679test_array [0] = 0
13680
13681 ;
13682 return 0;
13683}
13684_ACEOF
13685rm -f conftest.$ac_objext
13686if { (ac_try="$ac_compile"
13687case "(($ac_try" in
13688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13689 *) ac_try_echo=$ac_try;;
13690esac
13691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13692 (eval "$ac_compile") 2>conftest.er1
13693 ac_status=$?
13694 grep -v '^ *+' conftest.er1 >conftest.err
13695 rm -f conftest.er1
13696 cat conftest.err >&5
13697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13698 (exit $ac_status); } && {
13699 test -z "$ac_c_werror_flag" ||
13700 test ! -s conftest.err
13701 } && test -s conftest.$ac_objext; then
13702 ac_hi=-1 ac_mid=-1
13703 while :; do
13704 cat >conftest.$ac_ext <<_ACEOF
13705/* confdefs.h. */
13706_ACEOF
13707cat confdefs.h >>conftest.$ac_ext
13708cat >>conftest.$ac_ext <<_ACEOF
13709/* end confdefs.h. */
13710
13711#ifdef HAVE_SYS_TYPES_H
13712#include <sys/types.h>
13713#endif
13714#ifdef HAVE_TIME_H
13715#include <time.h>
13716#endif
13717
13718
13719 typedef time_t ac__type_sizeof_;
13720int
13721main ()
13722{
13723static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13724test_array [0] = 0
13725
13726 ;
13727 return 0;
13728}
13729_ACEOF
13730rm -f conftest.$ac_objext
13731if { (ac_try="$ac_compile"
13732case "(($ac_try" in
13733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13734 *) ac_try_echo=$ac_try;;
13735esac
13736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13737 (eval "$ac_compile") 2>conftest.er1
13738 ac_status=$?
13739 grep -v '^ *+' conftest.er1 >conftest.err
13740 rm -f conftest.er1
13741 cat conftest.err >&5
13742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13743 (exit $ac_status); } && {
13744 test -z "$ac_c_werror_flag" ||
13745 test ! -s conftest.err
13746 } && test -s conftest.$ac_objext; then
13747 ac_lo=$ac_mid; break
13748else
13749 echo "$as_me: failed program was:" >&5
13750sed 's/^/| /' conftest.$ac_ext >&5
13751
13752 ac_hi=`expr '(' $ac_mid ')' - 1`
13753 if test $ac_mid -le $ac_hi; then
13754 ac_lo= ac_hi=
13755 break
13756 fi
13757 ac_mid=`expr 2 '*' $ac_mid`
13758fi
13759
13760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13761 done
13762else
13763 echo "$as_me: failed program was:" >&5
13764sed 's/^/| /' conftest.$ac_ext >&5
13765
13766 ac_lo= ac_hi=
13767fi
13768
13769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13770fi
13771
13772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13773# Binary search between lo and hi bounds.
13774while test "x$ac_lo" != "x$ac_hi"; do
13775 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13776 cat >conftest.$ac_ext <<_ACEOF
13777/* confdefs.h. */
13778_ACEOF
13779cat confdefs.h >>conftest.$ac_ext
13780cat >>conftest.$ac_ext <<_ACEOF
13781/* end confdefs.h. */
13782
13783#ifdef HAVE_SYS_TYPES_H
13784#include <sys/types.h>
13785#endif
13786#ifdef HAVE_TIME_H
13787#include <time.h>
13788#endif
13789
13790
13791 typedef time_t ac__type_sizeof_;
13792int
13793main ()
13794{
13795static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13796test_array [0] = 0
13797
13798 ;
13799 return 0;
13800}
13801_ACEOF
13802rm -f conftest.$ac_objext
13803if { (ac_try="$ac_compile"
13804case "(($ac_try" in
13805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13806 *) ac_try_echo=$ac_try;;
13807esac
13808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13809 (eval "$ac_compile") 2>conftest.er1
13810 ac_status=$?
13811 grep -v '^ *+' conftest.er1 >conftest.err
13812 rm -f conftest.er1
13813 cat conftest.err >&5
13814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13815 (exit $ac_status); } && {
13816 test -z "$ac_c_werror_flag" ||
13817 test ! -s conftest.err
13818 } && test -s conftest.$ac_objext; then
13819 ac_hi=$ac_mid
13820else
13821 echo "$as_me: failed program was:" >&5
13822sed 's/^/| /' conftest.$ac_ext >&5
13823
13824 ac_lo=`expr '(' $ac_mid ')' + 1`
13825fi
13826
13827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13828done
13829case $ac_lo in
13830?*) ac_cv_sizeof_time_t=$ac_lo;;
13831'') if test "$ac_cv_type_time_t" = yes; then
13832 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13833See \`config.log' for more details." >&5
13834echo "$as_me: error: cannot compute sizeof (time_t)
13835See \`config.log' for more details." >&2;}
13836 { (exit 77); exit 77; }; }
13837 else
13838 ac_cv_sizeof_time_t=0
13839 fi ;;
13840esac
13841else
13842 cat >conftest.$ac_ext <<_ACEOF
13843/* confdefs.h. */
13844_ACEOF
13845cat confdefs.h >>conftest.$ac_ext
13846cat >>conftest.$ac_ext <<_ACEOF
13847/* end confdefs.h. */
13848
13849#ifdef HAVE_SYS_TYPES_H
13850#include <sys/types.h>
13851#endif
13852#ifdef HAVE_TIME_H
13853#include <time.h>
13854#endif
13855
13856
13857 typedef time_t ac__type_sizeof_;
13858static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13859static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13860#include <stdio.h>
13861#include <stdlib.h>
13862int
13863main ()
13864{
13865
13866 FILE *f = fopen ("conftest.val", "w");
13867 if (! f)
13868 return 1;
13869 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13870 {
13871 long int i = longval ();
13872 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13873 return 1;
13874 fprintf (f, "%ld\n", i);
13875 }
13876 else
13877 {
13878 unsigned long int i = ulongval ();
13879 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13880 return 1;
13881 fprintf (f, "%lu\n", i);
13882 }
13883 return ferror (f) || fclose (f) != 0;
13884
13885 ;
13886 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013887}
Martin v. Löwis11437992002-04-12 09:54:03 +000013888_ACEOF
13889rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013890if { (ac_try="$ac_link"
13891case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013900 { (case "(($ac_try" in
13901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13902 *) ac_try_echo=$ac_try;;
13903esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013905 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013906 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013908 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013909 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013910else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013911 echo "$as_me: program exited with status $ac_status" >&5
13912echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013913sed 's/^/| /' conftest.$ac_ext >&5
13914
Martin v. Löwis11437992002-04-12 09:54:03 +000013915( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013916if test "$ac_cv_type_time_t" = yes; then
13917 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13918See \`config.log' for more details." >&5
13919echo "$as_me: error: cannot compute sizeof (time_t)
13920See \`config.log' for more details." >&2;}
13921 { (exit 77); exit 77; }; }
13922 else
13923 ac_cv_sizeof_time_t=0
13924 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013926rm -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 +000013927fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013928rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013929fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013930{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13931echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013932
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013933
13934
Martin v. Löwis11437992002-04-12 09:54:03 +000013935cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013936#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013937_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013938
Michael W. Hudson54241132001-12-07 15:38:26 +000013939
13940
Trent Mick635f6fb2000-08-23 21:33:05 +000013941# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013942ac_save_cc="$CC"
13943if test "$ac_cv_kpthread" = "yes"
13944then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013945elif test "$ac_cv_kthread" = "yes"
13946then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013947elif test "$ac_cv_pthread" = "yes"
13948then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013949fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013950{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13951echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013952have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013953cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013954/* confdefs.h. */
13955_ACEOF
13956cat confdefs.h >>conftest.$ac_ext
13957cat >>conftest.$ac_ext <<_ACEOF
13958/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013959#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013960int
13961main ()
13962{
Guido van Rossum12580492000-09-24 16:47:19 +000013963pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013964 ;
13965 return 0;
13966}
13967_ACEOF
13968rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013969if { (ac_try="$ac_compile"
13970case "(($ac_try" in
13971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13972 *) ac_try_echo=$ac_try;;
13973esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013975 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013976 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013977 grep -v '^ *+' conftest.er1 >conftest.err
13978 rm -f conftest.er1
13979 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013981 (exit $ac_status); } && {
13982 test -z "$ac_c_werror_flag" ||
13983 test ! -s conftest.err
13984 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013985 have_pthread_t=yes
13986else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013988sed 's/^/| /' conftest.$ac_ext >&5
13989
Martin v. Löwiseba40652007-08-30 20:10:57 +000013990
Trent Mick635f6fb2000-08-23 21:33:05 +000013991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013992
13993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013994{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13995echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013996if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013997 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13998echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13999if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014000 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014001else
Martin v. Löwis11437992002-04-12 09:54:03 +000014002 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014003/* confdefs.h. */
14004_ACEOF
14005cat confdefs.h >>conftest.$ac_ext
14006cat >>conftest.$ac_ext <<_ACEOF
14007/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014008
14009#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014010#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014011#endif
14012
14013
14014typedef pthread_t ac__type_new_;
14015int
14016main ()
14017{
14018if ((ac__type_new_ *) 0)
14019 return 0;
14020if (sizeof (ac__type_new_))
14021 return 0;
14022 ;
14023 return 0;
14024}
14025_ACEOF
14026rm -f conftest.$ac_objext
14027if { (ac_try="$ac_compile"
14028case "(($ac_try" in
14029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14030 *) ac_try_echo=$ac_try;;
14031esac
14032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14033 (eval "$ac_compile") 2>conftest.er1
14034 ac_status=$?
14035 grep -v '^ *+' conftest.er1 >conftest.err
14036 rm -f conftest.er1
14037 cat conftest.err >&5
14038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14039 (exit $ac_status); } && {
14040 test -z "$ac_c_werror_flag" ||
14041 test ! -s conftest.err
14042 } && test -s conftest.$ac_objext; then
14043 ac_cv_type_pthread_t=yes
14044else
14045 echo "$as_me: failed program was:" >&5
14046sed 's/^/| /' conftest.$ac_ext >&5
14047
14048 ac_cv_type_pthread_t=no
14049fi
14050
14051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14052fi
14053{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14054echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14055
14056# The cast to long int works around a bug in the HP C Compiler
14057# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14058# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14059# This bug is HP SR number 8606223364.
14060{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14061echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14062if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14063 echo $ECHO_N "(cached) $ECHO_C" >&6
14064else
14065 if test "$cross_compiling" = yes; then
14066 # Depending upon the size, compute the lo and hi bounds.
14067cat >conftest.$ac_ext <<_ACEOF
14068/* confdefs.h. */
14069_ACEOF
14070cat confdefs.h >>conftest.$ac_ext
14071cat >>conftest.$ac_ext <<_ACEOF
14072/* end confdefs.h. */
14073
14074#ifdef HAVE_PTHREAD_H
14075#include <pthread.h>
14076#endif
14077
14078
14079 typedef pthread_t ac__type_sizeof_;
14080int
14081main ()
14082{
14083static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14084test_array [0] = 0
14085
14086 ;
14087 return 0;
14088}
14089_ACEOF
14090rm -f conftest.$ac_objext
14091if { (ac_try="$ac_compile"
14092case "(($ac_try" in
14093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14094 *) ac_try_echo=$ac_try;;
14095esac
14096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14097 (eval "$ac_compile") 2>conftest.er1
14098 ac_status=$?
14099 grep -v '^ *+' conftest.er1 >conftest.err
14100 rm -f conftest.er1
14101 cat conftest.err >&5
14102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14103 (exit $ac_status); } && {
14104 test -z "$ac_c_werror_flag" ||
14105 test ! -s conftest.err
14106 } && test -s conftest.$ac_objext; then
14107 ac_lo=0 ac_mid=0
14108 while :; do
14109 cat >conftest.$ac_ext <<_ACEOF
14110/* confdefs.h. */
14111_ACEOF
14112cat confdefs.h >>conftest.$ac_ext
14113cat >>conftest.$ac_ext <<_ACEOF
14114/* end confdefs.h. */
14115
14116#ifdef HAVE_PTHREAD_H
14117#include <pthread.h>
14118#endif
14119
14120
14121 typedef pthread_t ac__type_sizeof_;
14122int
14123main ()
14124{
14125static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14126test_array [0] = 0
14127
14128 ;
14129 return 0;
14130}
14131_ACEOF
14132rm -f conftest.$ac_objext
14133if { (ac_try="$ac_compile"
14134case "(($ac_try" in
14135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14136 *) ac_try_echo=$ac_try;;
14137esac
14138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14139 (eval "$ac_compile") 2>conftest.er1
14140 ac_status=$?
14141 grep -v '^ *+' conftest.er1 >conftest.err
14142 rm -f conftest.er1
14143 cat conftest.err >&5
14144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14145 (exit $ac_status); } && {
14146 test -z "$ac_c_werror_flag" ||
14147 test ! -s conftest.err
14148 } && test -s conftest.$ac_objext; then
14149 ac_hi=$ac_mid; break
14150else
14151 echo "$as_me: failed program was:" >&5
14152sed 's/^/| /' conftest.$ac_ext >&5
14153
14154 ac_lo=`expr $ac_mid + 1`
14155 if test $ac_lo -le $ac_mid; then
14156 ac_lo= ac_hi=
14157 break
14158 fi
14159 ac_mid=`expr 2 '*' $ac_mid + 1`
14160fi
14161
14162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14163 done
14164else
14165 echo "$as_me: failed program was:" >&5
14166sed 's/^/| /' conftest.$ac_ext >&5
14167
14168 cat >conftest.$ac_ext <<_ACEOF
14169/* confdefs.h. */
14170_ACEOF
14171cat confdefs.h >>conftest.$ac_ext
14172cat >>conftest.$ac_ext <<_ACEOF
14173/* end confdefs.h. */
14174
14175#ifdef HAVE_PTHREAD_H
14176#include <pthread.h>
14177#endif
14178
14179
14180 typedef pthread_t ac__type_sizeof_;
14181int
14182main ()
14183{
14184static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14185test_array [0] = 0
14186
14187 ;
14188 return 0;
14189}
14190_ACEOF
14191rm -f conftest.$ac_objext
14192if { (ac_try="$ac_compile"
14193case "(($ac_try" in
14194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14195 *) ac_try_echo=$ac_try;;
14196esac
14197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14198 (eval "$ac_compile") 2>conftest.er1
14199 ac_status=$?
14200 grep -v '^ *+' conftest.er1 >conftest.err
14201 rm -f conftest.er1
14202 cat conftest.err >&5
14203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14204 (exit $ac_status); } && {
14205 test -z "$ac_c_werror_flag" ||
14206 test ! -s conftest.err
14207 } && test -s conftest.$ac_objext; then
14208 ac_hi=-1 ac_mid=-1
14209 while :; do
14210 cat >conftest.$ac_ext <<_ACEOF
14211/* confdefs.h. */
14212_ACEOF
14213cat confdefs.h >>conftest.$ac_ext
14214cat >>conftest.$ac_ext <<_ACEOF
14215/* end confdefs.h. */
14216
14217#ifdef HAVE_PTHREAD_H
14218#include <pthread.h>
14219#endif
14220
14221
14222 typedef pthread_t ac__type_sizeof_;
14223int
14224main ()
14225{
14226static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14227test_array [0] = 0
14228
14229 ;
14230 return 0;
14231}
14232_ACEOF
14233rm -f conftest.$ac_objext
14234if { (ac_try="$ac_compile"
14235case "(($ac_try" in
14236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14237 *) ac_try_echo=$ac_try;;
14238esac
14239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14240 (eval "$ac_compile") 2>conftest.er1
14241 ac_status=$?
14242 grep -v '^ *+' conftest.er1 >conftest.err
14243 rm -f conftest.er1
14244 cat conftest.err >&5
14245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14246 (exit $ac_status); } && {
14247 test -z "$ac_c_werror_flag" ||
14248 test ! -s conftest.err
14249 } && test -s conftest.$ac_objext; then
14250 ac_lo=$ac_mid; break
14251else
14252 echo "$as_me: failed program was:" >&5
14253sed 's/^/| /' conftest.$ac_ext >&5
14254
14255 ac_hi=`expr '(' $ac_mid ')' - 1`
14256 if test $ac_mid -le $ac_hi; then
14257 ac_lo= ac_hi=
14258 break
14259 fi
14260 ac_mid=`expr 2 '*' $ac_mid`
14261fi
14262
14263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14264 done
14265else
14266 echo "$as_me: failed program was:" >&5
14267sed 's/^/| /' conftest.$ac_ext >&5
14268
14269 ac_lo= ac_hi=
14270fi
14271
14272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14273fi
14274
14275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14276# Binary search between lo and hi bounds.
14277while test "x$ac_lo" != "x$ac_hi"; do
14278 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14279 cat >conftest.$ac_ext <<_ACEOF
14280/* confdefs.h. */
14281_ACEOF
14282cat confdefs.h >>conftest.$ac_ext
14283cat >>conftest.$ac_ext <<_ACEOF
14284/* end confdefs.h. */
14285
14286#ifdef HAVE_PTHREAD_H
14287#include <pthread.h>
14288#endif
14289
14290
14291 typedef pthread_t ac__type_sizeof_;
14292int
14293main ()
14294{
14295static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14296test_array [0] = 0
14297
14298 ;
14299 return 0;
14300}
14301_ACEOF
14302rm -f conftest.$ac_objext
14303if { (ac_try="$ac_compile"
14304case "(($ac_try" in
14305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14306 *) ac_try_echo=$ac_try;;
14307esac
14308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14309 (eval "$ac_compile") 2>conftest.er1
14310 ac_status=$?
14311 grep -v '^ *+' conftest.er1 >conftest.err
14312 rm -f conftest.er1
14313 cat conftest.err >&5
14314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14315 (exit $ac_status); } && {
14316 test -z "$ac_c_werror_flag" ||
14317 test ! -s conftest.err
14318 } && test -s conftest.$ac_objext; then
14319 ac_hi=$ac_mid
14320else
14321 echo "$as_me: failed program was:" >&5
14322sed 's/^/| /' conftest.$ac_ext >&5
14323
14324 ac_lo=`expr '(' $ac_mid ')' + 1`
14325fi
14326
14327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14328done
14329case $ac_lo in
14330?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14331'') if test "$ac_cv_type_pthread_t" = yes; then
14332 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14333See \`config.log' for more details." >&5
14334echo "$as_me: error: cannot compute sizeof (pthread_t)
14335See \`config.log' for more details." >&2;}
14336 { (exit 77); exit 77; }; }
14337 else
14338 ac_cv_sizeof_pthread_t=0
14339 fi ;;
14340esac
14341else
14342 cat >conftest.$ac_ext <<_ACEOF
14343/* confdefs.h. */
14344_ACEOF
14345cat confdefs.h >>conftest.$ac_ext
14346cat >>conftest.$ac_ext <<_ACEOF
14347/* end confdefs.h. */
14348
14349#ifdef HAVE_PTHREAD_H
14350#include <pthread.h>
14351#endif
14352
14353
14354 typedef pthread_t ac__type_sizeof_;
14355static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14356static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14357#include <stdio.h>
14358#include <stdlib.h>
14359int
14360main ()
14361{
14362
14363 FILE *f = fopen ("conftest.val", "w");
14364 if (! f)
14365 return 1;
14366 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14367 {
14368 long int i = longval ();
14369 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14370 return 1;
14371 fprintf (f, "%ld\n", i);
14372 }
14373 else
14374 {
14375 unsigned long int i = ulongval ();
14376 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14377 return 1;
14378 fprintf (f, "%lu\n", i);
14379 }
14380 return ferror (f) || fclose (f) != 0;
14381
14382 ;
14383 return 0;
14384}
Martin v. Löwis11437992002-04-12 09:54:03 +000014385_ACEOF
14386rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014387if { (ac_try="$ac_link"
14388case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014397 { (case "(($ac_try" in
14398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14399 *) ac_try_echo=$ac_try;;
14400esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014402 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014403 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014405 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014406 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014407else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014408 echo "$as_me: program exited with status $ac_status" >&5
14409echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014410sed 's/^/| /' conftest.$ac_ext >&5
14411
Martin v. Löwis11437992002-04-12 09:54:03 +000014412( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014413if test "$ac_cv_type_pthread_t" = yes; then
14414 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14415See \`config.log' for more details." >&5
14416echo "$as_me: error: cannot compute sizeof (pthread_t)
14417See \`config.log' for more details." >&2;}
14418 { (exit 77); exit 77; }; }
14419 else
14420 ac_cv_sizeof_pthread_t=0
14421 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014423rm -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 +000014424fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014425rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014426fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014427{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014428echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014429
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014430
14431
Martin v. Löwis11437992002-04-12 09:54:03 +000014432cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014433#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014434_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014435
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014436
Trent Mick635f6fb2000-08-23 21:33:05 +000014437fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014438CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014439
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014440{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14441echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014442# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014443if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014444 enableval=$enable_toolbox_glue;
14445fi
Jack Jansene578a632001-08-15 01:27:14 +000014446
14447
14448if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014449then
Jack Jansene578a632001-08-15 01:27:14 +000014450 case $ac_sys_system/$ac_sys_release in
14451 Darwin/*)
14452 enable_toolbox_glue="yes";;
14453 *)
14454 enable_toolbox_glue="no";;
14455 esac
14456fi
14457case "$enable_toolbox_glue" in
14458yes)
Jack Jansene578a632001-08-15 01:27:14 +000014459 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014460 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014461
14462cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014463#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014464_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014465
14466 ;;
14467*)
Jack Jansene578a632001-08-15 01:27:14 +000014468 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014469 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014470 ;;
14471esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014472{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14473echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014474
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014475
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014476
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014477case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014478 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014479 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14480 ;;
14481 Darwin/*)
14482 OTHER_LIBTOOL_OPT=""
14483 ;;
14484esac
14485
14486
Ronald Oussoren25967582009-09-06 10:00:26 +000014487ARCH_RUN_32BIT=""
14488
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014489case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014490 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014491 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14492 if test "${enable_universalsdk}"; then
14493 :
14494 else
Ronald Oussoren25967582009-09-06 10:00:26 +000014495 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014496 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014497 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014498 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014499 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014500 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14501 if test ${gcc_version} '<' 4.0
14502 then
14503 LIBTOOL_CRUFT="-lcc_dynamic"
14504 else
14505 LIBTOOL_CRUFT=""
14506 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014507 if test "$cross_compiling" = yes; then
Ronald Oussoren23d92532009-09-07 06:12:00 +000014508 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +000014509else
14510 cat >conftest.$ac_ext <<_ACEOF
14511/* confdefs.h. */
14512_ACEOF
14513cat confdefs.h >>conftest.$ac_ext
14514cat >>conftest.$ac_ext <<_ACEOF
14515/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +000014516
Ronald Oussoren25967582009-09-06 10:00:26 +000014517 #include <unistd.h>
14518 int main(int argc, char*argv[])
14519 {
14520 if (sizeof(long) == 4) {
14521 return 0;
14522 } else {
14523 return 1;
14524 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +000014525 }
Ronald Oussoren23d92532009-09-07 06:12:00 +000014526
Ronald Oussoren25967582009-09-06 10:00:26 +000014527_ACEOF
14528rm -f conftest$ac_exeext
14529if { (ac_try="$ac_link"
14530case "(($ac_try" in
14531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14532 *) ac_try_echo=$ac_try;;
14533esac
14534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14535 (eval "$ac_link") 2>&5
14536 ac_status=$?
14537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14538 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14539 { (case "(($ac_try" in
14540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14541 *) ac_try_echo=$ac_try;;
14542esac
14543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14544 (eval "$ac_try") 2>&5
14545 ac_status=$?
14546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14547 (exit $ac_status); }; }; then
14548 ac_osx_32bit=yes
14549else
14550 echo "$as_me: program exited with status $ac_status" >&5
14551echo "$as_me: failed program was:" >&5
14552sed 's/^/| /' conftest.$ac_ext >&5
14553
14554( exit $ac_status )
14555ac_osx_32bit=no
14556fi
14557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14558fi
14559
14560
14561
14562 if test "${ac_osx_32bit}" = "yes"; then
14563 case `arch` in
14564 i386)
14565 MACOSX_DEFAULT_ARCH="i386"
14566 ;;
14567 ppc)
14568 MACOSX_DEFAULT_ARCH="ppc"
14569 ;;
14570 *)
14571 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14572echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14573 { (exit 1); exit 1; }; }
14574 ;;
14575 esac
14576 else
14577 case `arch` in
14578 i386)
14579 MACOSX_DEFAULT_ARCH="x86_64"
14580 ;;
14581 ppc)
14582 MACOSX_DEFAULT_ARCH="ppc64"
14583 ;;
14584 *)
14585 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14586echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14587 { (exit 1); exit 1; }; }
14588 ;;
14589 esac
14590
14591 #ARCH_RUN_32BIT="true"
14592 fi
14593
14594 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014595 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014596 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014597esac
14598
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014599{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14600echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014601if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014602then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014603 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014604 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014605 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014606
Martin v. Löwis11437992002-04-12 09:54:03 +000014607cat >>confdefs.h <<\_ACEOF
14608#define WITH_NEXT_FRAMEWORK 1
14609_ACEOF
14610
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014611 { echo "$as_me:$LINENO: result: yes" >&5
14612echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014613 if test $enable_shared = "yes"
14614 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014615 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14616echo "$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 +000014617 { (exit 1); exit 1; }; }
14618 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014619else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014620 { echo "$as_me:$LINENO: result: no" >&5
14621echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014622fi
14623
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014624{ echo "$as_me:$LINENO: checking for dyld" >&5
14625echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014626case $ac_sys_system/$ac_sys_release in
14627 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014628
Martin v. Löwis11437992002-04-12 09:54:03 +000014629cat >>confdefs.h <<\_ACEOF
14630#define WITH_DYLD 1
14631_ACEOF
14632
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014633 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14634echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014635 ;;
14636 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014637 { echo "$as_me:$LINENO: result: no" >&5
14638echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014639 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014640esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014641
Guido van Rossum0a516c91994-09-12 10:58:40 +000014642# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014643
Michael W. Hudson54241132001-12-07 15:38:26 +000014644
14645
14646
14647
Guido van Rossum0a516c91994-09-12 10:58:40 +000014648# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014649# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014650{ echo "$as_me:$LINENO: checking SO" >&5
14651echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014652if test -z "$SO"
14653then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014654 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014655 hp*|HP*)
14656 case `uname -m` in
14657 ia64) SO=.so;;
14658 *) SO=.sl;;
14659 esac
14660 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014661 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014662 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014663 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014664else
14665 # this might also be a termcap variable, see #610332
14666 echo
14667 echo '====================================================================='
14668 echo '+ +'
14669 echo '+ WARNING: You have set SO in your environment. +'
14670 echo '+ Do you really mean to change the extension for shared libraries? +'
14671 echo '+ Continuing in 10 seconds to let you to ponder. +'
14672 echo '+ +'
14673 echo '====================================================================='
14674 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014675fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014676{ echo "$as_me:$LINENO: result: $SO" >&5
14677echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014678
Ronald Oussoren79f90492009-01-02 10:44:46 +000014679
Neal Norwitz58e28882006-05-19 07:00:58 +000014680cat >>confdefs.h <<_ACEOF
14681#define SHLIB_EXT "$SO"
14682_ACEOF
14683
Guido van Rossum0a516c91994-09-12 10:58:40 +000014684# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014685# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014686# (Shared libraries in this instance are shared modules to be loaded into
14687# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014688{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14689echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014690if test -z "$LDSHARED"
14691then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014692 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014693 AIX*)
14694 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014695 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014696 ;;
14697 BeOS*)
14698 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014699 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014700 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014701 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014702 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014703 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000014704 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014705 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014706 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000014707 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014708 hp*|HP*)
14709 if test "$GCC" = "yes"
14710 then LDSHARED='$(CC) -shared'
14711 else LDSHARED='ld -b';
14712 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014713 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014714 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014715 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14716 if test "$enable_framework" ; then
14717 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014718 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14719 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014720 else
14721 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014722 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014723 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014724 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014725 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14726 if test "$enable_framework" ; then
14727 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014728 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14729 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014730 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014731 # No framework, use the Python app as bundle-loader
14732 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014733 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014734 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014735 Darwin/*)
14736 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14737 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014738
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014739 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014740 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014741 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014742 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014743 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014744 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14745 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014746 else
14747 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14748 if test "$enable_framework" ; then
14749 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014750 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14751 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014752 else
14753 # No framework, use the Python app as bundle-loader
14754 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14755 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14756 fi
14757 fi
14758 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014759 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014760 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014761 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014762 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014763 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014764 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014765 else
14766 LDSHARED="ld -Bshareable ${LDFLAGS}"
14767 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014768 OpenBSD*)
14769 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14770 then
14771 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14772 else
14773 case `uname -r` in
14774 [01].* | 2.[0-7] | 2.[0-7].*)
14775 LDSHARED="ld -Bshareable ${LDFLAGS}"
14776 ;;
14777 *)
14778 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14779 ;;
14780 esac
14781 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014782 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014783 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014784 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014785 then LDSHARED='$(CC) -shared'
14786 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014787 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014788 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014789 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014790 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014791 *) LDSHARED="ld";;
14792 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014793fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014794{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14795echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014796BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014797# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014798# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014799{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14800echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014801if test -z "$CCSHARED"
14802then
Guido van Rossum07397971997-04-29 21:49:50 +000014803 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014804 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014805 then CCSHARED="-fPIC";
14806 elif test `uname -p` = sparc;
14807 then CCSHARED="-xcode=pic32";
14808 else CCSHARED="-Kpic";
14809 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014810 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014811 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014812 else CCSHARED="+z";
14813 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014814 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014815 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014816 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014817 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014818 if test "$GCC" = "yes"
14819 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014820 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014821 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014822 SCO_SV*)
14823 if test "$GCC" = "yes"
14824 then CCSHARED="-fPIC"
14825 else CCSHARED="-Kpic -belf"
14826 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014827 IRIX*/6*) case $CC in
14828 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014829 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014830 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014831 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014832 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014833fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014834{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14835echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014836# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014837# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014838{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14839echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014840if test -z "$LINKFORSHARED"
14841then
Guido van Rossum07397971997-04-29 21:49:50 +000014842 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014843 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014844 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014845 LINKFORSHARED="-Wl,-E -Wl,+s";;
14846# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014847 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014848 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014849 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014850 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014851 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14852 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014853 # not used by the core itself but which needs to be in the core so
14854 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014855 # -prebind is no longer used, because it actually seems to give a
14856 # slowdown in stead of a speedup, maybe due to the large number of
14857 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014858
14859 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014860 if test "$enable_framework"
14861 then
Jack Jansenda49e192005-01-07 13:08:22 +000014862 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014863 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014864 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014865 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014866 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014867 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014868 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014869 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14870 then
14871 LINKFORSHARED="-Wl,--export-dynamic"
14872 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014873 SunOS/5*) case $CC in
14874 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014875 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014876 then
14877 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014878 fi;;
14879 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014880 CYGWIN*)
14881 if test $enable_shared = "no"
14882 then
14883 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14884 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014885 QNX*)
14886 # -Wl,-E causes the symbols to be added to the dynamic
14887 # symbol table so that they can be found when a module
14888 # is loaded. -N 2048K causes the stack size to be set
14889 # to 2048 kilobytes so that the stack doesn't overflow
14890 # when running test_compile.py.
14891 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014892 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014893fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014894{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14895echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014896
Michael W. Hudson54241132001-12-07 15:38:26 +000014897
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014898
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014899{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14900echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014901if test ! "$LIBRARY" = "$LDLIBRARY"
14902then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014903 case $ac_sys_system in
14904 CYGWIN*)
14905 # Cygwin needs CCSHARED when building extension DLLs
14906 # but not when building the interpreter DLL.
14907 CFLAGSFORSHARED='';;
14908 *)
14909 CFLAGSFORSHARED='$(CCSHARED)'
14910 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014911fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014912{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14913echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014914
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014915# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14916# library (with --enable-shared).
14917# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014918# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14919# if it is not required, since it creates a dependency of the shared library
14920# to LIBS. This, in turn, means that applications linking the shared libpython
14921# don't need to link LIBS explicitly. The default should be only changed
14922# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014923
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014924{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14925echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014926case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014927 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014928 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014929esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014930{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14931echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014932
14933
Guido van Rossum627b2d71993-12-24 10:39:16 +000014934# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014935
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014936{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14937echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014938if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014939 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014940else
Martin v. Löwis11437992002-04-12 09:54:03 +000014941 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014942LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014943cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014944/* confdefs.h. */
14945_ACEOF
14946cat confdefs.h >>conftest.$ac_ext
14947cat >>conftest.$ac_ext <<_ACEOF
14948/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014949
Martin v. Löwiseba40652007-08-30 20:10:57 +000014950/* Override any GCC internal prototype to avoid an error.
14951 Use char because int might match the return type of a GCC
14952 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014953#ifdef __cplusplus
14954extern "C"
14955#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014956char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014957int
14958main ()
14959{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014960return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014961 ;
14962 return 0;
14963}
14964_ACEOF
14965rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014966if { (ac_try="$ac_link"
14967case "(($ac_try" in
14968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14969 *) ac_try_echo=$ac_try;;
14970esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014972 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014973 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014974 grep -v '^ *+' conftest.er1 >conftest.err
14975 rm -f conftest.er1
14976 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014978 (exit $ac_status); } && {
14979 test -z "$ac_c_werror_flag" ||
14980 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014981 } && test -s conftest$ac_exeext &&
14982 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014983 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014984else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014985 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014986sed 's/^/| /' conftest.$ac_ext >&5
14987
Martin v. Löwiseba40652007-08-30 20:10:57 +000014988 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014990
14991rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014992 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014993LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014994fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014995{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14996echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14997if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014998 cat >>confdefs.h <<_ACEOF
14999#define HAVE_LIBDL 1
15000_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015001
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015002 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015003
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015004fi
15005 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015006
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015007{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15008echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015009if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015010 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015011else
Martin v. Löwis11437992002-04-12 09:54:03 +000015012 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015013LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015014cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015015/* confdefs.h. */
15016_ACEOF
15017cat confdefs.h >>conftest.$ac_ext
15018cat >>conftest.$ac_ext <<_ACEOF
15019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015020
Martin v. Löwiseba40652007-08-30 20:10:57 +000015021/* Override any GCC internal prototype to avoid an error.
15022 Use char because int might match the return type of a GCC
15023 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015024#ifdef __cplusplus
15025extern "C"
15026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015027char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015028int
15029main ()
15030{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015031return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015032 ;
15033 return 0;
15034}
15035_ACEOF
15036rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015037if { (ac_try="$ac_link"
15038case "(($ac_try" in
15039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15040 *) ac_try_echo=$ac_try;;
15041esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015043 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015044 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015045 grep -v '^ *+' conftest.er1 >conftest.err
15046 rm -f conftest.er1
15047 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015049 (exit $ac_status); } && {
15050 test -z "$ac_c_werror_flag" ||
15051 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015052 } && test -s conftest$ac_exeext &&
15053 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015054 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015055else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015056 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015057sed 's/^/| /' conftest.$ac_ext >&5
15058
Martin v. Löwiseba40652007-08-30 20:10:57 +000015059 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015061
15062rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015063 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015064LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015065fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015066{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15067echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15068if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015069 cat >>confdefs.h <<_ACEOF
15070#define HAVE_LIBDLD 1
15071_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015072
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015073 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015074
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015075fi
15076 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015077
Ronald Oussoren79f90492009-01-02 10:44:46 +000015078# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015079if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015080 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15081echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015082if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015083 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015084else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015085 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015086cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015087/* confdefs.h. */
15088_ACEOF
15089cat confdefs.h >>conftest.$ac_ext
15090cat >>conftest.$ac_ext <<_ACEOF
15091/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015092
Martin v. Löwiseba40652007-08-30 20:10:57 +000015093/* Override any GCC internal prototype to avoid an error.
15094 Use char because int might match the return type of a GCC
15095 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015096#ifdef __cplusplus
15097extern "C"
15098#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015099char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015100int
15101main ()
15102{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015103return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015104 ;
15105 return 0;
15106}
15107_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015108for ac_lib in '' pthread rt posix4; do
15109 if test -z "$ac_lib"; then
15110 ac_res="none required"
15111 else
15112 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015113 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015114 fi
15115 rm -f conftest.$ac_objext conftest$ac_exeext
15116if { (ac_try="$ac_link"
15117case "(($ac_try" in
15118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15119 *) ac_try_echo=$ac_try;;
15120esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015122 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015123 ac_status=$?
15124 grep -v '^ *+' conftest.er1 >conftest.err
15125 rm -f conftest.er1
15126 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015128 (exit $ac_status); } && {
15129 test -z "$ac_c_werror_flag" ||
15130 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015131 } && test -s conftest$ac_exeext &&
15132 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015133 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015134else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015135 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015136sed 's/^/| /' conftest.$ac_ext >&5
15137
Martin v. Löwiseba40652007-08-30 20:10:57 +000015138
Brett Cannon19fab762007-06-02 03:02:29 +000015139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015140
15141rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15142 conftest$ac_exeext
15143 if test "${ac_cv_search_sem_init+set}" = set; then
15144 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015146done
15147if test "${ac_cv_search_sem_init+set}" = set; then
15148 :
15149else
15150 ac_cv_search_sem_init=no
15151fi
15152rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015153LIBS=$ac_func_search_save_LIBS
15154fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015155{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15156echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015157ac_res=$ac_cv_search_sem_init
15158if test "$ac_res" != no; then
15159 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015160
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015161fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015162 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015163 # posix4 on Solaris 2.6
15164 # pthread (first!) on Linux
15165fi
15166
Martin v. Löwis19d17342003-06-14 21:03:05 +000015167# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015168{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15169echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015170if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015171 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015172else
15173 ac_check_lib_save_LIBS=$LIBS
15174LIBS="-lintl $LIBS"
15175cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015176/* confdefs.h. */
15177_ACEOF
15178cat confdefs.h >>conftest.$ac_ext
15179cat >>conftest.$ac_ext <<_ACEOF
15180/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015181
Martin v. Löwiseba40652007-08-30 20:10:57 +000015182/* Override any GCC internal prototype to avoid an error.
15183 Use char because int might match the return type of a GCC
15184 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015185#ifdef __cplusplus
15186extern "C"
15187#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015188char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015189int
15190main ()
15191{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015192return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015193 ;
15194 return 0;
15195}
15196_ACEOF
15197rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015198if { (ac_try="$ac_link"
15199case "(($ac_try" in
15200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15201 *) ac_try_echo=$ac_try;;
15202esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015204 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015205 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015206 grep -v '^ *+' conftest.er1 >conftest.err
15207 rm -f conftest.er1
15208 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015210 (exit $ac_status); } && {
15211 test -z "$ac_c_werror_flag" ||
15212 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015213 } && test -s conftest$ac_exeext &&
15214 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015215 ac_cv_lib_intl_textdomain=yes
15216else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015218sed 's/^/| /' conftest.$ac_ext >&5
15219
Martin v. Löwiseba40652007-08-30 20:10:57 +000015220 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015222
15223rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015224 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015225LIBS=$ac_check_lib_save_LIBS
15226fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015227{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15228echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15229if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015230
15231cat >>confdefs.h <<\_ACEOF
15232#define WITH_LIBINTL 1
15233_ACEOF
15234
15235fi
15236
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015237
15238# checks for system dependent C++ extensions support
15239case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015240 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15241echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015243/* confdefs.h. */
15244_ACEOF
15245cat confdefs.h >>conftest.$ac_ext
15246cat >>conftest.$ac_ext <<_ACEOF
15247/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015248#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015249int
15250main ()
15251{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015252loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015253 ;
15254 return 0;
15255}
15256_ACEOF
15257rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015258if { (ac_try="$ac_link"
15259case "(($ac_try" in
15260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15261 *) ac_try_echo=$ac_try;;
15262esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015264 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015266 grep -v '^ *+' conftest.er1 >conftest.err
15267 rm -f conftest.er1
15268 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015270 (exit $ac_status); } && {
15271 test -z "$ac_c_werror_flag" ||
15272 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015273 } && test -s conftest$ac_exeext &&
15274 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015275
Martin v. Löwis11437992002-04-12 09:54:03 +000015276cat >>confdefs.h <<\_ACEOF
15277#define AIX_GENUINE_CPLUSPLUS 1
15278_ACEOF
15279
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015280 { echo "$as_me:$LINENO: result: yes" >&5
15281echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015282else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015283 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015284sed 's/^/| /' conftest.$ac_ext >&5
15285
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015286 { echo "$as_me:$LINENO: result: no" >&5
15287echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015288fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015289
15290rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015291 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015292 *) ;;
15293esac
15294
Guido van Rossum70c7f481998-03-26 18:44:10 +000015295# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015296# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015297{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15298echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015299if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015300 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015301else
Martin v. Löwis11437992002-04-12 09:54:03 +000015302 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015303LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015304cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015305/* confdefs.h. */
15306_ACEOF
15307cat confdefs.h >>conftest.$ac_ext
15308cat >>conftest.$ac_ext <<_ACEOF
15309/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015310
Martin v. Löwiseba40652007-08-30 20:10:57 +000015311/* Override any GCC internal prototype to avoid an error.
15312 Use char because int might match the return type of a GCC
15313 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015314#ifdef __cplusplus
15315extern "C"
15316#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015317char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015318int
15319main ()
15320{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015321return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015322 ;
15323 return 0;
15324}
15325_ACEOF
15326rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015327if { (ac_try="$ac_link"
15328case "(($ac_try" in
15329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15330 *) ac_try_echo=$ac_try;;
15331esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015333 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015334 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015335 grep -v '^ *+' conftest.er1 >conftest.err
15336 rm -f conftest.er1
15337 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015339 (exit $ac_status); } && {
15340 test -z "$ac_c_werror_flag" ||
15341 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015342 } && test -s conftest$ac_exeext &&
15343 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015344 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015345else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015346 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015347sed 's/^/| /' conftest.$ac_ext >&5
15348
Martin v. Löwiseba40652007-08-30 20:10:57 +000015349 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015351
15352rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015353 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015354LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015355fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015356{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15357echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15358if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015359 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015360fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015361 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015362{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15363echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015364if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015365 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015366else
Martin v. Löwis11437992002-04-12 09:54:03 +000015367 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015368LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015369cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015370/* confdefs.h. */
15371_ACEOF
15372cat confdefs.h >>conftest.$ac_ext
15373cat >>conftest.$ac_ext <<_ACEOF
15374/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015375
Martin v. Löwiseba40652007-08-30 20:10:57 +000015376/* Override any GCC internal prototype to avoid an error.
15377 Use char because int might match the return type of a GCC
15378 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015379#ifdef __cplusplus
15380extern "C"
15381#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015382char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015383int
15384main ()
15385{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015386return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015387 ;
15388 return 0;
15389}
15390_ACEOF
15391rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015392if { (ac_try="$ac_link"
15393case "(($ac_try" in
15394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15395 *) ac_try_echo=$ac_try;;
15396esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015398 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015399 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015400 grep -v '^ *+' conftest.er1 >conftest.err
15401 rm -f conftest.er1
15402 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015404 (exit $ac_status); } && {
15405 test -z "$ac_c_werror_flag" ||
15406 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015407 } && test -s conftest$ac_exeext &&
15408 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015409 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015410else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015411 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015412sed 's/^/| /' conftest.$ac_ext >&5
15413
Martin v. Löwiseba40652007-08-30 20:10:57 +000015414 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015415fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015416
15417rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015418 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015419LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015420fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015421{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15422echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15423if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015424 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015425fi
15426 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015427
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015428case "$ac_sys_system" in
15429BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015430{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15431echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015432if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015433 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015434else
Martin v. Löwis11437992002-04-12 09:54:03 +000015435 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015436LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015437cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015438/* confdefs.h. */
15439_ACEOF
15440cat confdefs.h >>conftest.$ac_ext
15441cat >>conftest.$ac_ext <<_ACEOF
15442/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015443
Martin v. Löwiseba40652007-08-30 20:10:57 +000015444/* Override any GCC internal prototype to avoid an error.
15445 Use char because int might match the return type of a GCC
15446 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015447#ifdef __cplusplus
15448extern "C"
15449#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015450char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015451int
15452main ()
15453{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015454return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015455 ;
15456 return 0;
15457}
15458_ACEOF
15459rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015460if { (ac_try="$ac_link"
15461case "(($ac_try" in
15462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15463 *) ac_try_echo=$ac_try;;
15464esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015466 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015467 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015468 grep -v '^ *+' conftest.er1 >conftest.err
15469 rm -f conftest.er1
15470 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015472 (exit $ac_status); } && {
15473 test -z "$ac_c_werror_flag" ||
15474 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015475 } && test -s conftest$ac_exeext &&
15476 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015477 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015478else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015480sed 's/^/| /' conftest.$ac_ext >&5
15481
Martin v. Löwiseba40652007-08-30 20:10:57 +000015482 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015484
15485rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015486 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015487LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015488fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015489{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15490echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15491if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015492 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015493fi
15494 # BeOS
15495;;
15496esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015497
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015498{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15499echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015500
Martin v. Löwiseba40652007-08-30 20:10:57 +000015501# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015502if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015503 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015504{ echo "$as_me:$LINENO: result: $withval" >&5
15505echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015506LIBS="$withval $LIBS"
15507
15508else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015509 { echo "$as_me:$LINENO: result: no" >&5
15510echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015511fi
15512
Guido van Rossum7f43da71994-08-01 12:15:30 +000015513
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015514# Check for use of the system libffi library
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015515{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15516echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015517
Martin v. Löwiseba40652007-08-30 20:10:57 +000015518# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015519if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015520 withval=$with_system_ffi;
15521fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015522
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015523
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015524{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15525echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015526
Benjamin Peterson867475c2009-04-29 20:36:25 +000015527# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015528{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15529echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015530
15531# Check whether --with-dbmliborder was given.
15532if test "${with_dbmliborder+set}" = set; then
15533 withval=$with_dbmliborder;
15534if test x$with_dbmliborder = xyes
15535then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015536{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15537echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015538 { (exit 1); exit 1; }; }
15539else
15540 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15541 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15542 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015543 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15544echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015545 { (exit 1); exit 1; }; }
15546 fi
15547 done
15548fi
15549fi
15550
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015551{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15552echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015553
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015554# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015555
15556
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015557{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15558echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015559
Martin v. Löwiseba40652007-08-30 20:10:57 +000015560# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015561if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015562 withval=$with_signal_module;
15563fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015564
15565
15566if test -z "$with_signal_module"
15567then with_signal_module="yes"
15568fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015569{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15570echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015571
15572if test "${with_signal_module}" = "yes"; then
15573 USE_SIGNAL_MODULE=""
15574 SIGNAL_OBJS=""
15575else
15576 USE_SIGNAL_MODULE="#"
15577 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15578fi
15579
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015580# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015581
Barry Warsawc0d24d82000-06-29 16:12:00 +000015582USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015583
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015584{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15585echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015586
Guido van Rossumec2f0731997-01-22 20:54:01 +000015587
Martin v. Löwiseba40652007-08-30 20:10:57 +000015588# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015589if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015590 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015591{ echo "$as_me:$LINENO: result: $withval" >&5
15592echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015593LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015594if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015595 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015596fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015597else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015598 { echo "$as_me:$LINENO: result: no" >&5
15599echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015600fi
15601
Martin v. Löwis11437992002-04-12 09:54:03 +000015602
15603# Templates for things AC_DEFINEd more than once.
15604# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015605
15606
Martin v. Löwis11437992002-04-12 09:54:03 +000015607
15608
15609
15610
15611
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015612{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15613echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015614
Martin v. Löwiseba40652007-08-30 20:10:57 +000015615# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015616if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015617 withval=$with_threads;
15618fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015619
15620
Barry Warsawc0d24d82000-06-29 16:12:00 +000015621# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015622
Martin v. Löwiseba40652007-08-30 20:10:57 +000015623# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015624if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015625 withval=$with_thread; with_threads=$with_thread
15626fi
15627
Barry Warsawc0d24d82000-06-29 16:12:00 +000015628
15629if test -z "$with_threads"
15630then with_threads="yes"
15631fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015632{ echo "$as_me:$LINENO: result: $with_threads" >&5
15633echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015634
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015635
Barry Warsawc0d24d82000-06-29 16:12:00 +000015636if test "$with_threads" = "no"
15637then
15638 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015639elif test "$ac_cv_pthread_is_default" = yes
15640then
Martin v. Löwis11437992002-04-12 09:54:03 +000015641 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015642#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015643_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015644
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015645 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015646 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015647#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015648_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015649
15650 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015651 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015652elif test "$ac_cv_kpthread" = "yes"
15653then
15654 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015655 if test "$ac_cv_cxx_thread" = "yes"; then
15656 CXX="$CXX -Kpthread"
15657 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015658 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015659#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015660_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015661
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015662 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015663 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015664elif test "$ac_cv_kthread" = "yes"
15665then
15666 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015667 if test "$ac_cv_cxx_thread" = "yes"; then
15668 CXX="$CXX -Kthread"
15669 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015670 cat >>confdefs.h <<\_ACEOF
15671#define WITH_THREAD 1
15672_ACEOF
15673
15674 posix_threads=yes
15675 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015676elif test "$ac_cv_pthread" = "yes"
15677then
15678 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015679 if test "$ac_cv_cxx_thread" = "yes"; then
15680 CXX="$CXX -pthread"
15681 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015682 cat >>confdefs.h <<\_ACEOF
15683#define WITH_THREAD 1
15684_ACEOF
15685
15686 posix_threads=yes
15687 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015688else
15689 if test ! -z "$with_threads" -a -d "$with_threads"
15690 then LDFLAGS="$LDFLAGS -L$with_threads"
15691 fi
15692 if test ! -z "$withval" -a -d "$withval"
15693 then LDFLAGS="$LDFLAGS -L$withval"
15694 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015695
15696 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015697 # define _POSIX_THREADS in unistd.h. Some apparently don't
15698 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015699 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15700echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015701 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015702/* confdefs.h. */
15703_ACEOF
15704cat confdefs.h >>conftest.$ac_ext
15705cat >>conftest.$ac_ext <<_ACEOF
15706/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015707
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015708#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015709#ifdef _POSIX_THREADS
15710yes
15711#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015712
15713_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015714if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015715 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015716 unistd_defines_pthreads=yes
15717else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015718 unistd_defines_pthreads=no
15719fi
Ronald Oussoren25967582009-09-06 10:00:26 +000015720rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015721
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015722 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15723echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015724
Martin v. Löwis11437992002-04-12 09:54:03 +000015725 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015726#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015727_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015728
Martin v. Löwis11437992002-04-12 09:54:03 +000015729 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015730 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15731echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015732if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015733 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015734fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015735{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15736echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015737else
Martin v. Löwis11437992002-04-12 09:54:03 +000015738 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015739{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15740echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015741cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015742/* confdefs.h. */
15743_ACEOF
15744cat confdefs.h >>conftest.$ac_ext
15745cat >>conftest.$ac_ext <<_ACEOF
15746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015747$ac_includes_default
15748#include <cthreads.h>
15749_ACEOF
15750rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015751if { (ac_try="$ac_compile"
15752case "(($ac_try" in
15753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15754 *) ac_try_echo=$ac_try;;
15755esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015757 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015758 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015759 grep -v '^ *+' conftest.er1 >conftest.err
15760 rm -f conftest.er1
15761 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015763 (exit $ac_status); } && {
15764 test -z "$ac_c_werror_flag" ||
15765 test ! -s conftest.err
15766 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015767 ac_header_compiler=yes
15768else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015769 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015770sed 's/^/| /' conftest.$ac_ext >&5
15771
Martin v. Löwiseba40652007-08-30 20:10:57 +000015772 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015773fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015774
15775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015776{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15777echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015778
15779# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015780{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15781echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015782cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015783/* confdefs.h. */
15784_ACEOF
15785cat confdefs.h >>conftest.$ac_ext
15786cat >>conftest.$ac_ext <<_ACEOF
15787/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015788#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015789_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015790if { (ac_try="$ac_cpp conftest.$ac_ext"
15791case "(($ac_try" in
15792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15793 *) ac_try_echo=$ac_try;;
15794esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015796 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015797 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015798 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015799 rm -f conftest.er1
15800 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015802 (exit $ac_status); } >/dev/null && {
15803 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15804 test ! -s conftest.err
15805 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015806 ac_header_preproc=yes
15807else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015808 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015809sed 's/^/| /' conftest.$ac_ext >&5
15810
Martin v. Löwis11437992002-04-12 09:54:03 +000015811 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015812fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015813
Martin v. Löwis11437992002-04-12 09:54:03 +000015814rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015815{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15816echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015817
15818# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015819case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15820 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015821 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15822echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15823 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15824echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015825 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015826 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015827 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015828 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15829echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15830 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15831echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15832 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15833echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15834 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15835echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15836 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15837echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15838 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15839echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015840 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015841## -------------------------------------- ##
15842## Report this to http://bugs.python.org/ ##
15843## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015844_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015845 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015846 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015847esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015848{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15849echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015850if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015851 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015852else
15853 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015854fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015855{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15856echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015857
15858fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015859if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015860 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015861#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015862_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015863
Martin v. Löwis11437992002-04-12 09:54:03 +000015864 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015865#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015866_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015867
Martin v. Löwis11437992002-04-12 09:54:03 +000015868
15869cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015870#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015871_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015872
15873 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015874 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015875else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015876
Martin v. Löwis11437992002-04-12 09:54:03 +000015877 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015878 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15879echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015880if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015881 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015882fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015883{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15884echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015885else
Martin v. Löwis11437992002-04-12 09:54:03 +000015886 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015887{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15888echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015889cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015890/* confdefs.h. */
15891_ACEOF
15892cat confdefs.h >>conftest.$ac_ext
15893cat >>conftest.$ac_ext <<_ACEOF
15894/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015895$ac_includes_default
15896#include <mach/cthreads.h>
15897_ACEOF
15898rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015899if { (ac_try="$ac_compile"
15900case "(($ac_try" in
15901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15902 *) ac_try_echo=$ac_try;;
15903esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015905 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015906 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015907 grep -v '^ *+' conftest.er1 >conftest.err
15908 rm -f conftest.er1
15909 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015911 (exit $ac_status); } && {
15912 test -z "$ac_c_werror_flag" ||
15913 test ! -s conftest.err
15914 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015915 ac_header_compiler=yes
15916else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015918sed 's/^/| /' conftest.$ac_ext >&5
15919
Martin v. Löwiseba40652007-08-30 20:10:57 +000015920 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015922
15923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015924{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15925echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015926
15927# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015928{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15929echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015930cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015931/* confdefs.h. */
15932_ACEOF
15933cat confdefs.h >>conftest.$ac_ext
15934cat >>conftest.$ac_ext <<_ACEOF
15935/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015936#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015937_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015938if { (ac_try="$ac_cpp conftest.$ac_ext"
15939case "(($ac_try" in
15940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15941 *) ac_try_echo=$ac_try;;
15942esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015944 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015945 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015946 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015947 rm -f conftest.er1
15948 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015950 (exit $ac_status); } >/dev/null && {
15951 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15952 test ! -s conftest.err
15953 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015954 ac_header_preproc=yes
15955else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015956 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015957sed 's/^/| /' conftest.$ac_ext >&5
15958
Martin v. Löwis11437992002-04-12 09:54:03 +000015959 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015960fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015961
Martin v. Löwis11437992002-04-12 09:54:03 +000015962rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015963{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15964echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015965
15966# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015967case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15968 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015969 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15970echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15971 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15972echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015973 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015974 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015975 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015976 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15977echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15978 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15979echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15980 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15981echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15982 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15983echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15984 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15985echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15986 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15987echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015988 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015989## -------------------------------------- ##
15990## Report this to http://bugs.python.org/ ##
15991## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015992_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015993 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015994 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015995esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015996{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15997echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015998if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015999 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016000else
16001 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016002fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016003{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16004echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016005
16006fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016007if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016008 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016009#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016010_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016011
Martin v. Löwis11437992002-04-12 09:54:03 +000016012 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016013#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016014_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016015
Martin v. Löwis11437992002-04-12 09:54:03 +000016016
16017cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016018#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016019_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016020
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016021 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016022else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016023
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016024 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16025echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016026
Martin v. Löwiseba40652007-08-30 20:10:57 +000016027# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016028if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016029 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16030echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016031 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016032#define WITH_THREAD 1
16033_ACEOF
16034
16035
16036cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016037#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016038_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016039
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016040 LIBS="-lpth $LIBS"
16041 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016042else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016043 { echo "$as_me:$LINENO: result: no" >&5
16044echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016045
16046 # Just looking for pthread_create in libpthread is not enough:
16047 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16048 # So we really have to include pthread.h, and then link.
16049 _libs=$LIBS
16050 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016051 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16052echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016053 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016054/* confdefs.h. */
16055_ACEOF
16056cat confdefs.h >>conftest.$ac_ext
16057cat >>conftest.$ac_ext <<_ACEOF
16058/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016059#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016060
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016061void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016062int
16063main ()
16064{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016065
16066pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016067 ;
16068 return 0;
16069}
16070_ACEOF
16071rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016072if { (ac_try="$ac_link"
16073case "(($ac_try" in
16074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16075 *) ac_try_echo=$ac_try;;
16076esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016078 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016079 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016080 grep -v '^ *+' conftest.er1 >conftest.err
16081 rm -f conftest.er1
16082 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016084 (exit $ac_status); } && {
16085 test -z "$ac_c_werror_flag" ||
16086 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016087 } && test -s conftest$ac_exeext &&
16088 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016089
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016090 { echo "$as_me:$LINENO: result: yes" >&5
16091echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016092 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016093#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016094_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016095
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016096 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016097 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016098else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016100sed 's/^/| /' conftest.$ac_ext >&5
16101
Martin v. Löwis11437992002-04-12 09:54:03 +000016102
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016103 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016104 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16105echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016106if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016107 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016108else
Martin v. Löwis11437992002-04-12 09:54:03 +000016109 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016110/* confdefs.h. */
16111_ACEOF
16112cat confdefs.h >>conftest.$ac_ext
16113cat >>conftest.$ac_ext <<_ACEOF
16114/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016115/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16116 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16117#define pthread_detach innocuous_pthread_detach
16118
Guido van Rossumad678af1998-10-02 14:42:15 +000016119/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016120 which can conflict with char pthread_detach (); below.
16121 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016122 <limits.h> exists even on freestanding compilers. */
16123
16124#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016125# include <limits.h>
16126#else
16127# include <assert.h>
16128#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016129
16130#undef pthread_detach
16131
Martin v. Löwiseba40652007-08-30 20:10:57 +000016132/* Override any GCC internal prototype to avoid an error.
16133 Use char because int might match the return type of a GCC
16134 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016135#ifdef __cplusplus
16136extern "C"
16137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016138char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016139/* The GNU C library defines this for functions which it implements
16140 to always fail with ENOSYS. Some functions are actually named
16141 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016142#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016143choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016144#endif
16145
Skip Montanaro6dead952003-09-25 14:50:04 +000016146int
16147main ()
16148{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016149return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016150 ;
16151 return 0;
16152}
16153_ACEOF
16154rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016155if { (ac_try="$ac_link"
16156case "(($ac_try" in
16157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16158 *) ac_try_echo=$ac_try;;
16159esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016161 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016162 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016163 grep -v '^ *+' conftest.er1 >conftest.err
16164 rm -f conftest.er1
16165 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016167 (exit $ac_status); } && {
16168 test -z "$ac_c_werror_flag" ||
16169 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016170 } && test -s conftest$ac_exeext &&
16171 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016172 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016173else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016174 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016175sed 's/^/| /' conftest.$ac_ext >&5
16176
Martin v. Löwiseba40652007-08-30 20:10:57 +000016177 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016178fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016179
16180rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016181 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016182fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016183{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16184echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16185if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016186 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016187#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016188_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016189
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016190 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016191 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016192else
Guido van Rossumad678af1998-10-02 14:42:15 +000016193
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016194 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016195 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16196echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016197if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016198 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016199fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016200{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16201echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016202else
16203 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016204{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16205echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016206cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016207/* confdefs.h. */
16208_ACEOF
16209cat confdefs.h >>conftest.$ac_ext
16210cat >>conftest.$ac_ext <<_ACEOF
16211/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016212$ac_includes_default
16213#include <atheos/threads.h>
16214_ACEOF
16215rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016216if { (ac_try="$ac_compile"
16217case "(($ac_try" in
16218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16219 *) ac_try_echo=$ac_try;;
16220esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016222 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016223 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016224 grep -v '^ *+' conftest.er1 >conftest.err
16225 rm -f conftest.er1
16226 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016228 (exit $ac_status); } && {
16229 test -z "$ac_c_werror_flag" ||
16230 test ! -s conftest.err
16231 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016232 ac_header_compiler=yes
16233else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016235sed 's/^/| /' conftest.$ac_ext >&5
16236
Martin v. Löwiseba40652007-08-30 20:10:57 +000016237 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016239
16240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016241{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16242echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016243
16244# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016245{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16246echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016247cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016248/* confdefs.h. */
16249_ACEOF
16250cat confdefs.h >>conftest.$ac_ext
16251cat >>conftest.$ac_ext <<_ACEOF
16252/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016253#include <atheos/threads.h>
16254_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016255if { (ac_try="$ac_cpp conftest.$ac_ext"
16256case "(($ac_try" in
16257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16258 *) ac_try_echo=$ac_try;;
16259esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016261 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016262 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016263 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016264 rm -f conftest.er1
16265 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016267 (exit $ac_status); } >/dev/null && {
16268 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16269 test ! -s conftest.err
16270 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016271 ac_header_preproc=yes
16272else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016274sed 's/^/| /' conftest.$ac_ext >&5
16275
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016276 ac_header_preproc=no
16277fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016278
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016279rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016280{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16281echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016282
16283# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016284case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16285 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016286 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16287echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16288 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16289echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016290 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016291 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016292 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016293 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16294echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16295 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16296echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16297 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16298echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16299 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16300echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16301 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16302echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16303 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16304echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016305 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016306## -------------------------------------- ##
16307## Report this to http://bugs.python.org/ ##
16308## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016309_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016310 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016311 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016312esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016313{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16314echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016315if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016316 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016317else
16318 ac_cv_header_atheos_threads_h=$ac_header_preproc
16319fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016320{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16321echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016322
16323fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016324if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016325 cat >>confdefs.h <<\_ACEOF
16326#define WITH_THREAD 1
16327_ACEOF
16328
16329
16330cat >>confdefs.h <<\_ACEOF
16331#define ATHEOS_THREADS 1
16332_ACEOF
16333
16334 THREADOBJ="Python/thread.o"
16335else
16336
Martin v. Löwis11437992002-04-12 09:54:03 +000016337 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016338 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16339echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016340if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016341 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016342fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016343{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16344echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016345else
Martin v. Löwis11437992002-04-12 09:54:03 +000016346 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016347{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16348echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016349cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016350/* confdefs.h. */
16351_ACEOF
16352cat confdefs.h >>conftest.$ac_ext
16353cat >>conftest.$ac_ext <<_ACEOF
16354/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016355$ac_includes_default
16356#include <kernel/OS.h>
16357_ACEOF
16358rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016359if { (ac_try="$ac_compile"
16360case "(($ac_try" in
16361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16362 *) ac_try_echo=$ac_try;;
16363esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016365 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016366 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016367 grep -v '^ *+' conftest.er1 >conftest.err
16368 rm -f conftest.er1
16369 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016371 (exit $ac_status); } && {
16372 test -z "$ac_c_werror_flag" ||
16373 test ! -s conftest.err
16374 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016375 ac_header_compiler=yes
16376else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016378sed 's/^/| /' conftest.$ac_ext >&5
16379
Martin v. Löwiseba40652007-08-30 20:10:57 +000016380 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016381fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016382
16383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016384{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16385echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016386
16387# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016388{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16389echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016390cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016391/* confdefs.h. */
16392_ACEOF
16393cat confdefs.h >>conftest.$ac_ext
16394cat >>conftest.$ac_ext <<_ACEOF
16395/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016396#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016397_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016398if { (ac_try="$ac_cpp conftest.$ac_ext"
16399case "(($ac_try" in
16400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16401 *) ac_try_echo=$ac_try;;
16402esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016404 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016405 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016406 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016407 rm -f conftest.er1
16408 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016410 (exit $ac_status); } >/dev/null && {
16411 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16412 test ! -s conftest.err
16413 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016414 ac_header_preproc=yes
16415else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016417sed 's/^/| /' conftest.$ac_ext >&5
16418
Martin v. Löwis11437992002-04-12 09:54:03 +000016419 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016420fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016421
Martin v. Löwis11437992002-04-12 09:54:03 +000016422rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016423{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16424echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016425
Martin v. Löwis11437992002-04-12 09:54:03 +000016426# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016427case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16428 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016429 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16430echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16431 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16432echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016433 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016434 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016435 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016436 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16437echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16438 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16439echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16440 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16441echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16442 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16443echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16444 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16445echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16446 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16447echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016448 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016449## -------------------------------------- ##
16450## Report this to http://bugs.python.org/ ##
16451## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016452_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016453 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016454 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016455esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016456{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16457echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016458if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016459 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016460else
16461 ac_cv_header_kernel_OS_h=$ac_header_preproc
16462fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016463{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16464echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016465
16466fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016467if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016468 cat >>confdefs.h <<\_ACEOF
16469#define WITH_THREAD 1
16470_ACEOF
16471
16472
16473cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016474#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016475_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016476
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016477 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016478else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016479
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016480 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16481echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016482if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016483 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016484else
Martin v. Löwis11437992002-04-12 09:54:03 +000016485 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016486LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016487cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016488/* confdefs.h. */
16489_ACEOF
16490cat confdefs.h >>conftest.$ac_ext
16491cat >>conftest.$ac_ext <<_ACEOF
16492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016493
Martin v. Löwiseba40652007-08-30 20:10:57 +000016494/* Override any GCC internal prototype to avoid an error.
16495 Use char because int might match the return type of a GCC
16496 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016497#ifdef __cplusplus
16498extern "C"
16499#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016500char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016501int
16502main ()
16503{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016504return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016505 ;
16506 return 0;
16507}
16508_ACEOF
16509rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016510if { (ac_try="$ac_link"
16511case "(($ac_try" in
16512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16513 *) ac_try_echo=$ac_try;;
16514esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016516 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016518 grep -v '^ *+' conftest.er1 >conftest.err
16519 rm -f conftest.er1
16520 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016522 (exit $ac_status); } && {
16523 test -z "$ac_c_werror_flag" ||
16524 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016525 } && test -s conftest$ac_exeext &&
16526 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016527 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016528else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016530sed 's/^/| /' conftest.$ac_ext >&5
16531
Martin v. Löwiseba40652007-08-30 20:10:57 +000016532 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016533fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016534
16535rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016536 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016537LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016538fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016539{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16540echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16541if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016542 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016543#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016544_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016545
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016546 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016547 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016548 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016549else
Greg Steinadf63d62000-07-05 10:38:09 +000016550
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016551 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16552echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016553if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016554 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016555else
Martin v. Löwis11437992002-04-12 09:54:03 +000016556 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016557LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016558cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016559/* confdefs.h. */
16560_ACEOF
16561cat confdefs.h >>conftest.$ac_ext
16562cat >>conftest.$ac_ext <<_ACEOF
16563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016564
Martin v. Löwiseba40652007-08-30 20:10:57 +000016565/* Override any GCC internal prototype to avoid an error.
16566 Use char because int might match the return type of a GCC
16567 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016568#ifdef __cplusplus
16569extern "C"
16570#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016571char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016572int
16573main ()
16574{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016575return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016576 ;
16577 return 0;
16578}
16579_ACEOF
16580rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016581if { (ac_try="$ac_link"
16582case "(($ac_try" in
16583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16584 *) ac_try_echo=$ac_try;;
16585esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016587 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016588 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016589 grep -v '^ *+' conftest.er1 >conftest.err
16590 rm -f conftest.er1
16591 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016593 (exit $ac_status); } && {
16594 test -z "$ac_c_werror_flag" ||
16595 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016596 } && test -s conftest$ac_exeext &&
16597 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016598 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016599else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016600 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016601sed 's/^/| /' conftest.$ac_ext >&5
16602
Martin v. Löwiseba40652007-08-30 20:10:57 +000016603 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016604fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016605
16606rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016607 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016608LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016609fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016610{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16611echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16612if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016613 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016614#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016615_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016616
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016617 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016618 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016619 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016620else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016621
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016622 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16623echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016624if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016625 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016626else
Martin v. Löwis11437992002-04-12 09:54:03 +000016627 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016628LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016629cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016630/* confdefs.h. */
16631_ACEOF
16632cat confdefs.h >>conftest.$ac_ext
16633cat >>conftest.$ac_ext <<_ACEOF
16634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016635
Martin v. Löwiseba40652007-08-30 20:10:57 +000016636/* Override any GCC internal prototype to avoid an error.
16637 Use char because int might match the return type of a GCC
16638 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016639#ifdef __cplusplus
16640extern "C"
16641#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016642char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016643int
16644main ()
16645{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016646return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016647 ;
16648 return 0;
16649}
16650_ACEOF
16651rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016652if { (ac_try="$ac_link"
16653case "(($ac_try" in
16654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16655 *) ac_try_echo=$ac_try;;
16656esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016658 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016659 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016660 grep -v '^ *+' conftest.er1 >conftest.err
16661 rm -f conftest.er1
16662 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016664 (exit $ac_status); } && {
16665 test -z "$ac_c_werror_flag" ||
16666 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016667 } && test -s conftest$ac_exeext &&
16668 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016669 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016670else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016671 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016672sed 's/^/| /' conftest.$ac_ext >&5
16673
Martin v. Löwiseba40652007-08-30 20:10:57 +000016674 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016675fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016676
16677rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016678 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016679LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016680fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016681{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16682echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16683if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016684 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016685#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016686_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016687
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016688 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016689 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016690 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016691else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016692
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016693 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16694echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016695if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016696 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016697else
Martin v. Löwis11437992002-04-12 09:54:03 +000016698 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016699LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016700cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016701/* confdefs.h. */
16702_ACEOF
16703cat confdefs.h >>conftest.$ac_ext
16704cat >>conftest.$ac_ext <<_ACEOF
16705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016706
Martin v. Löwiseba40652007-08-30 20:10:57 +000016707/* Override any GCC internal prototype to avoid an error.
16708 Use char because int might match the return type of a GCC
16709 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016710#ifdef __cplusplus
16711extern "C"
16712#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016713char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016714int
16715main ()
16716{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016717return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016718 ;
16719 return 0;
16720}
16721_ACEOF
16722rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016723if { (ac_try="$ac_link"
16724case "(($ac_try" in
16725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16726 *) ac_try_echo=$ac_try;;
16727esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016729 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016731 grep -v '^ *+' conftest.er1 >conftest.err
16732 rm -f conftest.er1
16733 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016735 (exit $ac_status); } && {
16736 test -z "$ac_c_werror_flag" ||
16737 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016738 } && test -s conftest$ac_exeext &&
16739 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016740 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016741else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016743sed 's/^/| /' conftest.$ac_ext >&5
16744
Martin v. Löwiseba40652007-08-30 20:10:57 +000016745 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016747
16748rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016749 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016750LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016751fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016752{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16753echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16754if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016755 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016756#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016757_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016758
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016759 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016760 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016761 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016762else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016763
Martin v. Löwis130fb172001-07-19 11:00:41 +000016764 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016765fi
16766
Guido van Rossum627b2d71993-12-24 10:39:16 +000016767
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016768fi
16769
Guido van Rossum0be3e491997-05-22 20:33:33 +000016770fi
16771
Guido van Rossum49545951997-12-02 19:28:29 +000016772fi
16773
Guido van Rossumb93a8621998-05-07 13:27:32 +000016774fi
16775
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016776
Michael W. Hudson54241132001-12-07 15:38:26 +000016777fi
16778
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016779
16780fi
16781
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016782fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016783
16784rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016785 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016786fi
16787
Martin v. Löwis11437992002-04-12 09:54:03 +000016788fi
16789
16790
16791fi
16792
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016793
Michael W. Hudson54241132001-12-07 15:38:26 +000016794
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016795 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16796echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016797if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016798 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016799else
Martin v. Löwis11437992002-04-12 09:54:03 +000016800 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016801LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016802cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016803/* confdefs.h. */
16804_ACEOF
16805cat confdefs.h >>conftest.$ac_ext
16806cat >>conftest.$ac_ext <<_ACEOF
16807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016808
Martin v. Löwiseba40652007-08-30 20:10:57 +000016809/* Override any GCC internal prototype to avoid an error.
16810 Use char because int might match the return type of a GCC
16811 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016812#ifdef __cplusplus
16813extern "C"
16814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016815char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016816int
16817main ()
16818{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016819return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016820 ;
16821 return 0;
16822}
16823_ACEOF
16824rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016825if { (ac_try="$ac_link"
16826case "(($ac_try" in
16827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16828 *) ac_try_echo=$ac_try;;
16829esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016831 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016832 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016833 grep -v '^ *+' conftest.er1 >conftest.err
16834 rm -f conftest.er1
16835 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016837 (exit $ac_status); } && {
16838 test -z "$ac_c_werror_flag" ||
16839 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016840 } && test -s conftest$ac_exeext &&
16841 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016842 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016843else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016845sed 's/^/| /' conftest.$ac_ext >&5
16846
Martin v. Löwiseba40652007-08-30 20:10:57 +000016847 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016848fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016849
16850rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016851 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016852LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016853fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016854{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16855echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16856if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016857 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016858#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016859_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016860
Martin v. Löwis130fb172001-07-19 11:00:41 +000016861 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016862 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016863 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016864fi
16865
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016866
Neal Norwitza978ab02002-11-02 16:58:05 +000016867 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016868 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16869echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016870if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016871 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016872else
Martin v. Löwis11437992002-04-12 09:54:03 +000016873 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016874LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016875cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016876/* confdefs.h. */
16877_ACEOF
16878cat confdefs.h >>conftest.$ac_ext
16879cat >>conftest.$ac_ext <<_ACEOF
16880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016881
Martin v. Löwiseba40652007-08-30 20:10:57 +000016882/* Override any GCC internal prototype to avoid an error.
16883 Use char because int might match the return type of a GCC
16884 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016885#ifdef __cplusplus
16886extern "C"
16887#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016888char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016889int
16890main ()
16891{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016892return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016893 ;
16894 return 0;
16895}
16896_ACEOF
16897rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016898if { (ac_try="$ac_link"
16899case "(($ac_try" in
16900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16901 *) ac_try_echo=$ac_try;;
16902esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016904 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016905 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016906 grep -v '^ *+' conftest.er1 >conftest.err
16907 rm -f conftest.er1
16908 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016910 (exit $ac_status); } && {
16911 test -z "$ac_c_werror_flag" ||
16912 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016913 } && test -s conftest$ac_exeext &&
16914 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016915 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016916else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016918sed 's/^/| /' conftest.$ac_ext >&5
16919
Martin v. Löwiseba40652007-08-30 20:10:57 +000016920 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016922
16923rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016924 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016925LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016926fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016927{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16928echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16929if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016930 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016931#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016932_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016933
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016934 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016935 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016936 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016937fi
16938
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016939 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016940
Martin v. Löwis130fb172001-07-19 11:00:41 +000016941 if test "$USE_THREAD_MODULE" != "#"
16942 then
16943 # If the above checks didn't disable threads, (at least) OSF1
16944 # needs this '-threads' argument during linking.
16945 case $ac_sys_system in
16946 OSF1) LDLAST=-threads;;
16947 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016948 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016949fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016950
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016951if test "$posix_threads" = "yes"; then
16952 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016953
16954cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016955#define _POSIX_THREADS 1
16956_ACEOF
16957
16958 fi
16959
16960 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16961 case $ac_sys_system/$ac_sys_release in
16962 SunOS/5.6)
16963cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016964#define HAVE_PTHREAD_DESTRUCTOR 1
16965_ACEOF
16966
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016967 ;;
16968 SunOS/5.8)
16969cat >>confdefs.h <<\_ACEOF
16970#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16971_ACEOF
16972
16973 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000016974 AIX/5)
16975cat >>confdefs.h <<\_ACEOF
16976#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16977_ACEOF
16978
16979 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016980 esac
16981
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016982 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16983echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016984 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016985 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016986else
16987 if test "$cross_compiling" = yes; then
16988 ac_cv_pthread_system_supported=no
16989else
16990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016991/* confdefs.h. */
16992_ACEOF
16993cat confdefs.h >>conftest.$ac_ext
16994cat >>conftest.$ac_ext <<_ACEOF
16995/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016996#include <pthread.h>
16997 void *foo(void *parm) {
16998 return NULL;
16999 }
17000 main() {
17001 pthread_attr_t attr;
17002 pthread_t id;
17003 if (pthread_attr_init(&attr)) exit(-1);
17004 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17005 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17006 exit(0);
17007 }
17008_ACEOF
17009rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017010if { (ac_try="$ac_link"
17011case "(($ac_try" in
17012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17013 *) ac_try_echo=$ac_try;;
17014esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017016 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017017 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017019 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017020 { (case "(($ac_try" in
17021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17022 *) ac_try_echo=$ac_try;;
17023esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017025 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017026 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017028 (exit $ac_status); }; }; then
17029 ac_cv_pthread_system_supported=yes
17030else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017031 echo "$as_me: program exited with status $ac_status" >&5
17032echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017033sed 's/^/| /' conftest.$ac_ext >&5
17034
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017035( exit $ac_status )
17036ac_cv_pthread_system_supported=no
17037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017038rm -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 +000017039fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017040
Martin v. Löwiseba40652007-08-30 20:10:57 +000017041
17042
Guido van Rossum627b2d71993-12-24 10:39:16 +000017043fi
17044
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017045 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17046echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017047 if test "$ac_cv_pthread_system_supported" = "yes"; then
17048
17049cat >>confdefs.h <<\_ACEOF
17050#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17051_ACEOF
17052
17053 fi
17054
17055for ac_func in pthread_sigmask
17056do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017057as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17058{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17059echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017060if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017061 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017062else
17063 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017064/* confdefs.h. */
17065_ACEOF
17066cat confdefs.h >>conftest.$ac_ext
17067cat >>conftest.$ac_ext <<_ACEOF
17068/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017069/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17070 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17071#define $ac_func innocuous_$ac_func
17072
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017073/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017074 which can conflict with char $ac_func (); below.
17075 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017076 <limits.h> exists even on freestanding compilers. */
17077
17078#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017079# include <limits.h>
17080#else
17081# include <assert.h>
17082#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017083
17084#undef $ac_func
17085
Martin v. Löwiseba40652007-08-30 20:10:57 +000017086/* Override any GCC internal prototype to avoid an error.
17087 Use char because int might match the return type of a GCC
17088 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017089#ifdef __cplusplus
17090extern "C"
17091#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017092char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017093/* The GNU C library defines this for functions which it implements
17094 to always fail with ENOSYS. Some functions are actually named
17095 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017096#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017097choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017098#endif
17099
Skip Montanaro6dead952003-09-25 14:50:04 +000017100int
17101main ()
17102{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017103return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017104 ;
17105 return 0;
17106}
17107_ACEOF
17108rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017109if { (ac_try="$ac_link"
17110case "(($ac_try" in
17111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17112 *) ac_try_echo=$ac_try;;
17113esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017115 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017117 grep -v '^ *+' conftest.er1 >conftest.err
17118 rm -f conftest.er1
17119 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017121 (exit $ac_status); } && {
17122 test -z "$ac_c_werror_flag" ||
17123 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017124 } && test -s conftest$ac_exeext &&
17125 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017126 eval "$as_ac_var=yes"
17127else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017128 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017129sed 's/^/| /' conftest.$ac_ext >&5
17130
Martin v. Löwiseba40652007-08-30 20:10:57 +000017131 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017132fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017133
17134rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017135 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017136fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017137ac_res=`eval echo '${'$as_ac_var'}'`
17138 { echo "$as_me:$LINENO: result: $ac_res" >&5
17139echo "${ECHO_T}$ac_res" >&6; }
17140if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017141 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017142#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017143_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017144 case $ac_sys_system in
17145 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017146
Jason Tishlerfac083d2003-07-22 15:20:49 +000017147cat >>confdefs.h <<\_ACEOF
17148#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17149_ACEOF
17150
17151 ;;
17152 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017153fi
17154done
17155
17156fi
17157
17158
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017159# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017160
17161
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017162{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17163echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017164# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017165if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017166 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017167 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017168 { echo "$as_me:$LINENO: result: no" >&5
17169echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017170 ipv6=no
17171 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017172 *) { echo "$as_me:$LINENO: result: yes" >&5
17173echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017174 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017175#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017176_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017177
17178 ipv6=yes
17179 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017180 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017181else
Martin v. Löwis11437992002-04-12 09:54:03 +000017182
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017183 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017184 { echo "$as_me:$LINENO: result: no" >&5
17185echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017186 ipv6=no
17187
17188else
Martin v. Löwis11437992002-04-12 09:54:03 +000017189 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017190/* confdefs.h. */
17191_ACEOF
17192cat confdefs.h >>conftest.$ac_ext
17193cat >>conftest.$ac_ext <<_ACEOF
17194/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017195 /* AF_INET6 available check */
17196#include <sys/types.h>
17197#include <sys/socket.h>
17198main()
17199{
17200 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17201 exit(1);
17202 else
17203 exit(0);
17204}
17205
Martin v. Löwis11437992002-04-12 09:54:03 +000017206_ACEOF
17207rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017208if { (ac_try="$ac_link"
17209case "(($ac_try" in
17210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17211 *) ac_try_echo=$ac_try;;
17212esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017214 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017215 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017217 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017218 { (case "(($ac_try" in
17219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17220 *) ac_try_echo=$ac_try;;
17221esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017223 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017224 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017226 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017227 { echo "$as_me:$LINENO: result: yes" >&5
17228echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017229 ipv6=yes
17230else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017231 echo "$as_me: program exited with status $ac_status" >&5
17232echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017233sed 's/^/| /' conftest.$ac_ext >&5
17234
Martin v. Löwis11437992002-04-12 09:54:03 +000017235( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017236{ echo "$as_me:$LINENO: result: no" >&5
17237echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017238 ipv6=no
17239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017240rm -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 +000017241fi
17242
Martin v. Löwiseba40652007-08-30 20:10:57 +000017243
17244
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017245if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017246 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17247echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017248 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017249/* confdefs.h. */
17250_ACEOF
17251cat confdefs.h >>conftest.$ac_ext
17252cat >>conftest.$ac_ext <<_ACEOF
17253/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017254#include <sys/types.h>
17255#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017256int
17257main ()
17258{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017259struct sockaddr_in6 x;
17260x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017261 ;
17262 return 0;
17263}
17264_ACEOF
17265rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017266if { (ac_try="$ac_compile"
17267case "(($ac_try" in
17268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17269 *) ac_try_echo=$ac_try;;
17270esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017272 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017273 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017274 grep -v '^ *+' conftest.er1 >conftest.err
17275 rm -f conftest.er1
17276 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017278 (exit $ac_status); } && {
17279 test -z "$ac_c_werror_flag" ||
17280 test ! -s conftest.err
17281 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017282 { echo "$as_me:$LINENO: result: yes" >&5
17283echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017284 ipv6=yes
17285else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017287sed 's/^/| /' conftest.$ac_ext >&5
17288
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017289 { echo "$as_me:$LINENO: result: no" >&5
17290echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017291 ipv6=no
17292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017293
17294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017295fi
17296
17297if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017298 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017299#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017300_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017301
17302fi
17303
Martin v. Löwiseba40652007-08-30 20:10:57 +000017304fi
17305
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017306
17307ipv6type=unknown
17308ipv6lib=none
17309ipv6trylibc=no
17310
17311if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017312 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17313echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017314 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17315 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017316 case $i in
17317 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017318 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017319/* confdefs.h. */
17320_ACEOF
17321cat confdefs.h >>conftest.$ac_ext
17322cat >>conftest.$ac_ext <<_ACEOF
17323/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017324
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017325#include <netinet/in.h>
17326#ifdef IPV6_INRIA_VERSION
17327yes
17328#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017329_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017330if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017331 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017332 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017333fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017334rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017335
17336 ;;
17337 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017338 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017339/* confdefs.h. */
17340_ACEOF
17341cat confdefs.h >>conftest.$ac_ext
17342cat >>conftest.$ac_ext <<_ACEOF
17343/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017344
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017345#include <netinet/in.h>
17346#ifdef __KAME__
17347yes
17348#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017349_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017350if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017351 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017352 ipv6type=$i;
17353 ipv6lib=inet6
17354 ipv6libdir=/usr/local/v6/lib
17355 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017356fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017357rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017358
17359 ;;
17360 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017362/* confdefs.h. */
17363_ACEOF
17364cat confdefs.h >>conftest.$ac_ext
17365cat >>conftest.$ac_ext <<_ACEOF
17366/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017367
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017368#include <features.h>
17369#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17370yes
17371#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017372_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017373if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017374 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017375 ipv6type=$i;
17376 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017377fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017378rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017379
17380 ;;
17381 linux-inet6)
17382 if test -d /usr/inet6; then
17383 ipv6type=$i
17384 ipv6lib=inet6
17385 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017386 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017387 fi
17388 ;;
17389 solaris)
17390 if test -f /etc/netconfig; then
17391 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17392 ipv6type=$i
17393 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017394 fi
17395 fi
17396 ;;
17397 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017398 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017399/* confdefs.h. */
17400_ACEOF
17401cat confdefs.h >>conftest.$ac_ext
17402cat >>conftest.$ac_ext <<_ACEOF
17403/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017404
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017405#include <sys/param.h>
17406#ifdef _TOSHIBA_INET6
17407yes
17408#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017409_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017410if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017411 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017412 ipv6type=$i;
17413 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017414 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017415fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017416rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017417
17418 ;;
17419 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017420 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017421/* confdefs.h. */
17422_ACEOF
17423cat confdefs.h >>conftest.$ac_ext
17424cat >>conftest.$ac_ext <<_ACEOF
17425/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017426
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017427#include </usr/local/v6/include/sys/v6config.h>
17428#ifdef __V6D__
17429yes
17430#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017431_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017432if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017433 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017434 ipv6type=$i;
17435 ipv6lib=v6;
17436 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017437 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017438fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017439rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017440
17441 ;;
17442 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017443 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017444/* confdefs.h. */
17445_ACEOF
17446cat confdefs.h >>conftest.$ac_ext
17447cat >>conftest.$ac_ext <<_ACEOF
17448/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017449
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017450#include <sys/param.h>
17451#ifdef _ZETA_MINAMI_INET6
17452yes
17453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017454_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017455if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017456 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017457 ipv6type=$i;
17458 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017459 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017460fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017461rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017462
17463 ;;
17464 esac
17465 if test "$ipv6type" != "unknown"; then
17466 break
17467 fi
17468 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017469 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17470echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017471fi
17472
17473if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17474 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17475 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17476 echo "using lib$ipv6lib"
17477 else
17478 if test $ipv6trylibc = "yes"; then
17479 echo "using libc"
17480 else
17481 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17482 echo "You need to fetch lib$ipv6lib.a from appropriate"
17483 echo 'ipv6 kit and compile beforehand.'
17484 exit 1
17485 fi
17486 fi
17487fi
17488
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017489{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17490echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017491cat >conftest.$ac_ext <<_ACEOF
17492/* confdefs.h. */
17493_ACEOF
17494cat confdefs.h >>conftest.$ac_ext
17495cat >>conftest.$ac_ext <<_ACEOF
17496/* end confdefs.h. */
17497#include <Carbon/Carbon.h>
17498int
17499main ()
17500{
17501FSIORefNum fRef = 0
17502 ;
17503 return 0;
17504}
17505_ACEOF
17506rm -f conftest.$ac_objext
17507if { (ac_try="$ac_compile"
17508case "(($ac_try" in
17509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17510 *) ac_try_echo=$ac_try;;
17511esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017513 (eval "$ac_compile") 2>conftest.er1
17514 ac_status=$?
17515 grep -v '^ *+' conftest.er1 >conftest.err
17516 rm -f conftest.er1
17517 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017519 (exit $ac_status); } && {
17520 test -z "$ac_c_werror_flag" ||
17521 test ! -s conftest.err
17522 } && test -s conftest.$ac_objext; then
17523
17524cat >>confdefs.h <<\_ACEOF
17525#define HAVE_OSX105_SDK 1
17526_ACEOF
17527
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017528 { echo "$as_me:$LINENO: result: yes" >&5
17529echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017530else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017531 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017532sed 's/^/| /' conftest.$ac_ext >&5
17533
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017534 { echo "$as_me:$LINENO: result: no" >&5
17535echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017536
17537fi
17538
17539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17540
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017541# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017542{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17543echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017544
Martin v. Löwiseba40652007-08-30 20:10:57 +000017545# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017546if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017547 withval=$with_doc_strings;
17548fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017549
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017550
17551if test -z "$with_doc_strings"
17552then with_doc_strings="yes"
17553fi
17554if test "$with_doc_strings" != "no"
17555then
17556
17557cat >>confdefs.h <<\_ACEOF
17558#define WITH_DOC_STRINGS 1
17559_ACEOF
17560
17561fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017562{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17563echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017564
Neil Schemenauera35c6882001-02-27 04:45:05 +000017565# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017566{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17567echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017568
Martin v. Löwiseba40652007-08-30 20:10:57 +000017569# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017570if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017571 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017572if test "$withval" != no
17573then
17574
17575cat >>confdefs.h <<\_ACEOF
17576#define WITH_TSC 1
17577_ACEOF
17578
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017579 { echo "$as_me:$LINENO: result: yes" >&5
17580echo "${ECHO_T}yes" >&6; }
17581else { echo "$as_me:$LINENO: result: no" >&5
17582echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017583fi
17584else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017585 { echo "$as_me:$LINENO: result: no" >&5
17586echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017587fi
17588
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017589
17590# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017591{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17592echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017593
Martin v. Löwiseba40652007-08-30 20:10:57 +000017594# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017595if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017596 withval=$with_pymalloc;
17597fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017598
Neil Schemenauera35c6882001-02-27 04:45:05 +000017599
Neil Schemenauer16c22972002-03-22 15:34:49 +000017600if test -z "$with_pymalloc"
17601then with_pymalloc="yes"
17602fi
17603if test "$with_pymalloc" != "no"
17604then
Martin v. Löwis11437992002-04-12 09:54:03 +000017605
17606cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017607#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017608_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017609
17610fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017611{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17612echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017613
Barry Warsawef82cd72000-06-30 16:21:01 +000017614# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017615{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17616echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017617
Martin v. Löwiseba40652007-08-30 20:10:57 +000017618# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017619if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017620 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017621if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017622then
17623
17624cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017625#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017626_ACEOF
17627
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017628 { echo "$as_me:$LINENO: result: yes" >&5
17629echo "${ECHO_T}yes" >&6; }
17630else { echo "$as_me:$LINENO: result: no" >&5
17631echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017632fi
17633else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017634 { echo "$as_me:$LINENO: result: no" >&5
17635echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017636fi
17637
Barry Warsawef82cd72000-06-30 16:21:01 +000017638
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017639# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017640
Guido van Rossum98935bf2001-09-05 19:13:16 +000017641DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017642
Guido van Rossume97ee181999-12-20 21:27:22 +000017643# the dlopen() function means we might want to use dynload_shlib.o. some
17644# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017645
Thomas Wouters3a584202000-08-05 23:28:51 +000017646for ac_func in dlopen
17647do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017648as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17649{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17650echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017651if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017652 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017653else
Martin v. Löwis11437992002-04-12 09:54:03 +000017654 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017655/* confdefs.h. */
17656_ACEOF
17657cat confdefs.h >>conftest.$ac_ext
17658cat >>conftest.$ac_ext <<_ACEOF
17659/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017660/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17661 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17662#define $ac_func innocuous_$ac_func
17663
Guido van Rossume97ee181999-12-20 21:27:22 +000017664/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017665 which can conflict with char $ac_func (); below.
17666 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017667 <limits.h> exists even on freestanding compilers. */
17668
17669#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017670# include <limits.h>
17671#else
17672# include <assert.h>
17673#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017674
17675#undef $ac_func
17676
Martin v. Löwiseba40652007-08-30 20:10:57 +000017677/* Override any GCC internal prototype to avoid an error.
17678 Use char because int might match the return type of a GCC
17679 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017680#ifdef __cplusplus
17681extern "C"
17682#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017683char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017684/* The GNU C library defines this for functions which it implements
17685 to always fail with ENOSYS. Some functions are actually named
17686 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017687#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017688choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017689#endif
17690
Skip Montanaro6dead952003-09-25 14:50:04 +000017691int
17692main ()
17693{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017694return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017695 ;
17696 return 0;
17697}
17698_ACEOF
17699rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017700if { (ac_try="$ac_link"
17701case "(($ac_try" in
17702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17703 *) ac_try_echo=$ac_try;;
17704esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017706 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017707 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017708 grep -v '^ *+' conftest.er1 >conftest.err
17709 rm -f conftest.er1
17710 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017712 (exit $ac_status); } && {
17713 test -z "$ac_c_werror_flag" ||
17714 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017715 } && test -s conftest$ac_exeext &&
17716 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017717 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017718else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017720sed 's/^/| /' conftest.$ac_ext >&5
17721
Martin v. Löwiseba40652007-08-30 20:10:57 +000017722 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017723fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017724
17725rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017726 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017727fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017728ac_res=`eval echo '${'$as_ac_var'}'`
17729 { echo "$as_me:$LINENO: result: $ac_res" >&5
17730echo "${ECHO_T}$ac_res" >&6; }
17731if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017732 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017733#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017734_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017735
Guido van Rossume97ee181999-12-20 21:27:22 +000017736fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017737done
Guido van Rossume97ee181999-12-20 21:27:22 +000017738
Michael W. Hudson54241132001-12-07 15:38:26 +000017739
Guido van Rossume97ee181999-12-20 21:27:22 +000017740# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17741# loading of modules.
17742
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017743{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17744echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017745if test -z "$DYNLOADFILE"
17746then
17747 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017748 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17749 if test "$ac_cv_func_dlopen" = yes
17750 then DYNLOADFILE="dynload_shlib.o"
17751 else DYNLOADFILE="dynload_aix.o"
17752 fi
17753 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017754 BeOS*) DYNLOADFILE="dynload_beos.o";;
17755 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000017756 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17757 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017758 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017759 *)
17760 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17761 # out any dynamic loading
17762 if test "$ac_cv_func_dlopen" = yes
17763 then DYNLOADFILE="dynload_shlib.o"
17764 else DYNLOADFILE="dynload_stub.o"
17765 fi
17766 ;;
17767 esac
17768fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017769{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17770echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017771if test "$DYNLOADFILE" != "dynload_stub.o"
17772then
Martin v. Löwis11437992002-04-12 09:54:03 +000017773
17774cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017775#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017776_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017777
17778fi
17779
Neil Schemenauer4e425612001-06-19 15:44:15 +000017780# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17781
Michael W. Hudson54241132001-12-07 15:38:26 +000017782
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017783{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17784echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017785if test -z "$MACHDEP_OBJS"
17786then
Jack Jansene578a632001-08-15 01:27:14 +000017787 MACHDEP_OBJS=$extra_machdep_objs
17788else
17789 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017790fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017791{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17792echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017793
Guido van Rossum627b2d71993-12-24 10:39:16 +000017794# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
Martin v. Löwisd6320502004-08-12 13:45:08 +000017866
Martin v. Löwisc3001752005-01-23 09:27:24 +000017867
17868
Neal Norwitz05a45592006-03-20 06:30:08 +000017869
17870
Martin v. Löwis382abef2007-02-19 10:55:19 +000017871
17872
Christian Heimes36281872007-11-30 21:11:28 +000017873
Martin v. Löwisaef18b12008-03-24 13:31:16 +000017874
17875
Jesse Noller355b1262009-04-02 00:03:28 +000017876
17877
17878
17879
Martin v. Löwisaef18b12008-03-24 13:31:16 +000017880for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17881 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017882 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000017883 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017884 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017885 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017886 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000017887 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17888 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000017889 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000017890 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017891 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000017892 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017893do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017894as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17895{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17896echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017897if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017898 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017899else
Martin v. Löwis11437992002-04-12 09:54:03 +000017900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017901/* confdefs.h. */
17902_ACEOF
17903cat confdefs.h >>conftest.$ac_ext
17904cat >>conftest.$ac_ext <<_ACEOF
17905/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017906/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17907 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17908#define $ac_func innocuous_$ac_func
17909
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017910/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017911 which can conflict with char $ac_func (); below.
17912 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017913 <limits.h> exists even on freestanding compilers. */
17914
17915#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017916# include <limits.h>
17917#else
17918# include <assert.h>
17919#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017920
17921#undef $ac_func
17922
Martin v. Löwiseba40652007-08-30 20:10:57 +000017923/* Override any GCC internal prototype to avoid an error.
17924 Use char because int might match the return type of a GCC
17925 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017926#ifdef __cplusplus
17927extern "C"
17928#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017929char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017930/* The GNU C library defines this for functions which it implements
17931 to always fail with ENOSYS. Some functions are actually named
17932 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017933#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017934choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017935#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017936
Skip Montanaro6dead952003-09-25 14:50:04 +000017937int
17938main ()
17939{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017940return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017941 ;
17942 return 0;
17943}
17944_ACEOF
17945rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017946if { (ac_try="$ac_link"
17947case "(($ac_try" in
17948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17949 *) ac_try_echo=$ac_try;;
17950esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017952 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017954 grep -v '^ *+' conftest.er1 >conftest.err
17955 rm -f conftest.er1
17956 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017958 (exit $ac_status); } && {
17959 test -z "$ac_c_werror_flag" ||
17960 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017961 } && test -s conftest$ac_exeext &&
17962 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017963 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017964else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017966sed 's/^/| /' conftest.$ac_ext >&5
17967
Martin v. Löwiseba40652007-08-30 20:10:57 +000017968 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017970
17971rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017972 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017973fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017974ac_res=`eval echo '${'$as_ac_var'}'`
17975 { echo "$as_me:$LINENO: result: $ac_res" >&5
17976echo "${ECHO_T}$ac_res" >&6; }
17977if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017978 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017979#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017980_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017981
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017982fi
17983done
17984
Michael W. Hudson54241132001-12-07 15:38:26 +000017985
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017986# For some functions, having a definition is not sufficient, since
17987# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017988{ echo "$as_me:$LINENO: checking for chroot" >&5
17989echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017990cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017991/* confdefs.h. */
17992_ACEOF
17993cat confdefs.h >>conftest.$ac_ext
17994cat >>conftest.$ac_ext <<_ACEOF
17995/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017996#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017997int
17998main ()
17999{
18000void *x=chroot
18001 ;
18002 return 0;
18003}
18004_ACEOF
18005rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018006if { (ac_try="$ac_compile"
18007case "(($ac_try" in
18008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18009 *) ac_try_echo=$ac_try;;
18010esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018012 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018013 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018014 grep -v '^ *+' conftest.er1 >conftest.err
18015 rm -f conftest.er1
18016 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018018 (exit $ac_status); } && {
18019 test -z "$ac_c_werror_flag" ||
18020 test ! -s conftest.err
18021 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018022
18023cat >>confdefs.h <<\_ACEOF
18024#define HAVE_CHROOT 1
18025_ACEOF
18026
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018027 { echo "$as_me:$LINENO: result: yes" >&5
18028echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018029else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018030 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018031sed 's/^/| /' conftest.$ac_ext >&5
18032
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018033 { echo "$as_me:$LINENO: result: no" >&5
18034echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018035
18036fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018037
18038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018039{ echo "$as_me:$LINENO: checking for link" >&5
18040echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018041cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018042/* confdefs.h. */
18043_ACEOF
18044cat confdefs.h >>conftest.$ac_ext
18045cat >>conftest.$ac_ext <<_ACEOF
18046/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018047#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018048int
18049main ()
18050{
18051void *x=link
18052 ;
18053 return 0;
18054}
18055_ACEOF
18056rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018057if { (ac_try="$ac_compile"
18058case "(($ac_try" in
18059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18060 *) ac_try_echo=$ac_try;;
18061esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018063 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018065 grep -v '^ *+' conftest.er1 >conftest.err
18066 rm -f conftest.er1
18067 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018069 (exit $ac_status); } && {
18070 test -z "$ac_c_werror_flag" ||
18071 test ! -s conftest.err
18072 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018073
18074cat >>confdefs.h <<\_ACEOF
18075#define HAVE_LINK 1
18076_ACEOF
18077
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018078 { echo "$as_me:$LINENO: result: yes" >&5
18079echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018080else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018082sed 's/^/| /' conftest.$ac_ext >&5
18083
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018084 { echo "$as_me:$LINENO: result: no" >&5
18085echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018086
18087fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018088
18089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018090{ echo "$as_me:$LINENO: checking for symlink" >&5
18091echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018092cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018093/* confdefs.h. */
18094_ACEOF
18095cat confdefs.h >>conftest.$ac_ext
18096cat >>conftest.$ac_ext <<_ACEOF
18097/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018098#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018099int
18100main ()
18101{
18102void *x=symlink
18103 ;
18104 return 0;
18105}
18106_ACEOF
18107rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018108if { (ac_try="$ac_compile"
18109case "(($ac_try" in
18110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18111 *) ac_try_echo=$ac_try;;
18112esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018114 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018116 grep -v '^ *+' conftest.er1 >conftest.err
18117 rm -f conftest.er1
18118 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018120 (exit $ac_status); } && {
18121 test -z "$ac_c_werror_flag" ||
18122 test ! -s conftest.err
18123 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018124
18125cat >>confdefs.h <<\_ACEOF
18126#define HAVE_SYMLINK 1
18127_ACEOF
18128
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018129 { echo "$as_me:$LINENO: result: yes" >&5
18130echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018131else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018133sed 's/^/| /' conftest.$ac_ext >&5
18134
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018135 { echo "$as_me:$LINENO: result: no" >&5
18136echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018137
18138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018139
18140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018141{ echo "$as_me:$LINENO: checking for fchdir" >&5
18142echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018143cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018144/* confdefs.h. */
18145_ACEOF
18146cat confdefs.h >>conftest.$ac_ext
18147cat >>conftest.$ac_ext <<_ACEOF
18148/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018149#include <unistd.h>
18150int
18151main ()
18152{
18153void *x=fchdir
18154 ;
18155 return 0;
18156}
18157_ACEOF
18158rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018159if { (ac_try="$ac_compile"
18160case "(($ac_try" in
18161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18162 *) ac_try_echo=$ac_try;;
18163esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018165 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018166 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018167 grep -v '^ *+' conftest.er1 >conftest.err
18168 rm -f conftest.er1
18169 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018171 (exit $ac_status); } && {
18172 test -z "$ac_c_werror_flag" ||
18173 test ! -s conftest.err
18174 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018175
18176cat >>confdefs.h <<\_ACEOF
18177#define HAVE_FCHDIR 1
18178_ACEOF
18179
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018180 { echo "$as_me:$LINENO: result: yes" >&5
18181echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018182else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018183 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018184sed 's/^/| /' conftest.$ac_ext >&5
18185
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018186 { echo "$as_me:$LINENO: result: no" >&5
18187echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018188
18189fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018190
18191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018192{ echo "$as_me:$LINENO: checking for fsync" >&5
18193echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018194cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018195/* confdefs.h. */
18196_ACEOF
18197cat confdefs.h >>conftest.$ac_ext
18198cat >>conftest.$ac_ext <<_ACEOF
18199/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018200#include <unistd.h>
18201int
18202main ()
18203{
18204void *x=fsync
18205 ;
18206 return 0;
18207}
18208_ACEOF
18209rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018210if { (ac_try="$ac_compile"
18211case "(($ac_try" in
18212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18213 *) ac_try_echo=$ac_try;;
18214esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018216 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018217 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018218 grep -v '^ *+' conftest.er1 >conftest.err
18219 rm -f conftest.er1
18220 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018222 (exit $ac_status); } && {
18223 test -z "$ac_c_werror_flag" ||
18224 test ! -s conftest.err
18225 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018226
18227cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018228#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018229_ACEOF
18230
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018231 { echo "$as_me:$LINENO: result: yes" >&5
18232echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018233else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018235sed 's/^/| /' conftest.$ac_ext >&5
18236
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018237 { echo "$as_me:$LINENO: result: no" >&5
18238echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018239
18240fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018241
18242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018243{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18244echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018245cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018246/* confdefs.h. */
18247_ACEOF
18248cat confdefs.h >>conftest.$ac_ext
18249cat >>conftest.$ac_ext <<_ACEOF
18250/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018251#include <unistd.h>
18252int
18253main ()
18254{
18255void *x=fdatasync
18256 ;
18257 return 0;
18258}
18259_ACEOF
18260rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018261if { (ac_try="$ac_compile"
18262case "(($ac_try" in
18263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18264 *) ac_try_echo=$ac_try;;
18265esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018267 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018268 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018269 grep -v '^ *+' conftest.er1 >conftest.err
18270 rm -f conftest.er1
18271 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018273 (exit $ac_status); } && {
18274 test -z "$ac_c_werror_flag" ||
18275 test ! -s conftest.err
18276 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018277
18278cat >>confdefs.h <<\_ACEOF
18279#define HAVE_FDATASYNC 1
18280_ACEOF
18281
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018282 { echo "$as_me:$LINENO: result: yes" >&5
18283echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018284else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018286sed 's/^/| /' conftest.$ac_ext >&5
18287
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018288 { echo "$as_me:$LINENO: result: no" >&5
18289echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018290
18291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018292
18293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018294{ echo "$as_me:$LINENO: checking for epoll" >&5
18295echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018296cat >conftest.$ac_ext <<_ACEOF
18297/* confdefs.h. */
18298_ACEOF
18299cat confdefs.h >>conftest.$ac_ext
18300cat >>conftest.$ac_ext <<_ACEOF
18301/* end confdefs.h. */
18302#include <sys/epoll.h>
18303int
18304main ()
18305{
18306void *x=epoll_create
18307 ;
18308 return 0;
18309}
18310_ACEOF
18311rm -f conftest.$ac_objext
18312if { (ac_try="$ac_compile"
18313case "(($ac_try" in
18314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18315 *) ac_try_echo=$ac_try;;
18316esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018318 (eval "$ac_compile") 2>conftest.er1
18319 ac_status=$?
18320 grep -v '^ *+' conftest.er1 >conftest.err
18321 rm -f conftest.er1
18322 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018324 (exit $ac_status); } && {
18325 test -z "$ac_c_werror_flag" ||
18326 test ! -s conftest.err
18327 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018328
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018329cat >>confdefs.h <<\_ACEOF
18330#define HAVE_EPOLL 1
18331_ACEOF
18332
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018333 { echo "$as_me:$LINENO: result: yes" >&5
18334echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018335else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018336 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018337sed 's/^/| /' conftest.$ac_ext >&5
18338
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018339 { echo "$as_me:$LINENO: result: no" >&5
18340echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018341
18342fi
18343
18344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018345{ echo "$as_me:$LINENO: checking for kqueue" >&5
18346echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018347cat >conftest.$ac_ext <<_ACEOF
18348/* confdefs.h. */
18349_ACEOF
18350cat confdefs.h >>conftest.$ac_ext
18351cat >>conftest.$ac_ext <<_ACEOF
18352/* end confdefs.h. */
18353
18354#include <sys/types.h>
18355#include <sys/event.h>
18356
18357int
18358main ()
18359{
18360int x=kqueue()
18361 ;
18362 return 0;
18363}
18364_ACEOF
18365rm -f conftest.$ac_objext
18366if { (ac_try="$ac_compile"
18367case "(($ac_try" in
18368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18369 *) ac_try_echo=$ac_try;;
18370esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018372 (eval "$ac_compile") 2>conftest.er1
18373 ac_status=$?
18374 grep -v '^ *+' conftest.er1 >conftest.err
18375 rm -f conftest.er1
18376 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018378 (exit $ac_status); } && {
18379 test -z "$ac_c_werror_flag" ||
18380 test ! -s conftest.err
18381 } && test -s conftest.$ac_objext; then
18382
18383cat >>confdefs.h <<\_ACEOF
18384#define HAVE_KQUEUE 1
18385_ACEOF
18386
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018387 { echo "$as_me:$LINENO: result: yes" >&5
18388echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018389else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018390 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018391sed 's/^/| /' conftest.$ac_ext >&5
18392
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018393 { echo "$as_me:$LINENO: result: no" >&5
18394echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018395
18396fi
18397
18398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018399# On some systems (eg. FreeBSD 5), we would find a definition of the
18400# functions ctermid_r, setgroups in the library, but no prototype
18401# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18402# address to avoid compiler warnings and potential miscompilations
18403# because of the missing prototypes.
18404
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018405{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18406echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018407cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018408/* confdefs.h. */
18409_ACEOF
18410cat confdefs.h >>conftest.$ac_ext
18411cat >>conftest.$ac_ext <<_ACEOF
18412/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018413
18414#include "confdefs.h"
18415#include <stdio.h>
18416
Martin v. Löwisd5843682002-11-21 20:41:28 +000018417int
18418main ()
18419{
18420void* p = ctermid_r
18421 ;
18422 return 0;
18423}
18424_ACEOF
18425rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018426if { (ac_try="$ac_compile"
18427case "(($ac_try" in
18428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18429 *) ac_try_echo=$ac_try;;
18430esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018432 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018433 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018434 grep -v '^ *+' conftest.er1 >conftest.err
18435 rm -f conftest.er1
18436 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018438 (exit $ac_status); } && {
18439 test -z "$ac_c_werror_flag" ||
18440 test ! -s conftest.err
18441 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018442
18443cat >>confdefs.h <<\_ACEOF
18444#define HAVE_CTERMID_R 1
18445_ACEOF
18446
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018447 { echo "$as_me:$LINENO: result: yes" >&5
18448echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018449else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018450 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018451sed 's/^/| /' conftest.$ac_ext >&5
18452
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018453 { echo "$as_me:$LINENO: result: no" >&5
18454echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018455
18456fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018457
Martin v. Löwiseba40652007-08-30 20:10:57 +000018458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18459
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018460{ echo "$as_me:$LINENO: checking for flock" >&5
18461echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018462cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018463/* confdefs.h. */
18464_ACEOF
18465cat confdefs.h >>conftest.$ac_ext
18466cat >>conftest.$ac_ext <<_ACEOF
18467/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018468
18469#include "confdefs.h"
18470#include <sys/file.h>
18471
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018472int
18473main ()
18474{
18475void* p = flock
18476 ;
18477 return 0;
18478}
18479_ACEOF
18480rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018481if { (ac_try="$ac_compile"
18482case "(($ac_try" in
18483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18484 *) ac_try_echo=$ac_try;;
18485esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018487 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018488 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018489 grep -v '^ *+' conftest.er1 >conftest.err
18490 rm -f conftest.er1
18491 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018493 (exit $ac_status); } && {
18494 test -z "$ac_c_werror_flag" ||
18495 test ! -s conftest.err
18496 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018497
18498cat >>confdefs.h <<\_ACEOF
18499#define HAVE_FLOCK 1
18500_ACEOF
18501
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018502 { echo "$as_me:$LINENO: result: yes" >&5
18503echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018504else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018506sed 's/^/| /' conftest.$ac_ext >&5
18507
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018508 { echo "$as_me:$LINENO: result: no" >&5
18509echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018510
18511fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018512
Martin v. Löwiseba40652007-08-30 20:10:57 +000018513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18514
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018515{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18516echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018517cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018518/* confdefs.h. */
18519_ACEOF
18520cat confdefs.h >>conftest.$ac_ext
18521cat >>conftest.$ac_ext <<_ACEOF
18522/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018523
18524#include "confdefs.h"
18525#include <unistd.h>
18526
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018527int
18528main ()
18529{
18530void* p = getpagesize
18531 ;
18532 return 0;
18533}
18534_ACEOF
18535rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018536if { (ac_try="$ac_compile"
18537case "(($ac_try" in
18538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18539 *) ac_try_echo=$ac_try;;
18540esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018542 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018544 grep -v '^ *+' conftest.er1 >conftest.err
18545 rm -f conftest.er1
18546 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018548 (exit $ac_status); } && {
18549 test -z "$ac_c_werror_flag" ||
18550 test ! -s conftest.err
18551 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018552
18553cat >>confdefs.h <<\_ACEOF
18554#define HAVE_GETPAGESIZE 1
18555_ACEOF
18556
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018557 { echo "$as_me:$LINENO: result: yes" >&5
18558echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018559else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018561sed 's/^/| /' conftest.$ac_ext >&5
18562
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018563 { echo "$as_me:$LINENO: result: no" >&5
18564echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018565
18566fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018567
18568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018569
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018570for ac_prog in true
18571do
18572 # Extract the first word of "$ac_prog", so it can be a program name with args.
18573set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018574{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18575echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018576if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018577 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018578else
18579 if test -n "$TRUE"; then
18580 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18581else
18582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18583for as_dir in $PATH
18584do
18585 IFS=$as_save_IFS
18586 test -z "$as_dir" && as_dir=.
18587 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018588 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 +000018589 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018590 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018591 break 2
18592 fi
18593done
18594done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018595IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018596
18597fi
18598fi
18599TRUE=$ac_cv_prog_TRUE
18600if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018601 { echo "$as_me:$LINENO: result: $TRUE" >&5
18602echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018603else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018604 { echo "$as_me:$LINENO: result: no" >&5
18605echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018606fi
18607
Martin v. Löwiseba40652007-08-30 20:10:57 +000018608
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018609 test -n "$TRUE" && break
18610done
18611test -n "$TRUE" || TRUE="/bin/true"
18612
18613
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018614{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18615echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018616if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018617 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018618else
18619 ac_check_lib_save_LIBS=$LIBS
18620LIBS="-lc $LIBS"
18621cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018622/* confdefs.h. */
18623_ACEOF
18624cat confdefs.h >>conftest.$ac_ext
18625cat >>conftest.$ac_ext <<_ACEOF
18626/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018627
Martin v. Löwiseba40652007-08-30 20:10:57 +000018628/* Override any GCC internal prototype to avoid an error.
18629 Use char because int might match the return type of a GCC
18630 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018631#ifdef __cplusplus
18632extern "C"
18633#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018634char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018635int
18636main ()
18637{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018638return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018639 ;
18640 return 0;
18641}
18642_ACEOF
18643rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018644if { (ac_try="$ac_link"
18645case "(($ac_try" in
18646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18647 *) ac_try_echo=$ac_try;;
18648esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018650 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018651 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018652 grep -v '^ *+' conftest.er1 >conftest.err
18653 rm -f conftest.er1
18654 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018656 (exit $ac_status); } && {
18657 test -z "$ac_c_werror_flag" ||
18658 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018659 } && test -s conftest$ac_exeext &&
18660 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018661 ac_cv_lib_c_inet_aton=yes
18662else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018664sed 's/^/| /' conftest.$ac_ext >&5
18665
Martin v. Löwiseba40652007-08-30 20:10:57 +000018666 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018667fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018668
18669rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018670 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018671LIBS=$ac_check_lib_save_LIBS
18672fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018673{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18674echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18675if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018676 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018677else
18678
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018679{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18680echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018681if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018682 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018683else
18684 ac_check_lib_save_LIBS=$LIBS
18685LIBS="-lresolv $LIBS"
18686cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018687/* confdefs.h. */
18688_ACEOF
18689cat confdefs.h >>conftest.$ac_ext
18690cat >>conftest.$ac_ext <<_ACEOF
18691/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018692
Martin v. Löwiseba40652007-08-30 20:10:57 +000018693/* Override any GCC internal prototype to avoid an error.
18694 Use char because int might match the return type of a GCC
18695 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018696#ifdef __cplusplus
18697extern "C"
18698#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018699char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018700int
18701main ()
18702{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018703return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018704 ;
18705 return 0;
18706}
18707_ACEOF
18708rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018709if { (ac_try="$ac_link"
18710case "(($ac_try" in
18711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18712 *) ac_try_echo=$ac_try;;
18713esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018715 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018716 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018717 grep -v '^ *+' conftest.er1 >conftest.err
18718 rm -f conftest.er1
18719 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018721 (exit $ac_status); } && {
18722 test -z "$ac_c_werror_flag" ||
18723 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018724 } && test -s conftest$ac_exeext &&
18725 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018726 ac_cv_lib_resolv_inet_aton=yes
18727else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018729sed 's/^/| /' conftest.$ac_ext >&5
18730
Martin v. Löwiseba40652007-08-30 20:10:57 +000018731 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018732fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018733
18734rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018735 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018736LIBS=$ac_check_lib_save_LIBS
18737fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018738{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18739echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18740if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018741 cat >>confdefs.h <<_ACEOF
18742#define HAVE_LIBRESOLV 1
18743_ACEOF
18744
18745 LIBS="-lresolv $LIBS"
18746
18747fi
18748
18749
18750fi
18751
18752
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018753# On Tru64, chflags seems to be present, but calling it will
18754# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018755{ echo "$as_me:$LINENO: checking for chflags" >&5
18756echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018757if test "${ac_cv_have_chflags+set}" = set; then
18758 echo $ECHO_N "(cached) $ECHO_C" >&6
18759else
18760 if test "$cross_compiling" = yes; then
18761 ac_cv_have_chflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018762else
18763 cat >conftest.$ac_ext <<_ACEOF
18764/* confdefs.h. */
18765_ACEOF
18766cat confdefs.h >>conftest.$ac_ext
18767cat >>conftest.$ac_ext <<_ACEOF
18768/* end confdefs.h. */
18769
18770#include <sys/stat.h>
18771#include <unistd.h>
18772int main(int argc, char*argv[])
18773{
18774 if(chflags(argv[0], 0) != 0)
18775 return 1;
18776 return 0;
18777}
18778
18779_ACEOF
18780rm -f conftest$ac_exeext
18781if { (ac_try="$ac_link"
18782case "(($ac_try" in
18783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18784 *) ac_try_echo=$ac_try;;
18785esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018787 (eval "$ac_link") 2>&5
18788 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018790 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18791 { (case "(($ac_try" in
18792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18793 *) ac_try_echo=$ac_try;;
18794esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018796 (eval "$ac_try") 2>&5
18797 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018799 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018800 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018801else
18802 echo "$as_me: program exited with status $ac_status" >&5
18803echo "$as_me: failed program was:" >&5
18804sed 's/^/| /' conftest.$ac_ext >&5
18805
18806( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018807ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018808fi
18809rm -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 +000018810fi
18811
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018812
18813
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018814fi
18815
18816{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18817echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
18818if test $ac_cv_have_chflags = yes
18819then
18820
18821cat >>confdefs.h <<\_ACEOF
18822#define HAVE_CHFLAGS 1
18823_ACEOF
18824
18825fi
18826
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018827{ echo "$as_me:$LINENO: checking for lchflags" >&5
18828echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018829if test "${ac_cv_have_lchflags+set}" = set; then
18830 echo $ECHO_N "(cached) $ECHO_C" >&6
18831else
18832 if test "$cross_compiling" = yes; then
18833 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018834else
18835 cat >conftest.$ac_ext <<_ACEOF
18836/* confdefs.h. */
18837_ACEOF
18838cat confdefs.h >>conftest.$ac_ext
18839cat >>conftest.$ac_ext <<_ACEOF
18840/* end confdefs.h. */
18841
18842#include <sys/stat.h>
18843#include <unistd.h>
18844int main(int argc, char*argv[])
18845{
18846 if(lchflags(argv[0], 0) != 0)
18847 return 1;
18848 return 0;
18849}
18850
18851_ACEOF
18852rm -f conftest$ac_exeext
18853if { (ac_try="$ac_link"
18854case "(($ac_try" in
18855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18856 *) ac_try_echo=$ac_try;;
18857esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018859 (eval "$ac_link") 2>&5
18860 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018862 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18863 { (case "(($ac_try" in
18864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18865 *) ac_try_echo=$ac_try;;
18866esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018868 (eval "$ac_try") 2>&5
18869 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018871 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018872 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018873else
18874 echo "$as_me: program exited with status $ac_status" >&5
18875echo "$as_me: failed program was:" >&5
18876sed 's/^/| /' conftest.$ac_ext >&5
18877
18878( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018879ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018880fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018881rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18882fi
18883
18884
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018885
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018886fi
18887
18888{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18889echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
18890if test $ac_cv_have_lchflags = yes
18891then
18892
18893cat >>confdefs.h <<\_ACEOF
18894#define HAVE_LCHFLAGS 1
18895_ACEOF
18896
18897fi
18898
Ronald Oussorenf8752642006-07-06 10:13:35 +000018899case $ac_sys_system/$ac_sys_release in
18900Darwin/*)
18901 _CUR_CFLAGS="${CFLAGS}"
18902 _CUR_LDFLAGS="${LDFLAGS}"
18903 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18904 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18905 ;;
18906esac
18907
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018908{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18909echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018910if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018911 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018912else
18913 ac_check_lib_save_LIBS=$LIBS
18914LIBS="-lz $LIBS"
18915cat >conftest.$ac_ext <<_ACEOF
18916/* confdefs.h. */
18917_ACEOF
18918cat confdefs.h >>conftest.$ac_ext
18919cat >>conftest.$ac_ext <<_ACEOF
18920/* end confdefs.h. */
18921
Martin v. Löwiseba40652007-08-30 20:10:57 +000018922/* Override any GCC internal prototype to avoid an error.
18923 Use char because int might match the return type of a GCC
18924 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018925#ifdef __cplusplus
18926extern "C"
18927#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018928char inflateCopy ();
18929int
18930main ()
18931{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018932return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018933 ;
18934 return 0;
18935}
18936_ACEOF
18937rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018938if { (ac_try="$ac_link"
18939case "(($ac_try" in
18940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18941 *) ac_try_echo=$ac_try;;
18942esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018944 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018945 ac_status=$?
18946 grep -v '^ *+' conftest.er1 >conftest.err
18947 rm -f conftest.er1
18948 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018950 (exit $ac_status); } && {
18951 test -z "$ac_c_werror_flag" ||
18952 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018953 } && test -s conftest$ac_exeext &&
18954 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018955 ac_cv_lib_z_inflateCopy=yes
18956else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018957 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018958sed 's/^/| /' conftest.$ac_ext >&5
18959
Martin v. Löwiseba40652007-08-30 20:10:57 +000018960 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018961fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018962
18963rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018964 conftest$ac_exeext conftest.$ac_ext
18965LIBS=$ac_check_lib_save_LIBS
18966fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018967{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18968echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18969if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018970
18971cat >>confdefs.h <<\_ACEOF
18972#define HAVE_ZLIB_COPY 1
18973_ACEOF
18974
18975fi
18976
18977
Ronald Oussorenf8752642006-07-06 10:13:35 +000018978case $ac_sys_system/$ac_sys_release in
18979Darwin/*)
18980 CFLAGS="${_CUR_CFLAGS}"
18981 LDFLAGS="${_CUR_LDFLAGS}"
18982 ;;
18983esac
18984
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018985{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18986echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018987cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018988/* confdefs.h. */
18989_ACEOF
18990cat confdefs.h >>conftest.$ac_ext
18991cat >>conftest.$ac_ext <<_ACEOF
18992/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018993
18994#include "confdefs.h"
18995#include <netdb.h>
18996
Martin v. Löwise9416172003-05-03 10:12:45 +000018997int
18998main ()
18999{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019000void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019001 ;
19002 return 0;
19003}
19004_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019005rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019006if { (ac_try="$ac_link"
19007case "(($ac_try" in
19008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19009 *) ac_try_echo=$ac_try;;
19010esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019012 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019013 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019014 grep -v '^ *+' conftest.er1 >conftest.err
19015 rm -f conftest.er1
19016 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019018 (exit $ac_status); } && {
19019 test -z "$ac_c_werror_flag" ||
19020 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019021 } && test -s conftest$ac_exeext &&
19022 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019023
19024cat >>confdefs.h <<\_ACEOF
19025#define HAVE_HSTRERROR 1
19026_ACEOF
19027
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019028 { echo "$as_me:$LINENO: result: yes" >&5
19029echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019030else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019032sed 's/^/| /' conftest.$ac_ext >&5
19033
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019034 { echo "$as_me:$LINENO: result: no" >&5
19035echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019036
19037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019038
19039rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019040 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019041
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019042{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19043echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019044cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019045/* confdefs.h. */
19046_ACEOF
19047cat confdefs.h >>conftest.$ac_ext
19048cat >>conftest.$ac_ext <<_ACEOF
19049/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019050
19051#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019052#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019053#include <sys/socket.h>
19054#include <netinet/in.h>
19055#include <arpa/inet.h>
19056
Martin v. Löwise9416172003-05-03 10:12:45 +000019057int
19058main ()
19059{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019060void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019061 ;
19062 return 0;
19063}
19064_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019065rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019066if { (ac_try="$ac_link"
19067case "(($ac_try" in
19068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19069 *) ac_try_echo=$ac_try;;
19070esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019072 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019073 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019074 grep -v '^ *+' conftest.er1 >conftest.err
19075 rm -f conftest.er1
19076 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019078 (exit $ac_status); } && {
19079 test -z "$ac_c_werror_flag" ||
19080 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019081 } && test -s conftest$ac_exeext &&
19082 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019083
19084cat >>confdefs.h <<\_ACEOF
19085#define HAVE_INET_ATON 1
19086_ACEOF
19087
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019088 { echo "$as_me:$LINENO: result: yes" >&5
19089echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019090else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019092sed 's/^/| /' conftest.$ac_ext >&5
19093
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019094 { echo "$as_me:$LINENO: result: no" >&5
19095echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019096
19097fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019098
19099rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019100 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019101
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019102{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19103echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019104cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019105/* confdefs.h. */
19106_ACEOF
19107cat confdefs.h >>conftest.$ac_ext
19108cat >>conftest.$ac_ext <<_ACEOF
19109/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019110
19111#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019112#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019113#include <sys/socket.h>
19114#include <netinet/in.h>
19115#include <arpa/inet.h>
19116
Martin v. Löwise9416172003-05-03 10:12:45 +000019117int
19118main ()
19119{
19120void* p = inet_pton
19121 ;
19122 return 0;
19123}
19124_ACEOF
19125rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019126if { (ac_try="$ac_compile"
19127case "(($ac_try" in
19128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19129 *) ac_try_echo=$ac_try;;
19130esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019132 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019133 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019134 grep -v '^ *+' conftest.er1 >conftest.err
19135 rm -f conftest.er1
19136 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019138 (exit $ac_status); } && {
19139 test -z "$ac_c_werror_flag" ||
19140 test ! -s conftest.err
19141 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019142
19143cat >>confdefs.h <<\_ACEOF
19144#define HAVE_INET_PTON 1
19145_ACEOF
19146
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019147 { echo "$as_me:$LINENO: result: yes" >&5
19148echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019149else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019150 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019151sed 's/^/| /' conftest.$ac_ext >&5
19152
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019153 { echo "$as_me:$LINENO: result: no" >&5
19154echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019155
19156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019157
19158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019159
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019160# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019161{ echo "$as_me:$LINENO: checking for setgroups" >&5
19162echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019163cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019164/* confdefs.h. */
19165_ACEOF
19166cat confdefs.h >>conftest.$ac_ext
19167cat >>conftest.$ac_ext <<_ACEOF
19168/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019169
19170#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019171#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019172#ifdef HAVE_GRP_H
19173#include <grp.h>
19174#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019175
Martin v. Löwisd5843682002-11-21 20:41:28 +000019176int
19177main ()
19178{
19179void* p = setgroups
19180 ;
19181 return 0;
19182}
19183_ACEOF
19184rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019185if { (ac_try="$ac_compile"
19186case "(($ac_try" in
19187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19188 *) ac_try_echo=$ac_try;;
19189esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019191 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019193 grep -v '^ *+' conftest.er1 >conftest.err
19194 rm -f conftest.er1
19195 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019197 (exit $ac_status); } && {
19198 test -z "$ac_c_werror_flag" ||
19199 test ! -s conftest.err
19200 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019201
19202cat >>confdefs.h <<\_ACEOF
19203#define HAVE_SETGROUPS 1
19204_ACEOF
19205
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019206 { echo "$as_me:$LINENO: result: yes" >&5
19207echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019208else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019209 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019210sed 's/^/| /' conftest.$ac_ext >&5
19211
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019212 { echo "$as_me:$LINENO: result: no" >&5
19213echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019214
19215fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019216
19217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019218
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019219# check for openpty and forkpty
19220
Martin v. Löwis11437992002-04-12 09:54:03 +000019221
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019222for ac_func in openpty
19223do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019224as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19225{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19226echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019227if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019228 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019229else
Martin v. Löwis11437992002-04-12 09:54:03 +000019230 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019231/* confdefs.h. */
19232_ACEOF
19233cat confdefs.h >>conftest.$ac_ext
19234cat >>conftest.$ac_ext <<_ACEOF
19235/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019236/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19237 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19238#define $ac_func innocuous_$ac_func
19239
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019240/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019241 which can conflict with char $ac_func (); below.
19242 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019243 <limits.h> exists even on freestanding compilers. */
19244
19245#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019246# include <limits.h>
19247#else
19248# include <assert.h>
19249#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019250
19251#undef $ac_func
19252
Martin v. Löwiseba40652007-08-30 20:10:57 +000019253/* Override any GCC internal prototype to avoid an error.
19254 Use char because int might match the return type of a GCC
19255 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019256#ifdef __cplusplus
19257extern "C"
19258#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019259char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019260/* The GNU C library defines this for functions which it implements
19261 to always fail with ENOSYS. Some functions are actually named
19262 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019263#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019264choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019265#endif
19266
Skip Montanaro6dead952003-09-25 14:50:04 +000019267int
19268main ()
19269{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019270return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019271 ;
19272 return 0;
19273}
19274_ACEOF
19275rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019276if { (ac_try="$ac_link"
19277case "(($ac_try" in
19278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19279 *) ac_try_echo=$ac_try;;
19280esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019282 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019283 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019284 grep -v '^ *+' conftest.er1 >conftest.err
19285 rm -f conftest.er1
19286 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019288 (exit $ac_status); } && {
19289 test -z "$ac_c_werror_flag" ||
19290 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019291 } && test -s conftest$ac_exeext &&
19292 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019293 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019294else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019296sed 's/^/| /' conftest.$ac_ext >&5
19297
Martin v. Löwiseba40652007-08-30 20:10:57 +000019298 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019300
19301rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019302 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019303fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019304ac_res=`eval echo '${'$as_ac_var'}'`
19305 { echo "$as_me:$LINENO: result: $ac_res" >&5
19306echo "${ECHO_T}$ac_res" >&6; }
19307if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019308 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019309#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019310_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019311
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019312else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019313 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19314echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019315if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019316 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019317else
Martin v. Löwis11437992002-04-12 09:54:03 +000019318 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019319LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019320cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019321/* confdefs.h. */
19322_ACEOF
19323cat confdefs.h >>conftest.$ac_ext
19324cat >>conftest.$ac_ext <<_ACEOF
19325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019326
Martin v. Löwiseba40652007-08-30 20:10:57 +000019327/* Override any GCC internal prototype to avoid an error.
19328 Use char because int might match the return type of a GCC
19329 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019330#ifdef __cplusplus
19331extern "C"
19332#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019333char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019334int
19335main ()
19336{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019337return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019338 ;
19339 return 0;
19340}
19341_ACEOF
19342rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019343if { (ac_try="$ac_link"
19344case "(($ac_try" in
19345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19346 *) ac_try_echo=$ac_try;;
19347esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019349 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019350 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019351 grep -v '^ *+' conftest.er1 >conftest.err
19352 rm -f conftest.er1
19353 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019355 (exit $ac_status); } && {
19356 test -z "$ac_c_werror_flag" ||
19357 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019358 } && test -s conftest$ac_exeext &&
19359 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019360 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019361else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019363sed 's/^/| /' conftest.$ac_ext >&5
19364
Martin v. Löwiseba40652007-08-30 20:10:57 +000019365 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019367
19368rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019369 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019370LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019371fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019372{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19373echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19374if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019375 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019376#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019377_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019378 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019379else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019380 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19381echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019382if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019383 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019384else
19385 ac_check_lib_save_LIBS=$LIBS
19386LIBS="-lbsd $LIBS"
19387cat >conftest.$ac_ext <<_ACEOF
19388/* confdefs.h. */
19389_ACEOF
19390cat confdefs.h >>conftest.$ac_ext
19391cat >>conftest.$ac_ext <<_ACEOF
19392/* end confdefs.h. */
19393
Martin v. Löwiseba40652007-08-30 20:10:57 +000019394/* Override any GCC internal prototype to avoid an error.
19395 Use char because int might match the return type of a GCC
19396 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019397#ifdef __cplusplus
19398extern "C"
19399#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019400char openpty ();
19401int
19402main ()
19403{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019404return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019405 ;
19406 return 0;
19407}
19408_ACEOF
19409rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019410if { (ac_try="$ac_link"
19411case "(($ac_try" in
19412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19413 *) ac_try_echo=$ac_try;;
19414esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019416 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019417 ac_status=$?
19418 grep -v '^ *+' conftest.er1 >conftest.err
19419 rm -f conftest.er1
19420 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019422 (exit $ac_status); } && {
19423 test -z "$ac_c_werror_flag" ||
19424 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019425 } && test -s conftest$ac_exeext &&
19426 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019427 ac_cv_lib_bsd_openpty=yes
19428else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019429 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019430sed 's/^/| /' conftest.$ac_ext >&5
19431
Martin v. Löwiseba40652007-08-30 20:10:57 +000019432 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019433fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019434
19435rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019436 conftest$ac_exeext conftest.$ac_ext
19437LIBS=$ac_check_lib_save_LIBS
19438fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019439{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19440echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19441if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019442 cat >>confdefs.h <<\_ACEOF
19443#define HAVE_OPENPTY 1
19444_ACEOF
19445 LIBS="$LIBS -lbsd"
19446fi
19447
19448
19449fi
19450
Fred Drake8cef4cf2000-06-28 16:40:38 +000019451
19452fi
19453done
19454
Martin v. Löwis11437992002-04-12 09:54:03 +000019455
Fred Drake8cef4cf2000-06-28 16:40:38 +000019456for ac_func in forkpty
19457do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019458as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19459{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19460echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019461if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019462 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019463else
Martin v. Löwis11437992002-04-12 09:54:03 +000019464 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019465/* confdefs.h. */
19466_ACEOF
19467cat confdefs.h >>conftest.$ac_ext
19468cat >>conftest.$ac_ext <<_ACEOF
19469/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019470/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19471 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19472#define $ac_func innocuous_$ac_func
19473
Fred Drake8cef4cf2000-06-28 16:40:38 +000019474/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019475 which can conflict with char $ac_func (); below.
19476 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019477 <limits.h> exists even on freestanding compilers. */
19478
19479#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019480# include <limits.h>
19481#else
19482# include <assert.h>
19483#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019484
19485#undef $ac_func
19486
Martin v. Löwiseba40652007-08-30 20:10:57 +000019487/* Override any GCC internal prototype to avoid an error.
19488 Use char because int might match the return type of a GCC
19489 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019490#ifdef __cplusplus
19491extern "C"
19492#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019493char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019494/* The GNU C library defines this for functions which it implements
19495 to always fail with ENOSYS. Some functions are actually named
19496 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019497#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019498choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019499#endif
19500
Skip Montanaro6dead952003-09-25 14:50:04 +000019501int
19502main ()
19503{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019504return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019505 ;
19506 return 0;
19507}
19508_ACEOF
19509rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019510if { (ac_try="$ac_link"
19511case "(($ac_try" in
19512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19513 *) ac_try_echo=$ac_try;;
19514esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019516 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019518 grep -v '^ *+' conftest.er1 >conftest.err
19519 rm -f conftest.er1
19520 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019522 (exit $ac_status); } && {
19523 test -z "$ac_c_werror_flag" ||
19524 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019525 } && test -s conftest$ac_exeext &&
19526 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019527 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019528else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019530sed 's/^/| /' conftest.$ac_ext >&5
19531
Martin v. Löwiseba40652007-08-30 20:10:57 +000019532 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019533fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019534
19535rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019536 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019537fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019538ac_res=`eval echo '${'$as_ac_var'}'`
19539 { echo "$as_me:$LINENO: result: $ac_res" >&5
19540echo "${ECHO_T}$ac_res" >&6; }
19541if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019542 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019543#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019544_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019545
Fred Drake8cef4cf2000-06-28 16:40:38 +000019546else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019547 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19548echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019549if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019550 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019551else
Martin v. Löwis11437992002-04-12 09:54:03 +000019552 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019553LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019554cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019555/* confdefs.h. */
19556_ACEOF
19557cat confdefs.h >>conftest.$ac_ext
19558cat >>conftest.$ac_ext <<_ACEOF
19559/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019560
Martin v. Löwiseba40652007-08-30 20:10:57 +000019561/* Override any GCC internal prototype to avoid an error.
19562 Use char because int might match the return type of a GCC
19563 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019564#ifdef __cplusplus
19565extern "C"
19566#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019567char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019568int
19569main ()
19570{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019571return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019572 ;
19573 return 0;
19574}
19575_ACEOF
19576rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019577if { (ac_try="$ac_link"
19578case "(($ac_try" in
19579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19580 *) ac_try_echo=$ac_try;;
19581esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019583 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019584 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019585 grep -v '^ *+' conftest.er1 >conftest.err
19586 rm -f conftest.er1
19587 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019589 (exit $ac_status); } && {
19590 test -z "$ac_c_werror_flag" ||
19591 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019592 } && test -s conftest$ac_exeext &&
19593 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019594 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019595else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019597sed 's/^/| /' conftest.$ac_ext >&5
19598
Martin v. Löwiseba40652007-08-30 20:10:57 +000019599 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019600fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019601
19602rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019603 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019604LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019605fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019606{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19607echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19608if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019609 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019610#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019611_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019612 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019613else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019614 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19615echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019616if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019617 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019618else
19619 ac_check_lib_save_LIBS=$LIBS
19620LIBS="-lbsd $LIBS"
19621cat >conftest.$ac_ext <<_ACEOF
19622/* confdefs.h. */
19623_ACEOF
19624cat confdefs.h >>conftest.$ac_ext
19625cat >>conftest.$ac_ext <<_ACEOF
19626/* end confdefs.h. */
19627
Martin v. Löwiseba40652007-08-30 20:10:57 +000019628/* Override any GCC internal prototype to avoid an error.
19629 Use char because int might match the return type of a GCC
19630 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019631#ifdef __cplusplus
19632extern "C"
19633#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019634char forkpty ();
19635int
19636main ()
19637{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019638return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019639 ;
19640 return 0;
19641}
19642_ACEOF
19643rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019644if { (ac_try="$ac_link"
19645case "(($ac_try" in
19646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19647 *) ac_try_echo=$ac_try;;
19648esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019650 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019651 ac_status=$?
19652 grep -v '^ *+' conftest.er1 >conftest.err
19653 rm -f conftest.er1
19654 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019656 (exit $ac_status); } && {
19657 test -z "$ac_c_werror_flag" ||
19658 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019659 } && test -s conftest$ac_exeext &&
19660 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019661 ac_cv_lib_bsd_forkpty=yes
19662else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019663 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019664sed 's/^/| /' conftest.$ac_ext >&5
19665
Martin v. Löwiseba40652007-08-30 20:10:57 +000019666 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019667fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019668
19669rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019670 conftest$ac_exeext conftest.$ac_ext
19671LIBS=$ac_check_lib_save_LIBS
19672fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019673{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19674echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19675if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019676 cat >>confdefs.h <<\_ACEOF
19677#define HAVE_FORKPTY 1
19678_ACEOF
19679 LIBS="$LIBS -lbsd"
19680fi
19681
19682
19683fi
19684
Fred Drake8cef4cf2000-06-28 16:40:38 +000019685
19686fi
19687done
19688
Jack Jansendd19cf82001-12-06 22:36:17 +000019689
Brett Cannonaa5778d2008-03-18 04:09:00 +000019690# Stuff for expat.
19691
19692for ac_func in memmove
19693do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019694as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19695{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19696echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000019697if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019698 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000019699else
19700 cat >conftest.$ac_ext <<_ACEOF
19701/* confdefs.h. */
19702_ACEOF
19703cat confdefs.h >>conftest.$ac_ext
19704cat >>conftest.$ac_ext <<_ACEOF
19705/* end confdefs.h. */
19706/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19707 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19708#define $ac_func innocuous_$ac_func
19709
19710/* System header to define __stub macros and hopefully few prototypes,
19711 which can conflict with char $ac_func (); below.
19712 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19713 <limits.h> exists even on freestanding compilers. */
19714
19715#ifdef __STDC__
19716# include <limits.h>
19717#else
19718# include <assert.h>
19719#endif
19720
19721#undef $ac_func
19722
19723/* Override any GCC internal prototype to avoid an error.
19724 Use char because int might match the return type of a GCC
19725 builtin and then its argument prototype would still apply. */
19726#ifdef __cplusplus
19727extern "C"
19728#endif
19729char $ac_func ();
19730/* The GNU C library defines this for functions which it implements
19731 to always fail with ENOSYS. Some functions are actually named
19732 something starting with __ and the normal name is an alias. */
19733#if defined __stub_$ac_func || defined __stub___$ac_func
19734choke me
19735#endif
19736
19737int
19738main ()
19739{
19740return $ac_func ();
19741 ;
19742 return 0;
19743}
19744_ACEOF
19745rm -f conftest.$ac_objext conftest$ac_exeext
19746if { (ac_try="$ac_link"
19747case "(($ac_try" in
19748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19749 *) ac_try_echo=$ac_try;;
19750esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019752 (eval "$ac_link") 2>conftest.er1
19753 ac_status=$?
19754 grep -v '^ *+' conftest.er1 >conftest.err
19755 rm -f conftest.er1
19756 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019758 (exit $ac_status); } && {
19759 test -z "$ac_c_werror_flag" ||
19760 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019761 } && test -s conftest$ac_exeext &&
19762 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000019763 eval "$as_ac_var=yes"
19764else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019765 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019766sed 's/^/| /' conftest.$ac_ext >&5
19767
19768 eval "$as_ac_var=no"
19769fi
19770
19771rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19772 conftest$ac_exeext conftest.$ac_ext
19773fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019774ac_res=`eval echo '${'$as_ac_var'}'`
19775 { echo "$as_me:$LINENO: result: $ac_res" >&5
19776echo "${ECHO_T}$ac_res" >&6; }
19777if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000019778 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019779#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000019780_ACEOF
19781
19782fi
19783done
19784
19785
Michael W. Hudson54241132001-12-07 15:38:26 +000019786# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019787
19788
19789
19790
19791
19792
Fred Drake8cef4cf2000-06-28 16:40:38 +000019793for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19794do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019795as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19796{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19797echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019798if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019799 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019800else
Martin v. Löwis11437992002-04-12 09:54:03 +000019801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019802/* confdefs.h. */
19803_ACEOF
19804cat confdefs.h >>conftest.$ac_ext
19805cat >>conftest.$ac_ext <<_ACEOF
19806/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019807/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19808 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19809#define $ac_func innocuous_$ac_func
19810
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019811/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019812 which can conflict with char $ac_func (); below.
19813 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019814 <limits.h> exists even on freestanding compilers. */
19815
19816#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019817# include <limits.h>
19818#else
19819# include <assert.h>
19820#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019821
19822#undef $ac_func
19823
Martin v. Löwiseba40652007-08-30 20:10:57 +000019824/* Override any GCC internal prototype to avoid an error.
19825 Use char because int might match the return type of a GCC
19826 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019827#ifdef __cplusplus
19828extern "C"
19829#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019830char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019831/* The GNU C library defines this for functions which it implements
19832 to always fail with ENOSYS. Some functions are actually named
19833 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019834#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019835choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019836#endif
19837
Skip Montanaro6dead952003-09-25 14:50:04 +000019838int
19839main ()
19840{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019841return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019842 ;
19843 return 0;
19844}
19845_ACEOF
19846rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019847if { (ac_try="$ac_link"
19848case "(($ac_try" in
19849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19850 *) ac_try_echo=$ac_try;;
19851esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019853 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019855 grep -v '^ *+' conftest.er1 >conftest.err
19856 rm -f conftest.er1
19857 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019859 (exit $ac_status); } && {
19860 test -z "$ac_c_werror_flag" ||
19861 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019862 } && test -s conftest$ac_exeext &&
19863 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019864 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019865else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019867sed 's/^/| /' conftest.$ac_ext >&5
19868
Martin v. Löwiseba40652007-08-30 20:10:57 +000019869 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019871
19872rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019873 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019874fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019875ac_res=`eval echo '${'$as_ac_var'}'`
19876 { echo "$as_me:$LINENO: result: $ac_res" >&5
19877echo "${ECHO_T}$ac_res" >&6; }
19878if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019879 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019880#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019881_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019882
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019883fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019884done
19885
Michael W. Hudson54241132001-12-07 15:38:26 +000019886
Martin v. Löwis11437992002-04-12 09:54:03 +000019887
19888
19889
Brett Cannonaa5778d2008-03-18 04:09:00 +000019890for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019891do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019892as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19893{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19894echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019895if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019896 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019897else
Martin v. Löwis11437992002-04-12 09:54:03 +000019898 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019899/* confdefs.h. */
19900_ACEOF
19901cat confdefs.h >>conftest.$ac_ext
19902cat >>conftest.$ac_ext <<_ACEOF
19903/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019904/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19905 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19906#define $ac_func innocuous_$ac_func
19907
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019908/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019909 which can conflict with char $ac_func (); below.
19910 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019911 <limits.h> exists even on freestanding compilers. */
19912
19913#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019914# include <limits.h>
19915#else
19916# include <assert.h>
19917#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019918
19919#undef $ac_func
19920
Martin v. Löwiseba40652007-08-30 20:10:57 +000019921/* Override any GCC internal prototype to avoid an error.
19922 Use char because int might match the return type of a GCC
19923 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019924#ifdef __cplusplus
19925extern "C"
19926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019927char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019928/* The GNU C library defines this for functions which it implements
19929 to always fail with ENOSYS. Some functions are actually named
19930 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019931#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019932choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019933#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019934
Skip Montanaro6dead952003-09-25 14:50:04 +000019935int
19936main ()
19937{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019938return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019939 ;
19940 return 0;
19941}
19942_ACEOF
19943rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019944if { (ac_try="$ac_link"
19945case "(($ac_try" in
19946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19947 *) ac_try_echo=$ac_try;;
19948esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019950 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019952 grep -v '^ *+' conftest.er1 >conftest.err
19953 rm -f conftest.er1
19954 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019956 (exit $ac_status); } && {
19957 test -z "$ac_c_werror_flag" ||
19958 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019959 } && test -s conftest$ac_exeext &&
19960 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019961 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019962else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019964sed 's/^/| /' conftest.$ac_ext >&5
19965
Martin v. Löwiseba40652007-08-30 20:10:57 +000019966 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019967fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019968
19969rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019970 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019971fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019972ac_res=`eval echo '${'$as_ac_var'}'`
19973 { echo "$as_me:$LINENO: result: $ac_res" >&5
19974echo "${ECHO_T}$ac_res" >&6; }
19975if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019976 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019977#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019978_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019979
Martin v. Löwis1142de32002-03-29 16:28:31 +000019980else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019981 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019982 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019983 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19984 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019985esac
19986
Martin v. Löwis1142de32002-03-29 16:28:31 +000019987fi
19988done
19989
19990
Martin v. Löwis11437992002-04-12 09:54:03 +000019991
Martin v. Löwis1142de32002-03-29 16:28:31 +000019992for ac_func in getpgrp
19993do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019994as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19995{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19996echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019997if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019998 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019999else
Martin v. Löwis11437992002-04-12 09:54:03 +000020000 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020001/* confdefs.h. */
20002_ACEOF
20003cat confdefs.h >>conftest.$ac_ext
20004cat >>conftest.$ac_ext <<_ACEOF
20005/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020006/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20007 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20008#define $ac_func innocuous_$ac_func
20009
Martin v. Löwis1142de32002-03-29 16:28:31 +000020010/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020011 which can conflict with char $ac_func (); below.
20012 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020013 <limits.h> exists even on freestanding compilers. */
20014
20015#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020016# include <limits.h>
20017#else
20018# include <assert.h>
20019#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020020
20021#undef $ac_func
20022
Martin v. Löwiseba40652007-08-30 20:10:57 +000020023/* Override any GCC internal prototype to avoid an error.
20024 Use char because int might match the return type of a GCC
20025 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020026#ifdef __cplusplus
20027extern "C"
20028#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020029char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020030/* The GNU C library defines this for functions which it implements
20031 to always fail with ENOSYS. Some functions are actually named
20032 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020033#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020034choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020035#endif
20036
Skip Montanaro6dead952003-09-25 14:50:04 +000020037int
20038main ()
20039{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020040return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020041 ;
20042 return 0;
20043}
20044_ACEOF
20045rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020046if { (ac_try="$ac_link"
20047case "(($ac_try" in
20048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20049 *) ac_try_echo=$ac_try;;
20050esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020052 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020054 grep -v '^ *+' conftest.er1 >conftest.err
20055 rm -f conftest.er1
20056 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020058 (exit $ac_status); } && {
20059 test -z "$ac_c_werror_flag" ||
20060 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020061 } && test -s conftest$ac_exeext &&
20062 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020063 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020064else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020066sed 's/^/| /' conftest.$ac_ext >&5
20067
Martin v. Löwiseba40652007-08-30 20:10:57 +000020068 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020070
20071rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020072 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020073fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020074ac_res=`eval echo '${'$as_ac_var'}'`
20075 { echo "$as_me:$LINENO: result: $ac_res" >&5
20076echo "${ECHO_T}$ac_res" >&6; }
20077if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020078 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020079#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020080_ACEOF
20081 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020082/* confdefs.h. */
20083_ACEOF
20084cat confdefs.h >>conftest.$ac_ext
20085cat >>conftest.$ac_ext <<_ACEOF
20086/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020087#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020088int
20089main ()
20090{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020091getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020092 ;
20093 return 0;
20094}
20095_ACEOF
20096rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020097if { (ac_try="$ac_compile"
20098case "(($ac_try" in
20099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20100 *) ac_try_echo=$ac_try;;
20101esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020103 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020105 grep -v '^ *+' conftest.er1 >conftest.err
20106 rm -f conftest.er1
20107 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020109 (exit $ac_status); } && {
20110 test -z "$ac_c_werror_flag" ||
20111 test ! -s conftest.err
20112 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020113
20114cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020115#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020116_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020117
Martin v. Löwis11437992002-04-12 09:54:03 +000020118
Guido van Rossumf78abae1997-01-21 22:02:36 +000020119else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020121sed 's/^/| /' conftest.$ac_ext >&5
20122
Martin v. Löwiseba40652007-08-30 20:10:57 +000020123
Guido van Rossum627b2d71993-12-24 10:39:16 +000020124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020125
20126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020127
Guido van Rossum627b2d71993-12-24 10:39:16 +000020128fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020129done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020130
Jack Jansen150753c2003-03-29 22:07:47 +000020131
20132for ac_func in setpgrp
20133do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020134as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20135{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20136echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020137if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020138 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020139else
Martin v. Löwis11437992002-04-12 09:54:03 +000020140 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020141/* confdefs.h. */
20142_ACEOF
20143cat confdefs.h >>conftest.$ac_ext
20144cat >>conftest.$ac_ext <<_ACEOF
20145/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020146/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20147 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20148#define $ac_func innocuous_$ac_func
20149
Jack Jansen150753c2003-03-29 22:07:47 +000020150/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020151 which can conflict with char $ac_func (); below.
20152 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020153 <limits.h> exists even on freestanding compilers. */
20154
20155#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020156# include <limits.h>
20157#else
20158# include <assert.h>
20159#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020160
20161#undef $ac_func
20162
Martin v. Löwiseba40652007-08-30 20:10:57 +000020163/* Override any GCC internal prototype to avoid an error.
20164 Use char because int might match the return type of a GCC
20165 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020166#ifdef __cplusplus
20167extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020168#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020169char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020170/* The GNU C library defines this for functions which it implements
20171 to always fail with ENOSYS. Some functions are actually named
20172 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020173#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020174choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020175#endif
20176
Skip Montanaro6dead952003-09-25 14:50:04 +000020177int
20178main ()
20179{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020180return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020181 ;
20182 return 0;
20183}
20184_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020185rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020186if { (ac_try="$ac_link"
20187case "(($ac_try" in
20188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20189 *) ac_try_echo=$ac_try;;
20190esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020192 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020193 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020194 grep -v '^ *+' conftest.er1 >conftest.err
20195 rm -f conftest.er1
20196 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020198 (exit $ac_status); } && {
20199 test -z "$ac_c_werror_flag" ||
20200 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020201 } && test -s conftest$ac_exeext &&
20202 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020203 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020204else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020205 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020206sed 's/^/| /' conftest.$ac_ext >&5
20207
Martin v. Löwiseba40652007-08-30 20:10:57 +000020208 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020209fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020210
20211rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020212 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020213fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020214ac_res=`eval echo '${'$as_ac_var'}'`
20215 { echo "$as_me:$LINENO: result: $ac_res" >&5
20216echo "${ECHO_T}$ac_res" >&6; }
20217if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020218 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020219#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020220_ACEOF
20221 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020222/* confdefs.h. */
20223_ACEOF
20224cat confdefs.h >>conftest.$ac_ext
20225cat >>conftest.$ac_ext <<_ACEOF
20226/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020227#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020228int
20229main ()
20230{
20231setpgrp(0,0);
20232 ;
20233 return 0;
20234}
20235_ACEOF
20236rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020237if { (ac_try="$ac_compile"
20238case "(($ac_try" in
20239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20240 *) ac_try_echo=$ac_try;;
20241esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020243 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020244 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020245 grep -v '^ *+' conftest.er1 >conftest.err
20246 rm -f conftest.er1
20247 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020249 (exit $ac_status); } && {
20250 test -z "$ac_c_werror_flag" ||
20251 test ! -s conftest.err
20252 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020253
20254cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020255#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020256_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020257
Jack Jansen150753c2003-03-29 22:07:47 +000020258
20259else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020261sed 's/^/| /' conftest.$ac_ext >&5
20262
Martin v. Löwiseba40652007-08-30 20:10:57 +000020263
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020264fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020265
20266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020267
20268fi
20269done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020270
Martin v. Löwis11437992002-04-12 09:54:03 +000020271
Thomas Wouters3a584202000-08-05 23:28:51 +000020272for ac_func in gettimeofday
20273do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020274as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20275{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20276echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020277if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020278 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020279else
Martin v. Löwis11437992002-04-12 09:54:03 +000020280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020281/* confdefs.h. */
20282_ACEOF
20283cat confdefs.h >>conftest.$ac_ext
20284cat >>conftest.$ac_ext <<_ACEOF
20285/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020286/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20287 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20288#define $ac_func innocuous_$ac_func
20289
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020290/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020291 which can conflict with char $ac_func (); below.
20292 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020293 <limits.h> exists even on freestanding compilers. */
20294
20295#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020296# include <limits.h>
20297#else
20298# include <assert.h>
20299#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020300
20301#undef $ac_func
20302
Martin v. Löwiseba40652007-08-30 20:10:57 +000020303/* Override any GCC internal prototype to avoid an error.
20304 Use char because int might match the return type of a GCC
20305 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020306#ifdef __cplusplus
20307extern "C"
20308#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020309char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020310/* The GNU C library defines this for functions which it implements
20311 to always fail with ENOSYS. Some functions are actually named
20312 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020313#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020314choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020315#endif
20316
Skip Montanaro6dead952003-09-25 14:50:04 +000020317int
20318main ()
20319{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020320return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020321 ;
20322 return 0;
20323}
20324_ACEOF
20325rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020326if { (ac_try="$ac_link"
20327case "(($ac_try" in
20328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20329 *) ac_try_echo=$ac_try;;
20330esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020332 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020334 grep -v '^ *+' conftest.er1 >conftest.err
20335 rm -f conftest.er1
20336 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020338 (exit $ac_status); } && {
20339 test -z "$ac_c_werror_flag" ||
20340 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020341 } && test -s conftest$ac_exeext &&
20342 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020343 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020344else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020345 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020346sed 's/^/| /' conftest.$ac_ext >&5
20347
Martin v. Löwiseba40652007-08-30 20:10:57 +000020348 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020350
20351rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020352 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020353fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020354ac_res=`eval echo '${'$as_ac_var'}'`
20355 { echo "$as_me:$LINENO: result: $ac_res" >&5
20356echo "${ECHO_T}$ac_res" >&6; }
20357if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020358 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020359#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020360_ACEOF
20361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020362/* confdefs.h. */
20363_ACEOF
20364cat confdefs.h >>conftest.$ac_ext
20365cat >>conftest.$ac_ext <<_ACEOF
20366/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020367#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020368int
20369main ()
20370{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020371gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020372 ;
20373 return 0;
20374}
20375_ACEOF
20376rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020377if { (ac_try="$ac_compile"
20378case "(($ac_try" in
20379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20380 *) ac_try_echo=$ac_try;;
20381esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020383 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020384 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020385 grep -v '^ *+' conftest.er1 >conftest.err
20386 rm -f conftest.er1
20387 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020389 (exit $ac_status); } && {
20390 test -z "$ac_c_werror_flag" ||
20391 test ! -s conftest.err
20392 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020393 :
20394else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020395 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020396sed 's/^/| /' conftest.$ac_ext >&5
20397
Martin v. Löwis11437992002-04-12 09:54:03 +000020398
20399cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020400#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020401_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020402
Martin v. Löwis11437992002-04-12 09:54:03 +000020403
Guido van Rossum627b2d71993-12-24 10:39:16 +000020404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020405
20406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020407
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020408fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020409done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020410
Michael W. Hudson54241132001-12-07 15:38:26 +000020411
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020412{ echo "$as_me:$LINENO: checking for major" >&5
20413echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020414cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020415/* confdefs.h. */
20416_ACEOF
20417cat confdefs.h >>conftest.$ac_ext
20418cat >>conftest.$ac_ext <<_ACEOF
20419/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020420
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020421#if defined(MAJOR_IN_MKDEV)
20422#include <sys/mkdev.h>
20423#elif defined(MAJOR_IN_SYSMACROS)
20424#include <sys/sysmacros.h>
20425#else
20426#include <sys/types.h>
20427#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020428
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020429int
20430main ()
20431{
20432
20433 makedev(major(0),minor(0));
20434
20435 ;
20436 return 0;
20437}
20438_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020439rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020440if { (ac_try="$ac_link"
20441case "(($ac_try" in
20442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20443 *) ac_try_echo=$ac_try;;
20444esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020446 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020447 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020448 grep -v '^ *+' conftest.er1 >conftest.err
20449 rm -f conftest.er1
20450 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020452 (exit $ac_status); } && {
20453 test -z "$ac_c_werror_flag" ||
20454 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020455 } && test -s conftest$ac_exeext &&
20456 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020457
20458
20459cat >>confdefs.h <<\_ACEOF
20460#define HAVE_DEVICE_MACROS 1
20461_ACEOF
20462
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020463 { echo "$as_me:$LINENO: result: yes" >&5
20464echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020465
20466else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020468sed 's/^/| /' conftest.$ac_ext >&5
20469
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020470
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020471 { echo "$as_me:$LINENO: result: no" >&5
20472echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020473
20474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020475
20476rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020477 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020478
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020479# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020480# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020481{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20482echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020483cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020484/* confdefs.h. */
20485_ACEOF
20486cat confdefs.h >>conftest.$ac_ext
20487cat >>conftest.$ac_ext <<_ACEOF
20488/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020489
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020490#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020491#include <sys/socket.h>
20492#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020493#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020494
Martin v. Löwis11437992002-04-12 09:54:03 +000020495int
20496main ()
20497{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020498getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020499 ;
20500 return 0;
20501}
20502_ACEOF
20503rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020504if { (ac_try="$ac_link"
20505case "(($ac_try" in
20506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20507 *) ac_try_echo=$ac_try;;
20508esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020510 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020511 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020512 grep -v '^ *+' conftest.er1 >conftest.err
20513 rm -f conftest.er1
20514 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020516 (exit $ac_status); } && {
20517 test -z "$ac_c_werror_flag" ||
20518 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020519 } && test -s conftest$ac_exeext &&
20520 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020521 have_getaddrinfo=yes
20522else
20523 echo "$as_me: failed program was:" >&5
20524sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020525
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020526 have_getaddrinfo=no
20527fi
20528
20529rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20530 conftest$ac_exeext conftest.$ac_ext
20531{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20532echo "${ECHO_T}$have_getaddrinfo" >&6; }
20533if test $have_getaddrinfo = yes
20534then
20535 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020536echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020537 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
20538 echo $ECHO_N "(cached) $ECHO_C" >&6
20539else
20540 if test "$cross_compiling" = yes; then
20541 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020542else
Martin v. Löwis11437992002-04-12 09:54:03 +000020543 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020544/* confdefs.h. */
20545_ACEOF
20546cat confdefs.h >>conftest.$ac_ext
20547cat >>conftest.$ac_ext <<_ACEOF
20548/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020549
20550#include <sys/types.h>
20551#include <netdb.h>
20552#include <string.h>
20553#include <sys/socket.h>
20554#include <netinet/in.h>
20555
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020556int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020557{
20558 int passive, gaierr, inet4 = 0, inet6 = 0;
20559 struct addrinfo hints, *ai, *aitop;
20560 char straddr[INET6_ADDRSTRLEN], strport[16];
20561
20562 for (passive = 0; passive <= 1; passive++) {
20563 memset(&hints, 0, sizeof(hints));
20564 hints.ai_family = AF_UNSPEC;
20565 hints.ai_flags = passive ? AI_PASSIVE : 0;
20566 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020567 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020568 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20569 (void)gai_strerror(gaierr);
20570 goto bad;
20571 }
20572 for (ai = aitop; ai; ai = ai->ai_next) {
20573 if (ai->ai_addr == NULL ||
20574 ai->ai_addrlen == 0 ||
20575 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20576 straddr, sizeof(straddr), strport, sizeof(strport),
20577 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20578 goto bad;
20579 }
20580 switch (ai->ai_family) {
20581 case AF_INET:
20582 if (strcmp(strport, "54321") != 0) {
20583 goto bad;
20584 }
20585 if (passive) {
20586 if (strcmp(straddr, "0.0.0.0") != 0) {
20587 goto bad;
20588 }
20589 } else {
20590 if (strcmp(straddr, "127.0.0.1") != 0) {
20591 goto bad;
20592 }
20593 }
20594 inet4++;
20595 break;
20596 case AF_INET6:
20597 if (strcmp(strport, "54321") != 0) {
20598 goto bad;
20599 }
20600 if (passive) {
20601 if (strcmp(straddr, "::") != 0) {
20602 goto bad;
20603 }
20604 } else {
20605 if (strcmp(straddr, "::1") != 0) {
20606 goto bad;
20607 }
20608 }
20609 inet6++;
20610 break;
20611 case AF_UNSPEC:
20612 goto bad;
20613 break;
20614 default:
20615 /* another family support? */
20616 break;
20617 }
20618 }
20619 }
20620
20621 if (!(inet4 == 0 || inet4 == 2))
20622 goto bad;
20623 if (!(inet6 == 0 || inet6 == 2))
20624 goto bad;
20625
20626 if (aitop)
20627 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020628 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020629
20630 bad:
20631 if (aitop)
20632 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020633 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020634}
20635
Martin v. Löwis11437992002-04-12 09:54:03 +000020636_ACEOF
20637rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020638if { (ac_try="$ac_link"
20639case "(($ac_try" in
20640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20641 *) ac_try_echo=$ac_try;;
20642esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020644 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020645 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020647 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000020648 { (case "(($ac_try" in
20649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20650 *) ac_try_echo=$ac_try;;
20651esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020653 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020654 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020656 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020657 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020658else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020659 echo "$as_me: program exited with status $ac_status" >&5
20660echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020661sed 's/^/| /' conftest.$ac_ext >&5
20662
Martin v. Löwis11437992002-04-12 09:54:03 +000020663( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020664ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020665fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020666rm -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 +000020667fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020668
20669
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020670fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020671
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020672fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020673
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020674if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20675then
20676 if test $ipv6 = yes
20677 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020678 echo 'Fatal: You must get working getaddrinfo() function.'
20679 echo ' or you can specify "--disable-ipv6"'.
20680 exit 1
20681 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020682else
Martin v. Löwis11437992002-04-12 09:54:03 +000020683
20684cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020685#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020686_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020687
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020688fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020689
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020690for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020691do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020692as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20693{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20694echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020695if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020696 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020697else
Martin v. Löwis11437992002-04-12 09:54:03 +000020698 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020699/* confdefs.h. */
20700_ACEOF
20701cat confdefs.h >>conftest.$ac_ext
20702cat >>conftest.$ac_ext <<_ACEOF
20703/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020704/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20705 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20706#define $ac_func innocuous_$ac_func
20707
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020708/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020709 which can conflict with char $ac_func (); below.
20710 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020711 <limits.h> exists even on freestanding compilers. */
20712
20713#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020714# include <limits.h>
20715#else
20716# include <assert.h>
20717#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020718
20719#undef $ac_func
20720
Martin v. Löwiseba40652007-08-30 20:10:57 +000020721/* Override any GCC internal prototype to avoid an error.
20722 Use char because int might match the return type of a GCC
20723 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020724#ifdef __cplusplus
20725extern "C"
20726#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020727char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020728/* The GNU C library defines this for functions which it implements
20729 to always fail with ENOSYS. Some functions are actually named
20730 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020731#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020732choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020733#endif
20734
Skip Montanaro6dead952003-09-25 14:50:04 +000020735int
20736main ()
20737{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020738return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020739 ;
20740 return 0;
20741}
20742_ACEOF
20743rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020744if { (ac_try="$ac_link"
20745case "(($ac_try" in
20746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20747 *) ac_try_echo=$ac_try;;
20748esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020750 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020751 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020752 grep -v '^ *+' conftest.er1 >conftest.err
20753 rm -f conftest.er1
20754 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020756 (exit $ac_status); } && {
20757 test -z "$ac_c_werror_flag" ||
20758 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020759 } && test -s conftest$ac_exeext &&
20760 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020761 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020762else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020764sed 's/^/| /' conftest.$ac_ext >&5
20765
Martin v. Löwiseba40652007-08-30 20:10:57 +000020766 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020768
20769rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020770 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020771fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020772ac_res=`eval echo '${'$as_ac_var'}'`
20773 { echo "$as_me:$LINENO: result: $ac_res" >&5
20774echo "${ECHO_T}$ac_res" >&6; }
20775if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020776 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020777#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020778_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020779
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020780fi
20781done
20782
Michael W. Hudson54241132001-12-07 15:38:26 +000020783
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020784# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020785{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20786echo $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 +000020787if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020788 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020789else
Martin v. Löwis11437992002-04-12 09:54:03 +000020790 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020791/* confdefs.h. */
20792_ACEOF
20793cat confdefs.h >>conftest.$ac_ext
20794cat >>conftest.$ac_ext <<_ACEOF
20795/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020796#include <sys/types.h>
20797#include <sys/time.h>
20798#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020799
Martin v. Löwis11437992002-04-12 09:54:03 +000020800int
20801main ()
20802{
20803if ((struct tm *) 0)
20804return 0;
20805 ;
20806 return 0;
20807}
20808_ACEOF
20809rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020810if { (ac_try="$ac_compile"
20811case "(($ac_try" in
20812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20813 *) ac_try_echo=$ac_try;;
20814esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020816 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020818 grep -v '^ *+' conftest.er1 >conftest.err
20819 rm -f conftest.er1
20820 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020822 (exit $ac_status); } && {
20823 test -z "$ac_c_werror_flag" ||
20824 test ! -s conftest.err
20825 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020826 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020827else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020829sed 's/^/| /' conftest.$ac_ext >&5
20830
Martin v. Löwiseba40652007-08-30 20:10:57 +000020831 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020832fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020833
20834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020835fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020836{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20837echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020838if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020839
20840cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020841#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020842_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020843
20844fi
20845
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020846{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20847echo $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 +000020848if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020849 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020850else
Martin v. Löwis11437992002-04-12 09:54:03 +000020851 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020852/* confdefs.h. */
20853_ACEOF
20854cat confdefs.h >>conftest.$ac_ext
20855cat >>conftest.$ac_ext <<_ACEOF
20856/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020857#include <sys/types.h>
20858#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020859
Martin v. Löwis11437992002-04-12 09:54:03 +000020860int
20861main ()
20862{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020863struct tm tm;
20864 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020865 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020866 ;
20867 return 0;
20868}
20869_ACEOF
20870rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020871if { (ac_try="$ac_compile"
20872case "(($ac_try" in
20873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20874 *) ac_try_echo=$ac_try;;
20875esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020877 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020878 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020879 grep -v '^ *+' conftest.er1 >conftest.err
20880 rm -f conftest.er1
20881 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020883 (exit $ac_status); } && {
20884 test -z "$ac_c_werror_flag" ||
20885 test ! -s conftest.err
20886 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020887 ac_cv_struct_tm=time.h
20888else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020889 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020890sed 's/^/| /' conftest.$ac_ext >&5
20891
Martin v. Löwiseba40652007-08-30 20:10:57 +000020892 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020894
20895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020896fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020897{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20898echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020899if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020900
20901cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020902#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020903_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020904
20905fi
20906
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020907{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20908echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020909if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020910 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020911else
Martin v. Löwis11437992002-04-12 09:54:03 +000020912 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020913/* confdefs.h. */
20914_ACEOF
20915cat confdefs.h >>conftest.$ac_ext
20916cat >>conftest.$ac_ext <<_ACEOF
20917/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020918#include <sys/types.h>
20919#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020920
20921
Martin v. Löwis11437992002-04-12 09:54:03 +000020922int
20923main ()
20924{
20925static struct tm ac_aggr;
20926if (ac_aggr.tm_zone)
20927return 0;
20928 ;
20929 return 0;
20930}
20931_ACEOF
20932rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020933if { (ac_try="$ac_compile"
20934case "(($ac_try" in
20935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20936 *) ac_try_echo=$ac_try;;
20937esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020939 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020940 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020941 grep -v '^ *+' conftest.er1 >conftest.err
20942 rm -f conftest.er1
20943 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020945 (exit $ac_status); } && {
20946 test -z "$ac_c_werror_flag" ||
20947 test ! -s conftest.err
20948 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020949 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020950else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020952sed 's/^/| /' conftest.$ac_ext >&5
20953
Martin v. Löwiseba40652007-08-30 20:10:57 +000020954 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020955/* confdefs.h. */
20956_ACEOF
20957cat confdefs.h >>conftest.$ac_ext
20958cat >>conftest.$ac_ext <<_ACEOF
20959/* end confdefs.h. */
20960#include <sys/types.h>
20961#include <$ac_cv_struct_tm>
20962
20963
20964int
20965main ()
20966{
20967static struct tm ac_aggr;
20968if (sizeof ac_aggr.tm_zone)
20969return 0;
20970 ;
20971 return 0;
20972}
20973_ACEOF
20974rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020975if { (ac_try="$ac_compile"
20976case "(($ac_try" in
20977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20978 *) ac_try_echo=$ac_try;;
20979esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020981 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020983 grep -v '^ *+' conftest.er1 >conftest.err
20984 rm -f conftest.er1
20985 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020987 (exit $ac_status); } && {
20988 test -z "$ac_c_werror_flag" ||
20989 test ! -s conftest.err
20990 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020991 ac_cv_member_struct_tm_tm_zone=yes
20992else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020994sed 's/^/| /' conftest.$ac_ext >&5
20995
Martin v. Löwiseba40652007-08-30 20:10:57 +000020996 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020998
20999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021001
21002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021003fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021004{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21005echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21006if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021007
21008cat >>confdefs.h <<_ACEOF
21009#define HAVE_STRUCT_TM_TM_ZONE 1
21010_ACEOF
21011
21012
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021013fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021014
Martin v. Löwis11437992002-04-12 09:54:03 +000021015if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21016
21017cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021018#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021019_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021020
21021else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021022 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21023echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021024if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021025 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021026else
21027 cat >conftest.$ac_ext <<_ACEOF
21028/* confdefs.h. */
21029_ACEOF
21030cat confdefs.h >>conftest.$ac_ext
21031cat >>conftest.$ac_ext <<_ACEOF
21032/* end confdefs.h. */
21033#include <time.h>
21034
21035int
21036main ()
21037{
21038#ifndef tzname
21039 (void) tzname;
21040#endif
21041
21042 ;
21043 return 0;
21044}
21045_ACEOF
21046rm -f conftest.$ac_objext
21047if { (ac_try="$ac_compile"
21048case "(($ac_try" in
21049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21050 *) ac_try_echo=$ac_try;;
21051esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021053 (eval "$ac_compile") 2>conftest.er1
21054 ac_status=$?
21055 grep -v '^ *+' conftest.er1 >conftest.err
21056 rm -f conftest.er1
21057 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021059 (exit $ac_status); } && {
21060 test -z "$ac_c_werror_flag" ||
21061 test ! -s conftest.err
21062 } && test -s conftest.$ac_objext; then
21063 ac_cv_have_decl_tzname=yes
21064else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021065 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021066sed 's/^/| /' conftest.$ac_ext >&5
21067
21068 ac_cv_have_decl_tzname=no
21069fi
21070
21071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21072fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021073{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21074echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21075if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021076
21077cat >>confdefs.h <<_ACEOF
21078#define HAVE_DECL_TZNAME 1
21079_ACEOF
21080
21081
21082else
21083 cat >>confdefs.h <<_ACEOF
21084#define HAVE_DECL_TZNAME 0
21085_ACEOF
21086
21087
21088fi
21089
21090
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021091 { echo "$as_me:$LINENO: checking for tzname" >&5
21092echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021093if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021094 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021095else
Martin v. Löwis11437992002-04-12 09:54:03 +000021096 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021097/* confdefs.h. */
21098_ACEOF
21099cat confdefs.h >>conftest.$ac_ext
21100cat >>conftest.$ac_ext <<_ACEOF
21101/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021102#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021103#if !HAVE_DECL_TZNAME
21104extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021105#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021106
Martin v. Löwis11437992002-04-12 09:54:03 +000021107int
21108main ()
21109{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021110return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021111 ;
21112 return 0;
21113}
21114_ACEOF
21115rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021116if { (ac_try="$ac_link"
21117case "(($ac_try" in
21118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21119 *) ac_try_echo=$ac_try;;
21120esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021122 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021124 grep -v '^ *+' conftest.er1 >conftest.err
21125 rm -f conftest.er1
21126 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021128 (exit $ac_status); } && {
21129 test -z "$ac_c_werror_flag" ||
21130 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021131 } && test -s conftest$ac_exeext &&
21132 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021133 ac_cv_var_tzname=yes
21134else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021136sed 's/^/| /' conftest.$ac_ext >&5
21137
Martin v. Löwiseba40652007-08-30 20:10:57 +000021138 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021140
21141rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021142 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021143fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021144{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21145echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021146 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021147
21148cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021149#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021150_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021151
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021152 fi
21153fi
21154
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021155{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21156echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021157if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021158 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021159else
21160 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021161/* confdefs.h. */
21162_ACEOF
21163cat confdefs.h >>conftest.$ac_ext
21164cat >>conftest.$ac_ext <<_ACEOF
21165/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021166$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021167int
21168main ()
21169{
21170static struct stat ac_aggr;
21171if (ac_aggr.st_rdev)
21172return 0;
21173 ;
21174 return 0;
21175}
21176_ACEOF
21177rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021178if { (ac_try="$ac_compile"
21179case "(($ac_try" in
21180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21181 *) ac_try_echo=$ac_try;;
21182esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021184 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021186 grep -v '^ *+' conftest.er1 >conftest.err
21187 rm -f conftest.er1
21188 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021190 (exit $ac_status); } && {
21191 test -z "$ac_c_werror_flag" ||
21192 test ! -s conftest.err
21193 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021194 ac_cv_member_struct_stat_st_rdev=yes
21195else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021197sed 's/^/| /' conftest.$ac_ext >&5
21198
Martin v. Löwiseba40652007-08-30 20:10:57 +000021199 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021200/* confdefs.h. */
21201_ACEOF
21202cat confdefs.h >>conftest.$ac_ext
21203cat >>conftest.$ac_ext <<_ACEOF
21204/* end confdefs.h. */
21205$ac_includes_default
21206int
21207main ()
21208{
21209static struct stat ac_aggr;
21210if (sizeof ac_aggr.st_rdev)
21211return 0;
21212 ;
21213 return 0;
21214}
21215_ACEOF
21216rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021217if { (ac_try="$ac_compile"
21218case "(($ac_try" in
21219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21220 *) ac_try_echo=$ac_try;;
21221esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021223 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021224 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021225 grep -v '^ *+' conftest.er1 >conftest.err
21226 rm -f conftest.er1
21227 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021229 (exit $ac_status); } && {
21230 test -z "$ac_c_werror_flag" ||
21231 test ! -s conftest.err
21232 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021233 ac_cv_member_struct_stat_st_rdev=yes
21234else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021235 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021236sed 's/^/| /' conftest.$ac_ext >&5
21237
Martin v. Löwiseba40652007-08-30 20:10:57 +000021238 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021240
21241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021242fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021243
21244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021245fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021246{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21247echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21248if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021249
21250cat >>confdefs.h <<_ACEOF
21251#define HAVE_STRUCT_STAT_ST_RDEV 1
21252_ACEOF
21253
21254
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021255fi
21256
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021257{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21258echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021259if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021260 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021261else
Martin v. Löwis11437992002-04-12 09:54:03 +000021262 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021263/* confdefs.h. */
21264_ACEOF
21265cat confdefs.h >>conftest.$ac_ext
21266cat >>conftest.$ac_ext <<_ACEOF
21267/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021268$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021269int
21270main ()
21271{
21272static struct stat ac_aggr;
21273if (ac_aggr.st_blksize)
21274return 0;
21275 ;
21276 return 0;
21277}
21278_ACEOF
21279rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021280if { (ac_try="$ac_compile"
21281case "(($ac_try" in
21282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21283 *) ac_try_echo=$ac_try;;
21284esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021286 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021288 grep -v '^ *+' conftest.er1 >conftest.err
21289 rm -f conftest.er1
21290 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021292 (exit $ac_status); } && {
21293 test -z "$ac_c_werror_flag" ||
21294 test ! -s conftest.err
21295 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021296 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021297else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021298 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021299sed 's/^/| /' conftest.$ac_ext >&5
21300
Martin v. Löwiseba40652007-08-30 20:10:57 +000021301 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021302/* confdefs.h. */
21303_ACEOF
21304cat confdefs.h >>conftest.$ac_ext
21305cat >>conftest.$ac_ext <<_ACEOF
21306/* end confdefs.h. */
21307$ac_includes_default
21308int
21309main ()
21310{
21311static struct stat ac_aggr;
21312if (sizeof ac_aggr.st_blksize)
21313return 0;
21314 ;
21315 return 0;
21316}
21317_ACEOF
21318rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021319if { (ac_try="$ac_compile"
21320case "(($ac_try" in
21321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21322 *) ac_try_echo=$ac_try;;
21323esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021325 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021327 grep -v '^ *+' conftest.er1 >conftest.err
21328 rm -f conftest.er1
21329 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021331 (exit $ac_status); } && {
21332 test -z "$ac_c_werror_flag" ||
21333 test ! -s conftest.err
21334 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021335 ac_cv_member_struct_stat_st_blksize=yes
21336else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021338sed 's/^/| /' conftest.$ac_ext >&5
21339
Martin v. Löwiseba40652007-08-30 20:10:57 +000021340 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021342
21343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021344fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021345
21346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021347fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021348{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21349echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21350if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021351
Martin v. Löwis11437992002-04-12 09:54:03 +000021352cat >>confdefs.h <<_ACEOF
21353#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21354_ACEOF
21355
21356
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021357fi
21358
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021359{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21360echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021361if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021362 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021363else
21364 cat >conftest.$ac_ext <<_ACEOF
21365/* confdefs.h. */
21366_ACEOF
21367cat confdefs.h >>conftest.$ac_ext
21368cat >>conftest.$ac_ext <<_ACEOF
21369/* end confdefs.h. */
21370$ac_includes_default
21371int
21372main ()
21373{
21374static struct stat ac_aggr;
21375if (ac_aggr.st_flags)
21376return 0;
21377 ;
21378 return 0;
21379}
21380_ACEOF
21381rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021382if { (ac_try="$ac_compile"
21383case "(($ac_try" in
21384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21385 *) ac_try_echo=$ac_try;;
21386esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021388 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021389 ac_status=$?
21390 grep -v '^ *+' conftest.er1 >conftest.err
21391 rm -f conftest.er1
21392 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021394 (exit $ac_status); } && {
21395 test -z "$ac_c_werror_flag" ||
21396 test ! -s conftest.err
21397 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021398 ac_cv_member_struct_stat_st_flags=yes
21399else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021400 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021401sed 's/^/| /' conftest.$ac_ext >&5
21402
Martin v. Löwiseba40652007-08-30 20:10:57 +000021403 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021404/* confdefs.h. */
21405_ACEOF
21406cat confdefs.h >>conftest.$ac_ext
21407cat >>conftest.$ac_ext <<_ACEOF
21408/* end confdefs.h. */
21409$ac_includes_default
21410int
21411main ()
21412{
21413static struct stat ac_aggr;
21414if (sizeof ac_aggr.st_flags)
21415return 0;
21416 ;
21417 return 0;
21418}
21419_ACEOF
21420rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021421if { (ac_try="$ac_compile"
21422case "(($ac_try" in
21423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21424 *) ac_try_echo=$ac_try;;
21425esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021427 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021428 ac_status=$?
21429 grep -v '^ *+' conftest.er1 >conftest.err
21430 rm -f conftest.er1
21431 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021433 (exit $ac_status); } && {
21434 test -z "$ac_c_werror_flag" ||
21435 test ! -s conftest.err
21436 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021437 ac_cv_member_struct_stat_st_flags=yes
21438else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021439 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021440sed 's/^/| /' conftest.$ac_ext >&5
21441
Martin v. Löwiseba40652007-08-30 20:10:57 +000021442 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021443fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021444
21445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021447
21448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021449fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021450{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21451echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21452if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021453
21454cat >>confdefs.h <<_ACEOF
21455#define HAVE_STRUCT_STAT_ST_FLAGS 1
21456_ACEOF
21457
21458
21459fi
21460
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021461{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21462echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021463if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021464 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021465else
21466 cat >conftest.$ac_ext <<_ACEOF
21467/* confdefs.h. */
21468_ACEOF
21469cat confdefs.h >>conftest.$ac_ext
21470cat >>conftest.$ac_ext <<_ACEOF
21471/* end confdefs.h. */
21472$ac_includes_default
21473int
21474main ()
21475{
21476static struct stat ac_aggr;
21477if (ac_aggr.st_gen)
21478return 0;
21479 ;
21480 return 0;
21481}
21482_ACEOF
21483rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021484if { (ac_try="$ac_compile"
21485case "(($ac_try" in
21486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21487 *) ac_try_echo=$ac_try;;
21488esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021490 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021491 ac_status=$?
21492 grep -v '^ *+' conftest.er1 >conftest.err
21493 rm -f conftest.er1
21494 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021496 (exit $ac_status); } && {
21497 test -z "$ac_c_werror_flag" ||
21498 test ! -s conftest.err
21499 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021500 ac_cv_member_struct_stat_st_gen=yes
21501else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021502 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021503sed 's/^/| /' conftest.$ac_ext >&5
21504
Martin v. Löwiseba40652007-08-30 20:10:57 +000021505 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021506/* confdefs.h. */
21507_ACEOF
21508cat confdefs.h >>conftest.$ac_ext
21509cat >>conftest.$ac_ext <<_ACEOF
21510/* end confdefs.h. */
21511$ac_includes_default
21512int
21513main ()
21514{
21515static struct stat ac_aggr;
21516if (sizeof ac_aggr.st_gen)
21517return 0;
21518 ;
21519 return 0;
21520}
21521_ACEOF
21522rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021523if { (ac_try="$ac_compile"
21524case "(($ac_try" in
21525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21526 *) ac_try_echo=$ac_try;;
21527esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021529 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021530 ac_status=$?
21531 grep -v '^ *+' conftest.er1 >conftest.err
21532 rm -f conftest.er1
21533 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021535 (exit $ac_status); } && {
21536 test -z "$ac_c_werror_flag" ||
21537 test ! -s conftest.err
21538 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021539 ac_cv_member_struct_stat_st_gen=yes
21540else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021541 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021542sed 's/^/| /' conftest.$ac_ext >&5
21543
Martin v. Löwiseba40652007-08-30 20:10:57 +000021544 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021546
21547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021549
21550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021551fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021552{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21553echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21554if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021555
21556cat >>confdefs.h <<_ACEOF
21557#define HAVE_STRUCT_STAT_ST_GEN 1
21558_ACEOF
21559
21560
21561fi
21562
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021563{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21564echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021565if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021566 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021567else
21568 cat >conftest.$ac_ext <<_ACEOF
21569/* confdefs.h. */
21570_ACEOF
21571cat confdefs.h >>conftest.$ac_ext
21572cat >>conftest.$ac_ext <<_ACEOF
21573/* end confdefs.h. */
21574$ac_includes_default
21575int
21576main ()
21577{
21578static struct stat ac_aggr;
21579if (ac_aggr.st_birthtime)
21580return 0;
21581 ;
21582 return 0;
21583}
21584_ACEOF
21585rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021586if { (ac_try="$ac_compile"
21587case "(($ac_try" in
21588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21589 *) ac_try_echo=$ac_try;;
21590esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021592 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021593 ac_status=$?
21594 grep -v '^ *+' conftest.er1 >conftest.err
21595 rm -f conftest.er1
21596 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021598 (exit $ac_status); } && {
21599 test -z "$ac_c_werror_flag" ||
21600 test ! -s conftest.err
21601 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021602 ac_cv_member_struct_stat_st_birthtime=yes
21603else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021604 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021605sed 's/^/| /' conftest.$ac_ext >&5
21606
Martin v. Löwiseba40652007-08-30 20:10:57 +000021607 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021608/* confdefs.h. */
21609_ACEOF
21610cat confdefs.h >>conftest.$ac_ext
21611cat >>conftest.$ac_ext <<_ACEOF
21612/* end confdefs.h. */
21613$ac_includes_default
21614int
21615main ()
21616{
21617static struct stat ac_aggr;
21618if (sizeof ac_aggr.st_birthtime)
21619return 0;
21620 ;
21621 return 0;
21622}
21623_ACEOF
21624rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021625if { (ac_try="$ac_compile"
21626case "(($ac_try" in
21627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21628 *) ac_try_echo=$ac_try;;
21629esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021631 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021632 ac_status=$?
21633 grep -v '^ *+' conftest.er1 >conftest.err
21634 rm -f conftest.er1
21635 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021637 (exit $ac_status); } && {
21638 test -z "$ac_c_werror_flag" ||
21639 test ! -s conftest.err
21640 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021641 ac_cv_member_struct_stat_st_birthtime=yes
21642else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021643 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021644sed 's/^/| /' conftest.$ac_ext >&5
21645
Martin v. Löwiseba40652007-08-30 20:10:57 +000021646 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021647fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021648
21649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021650fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021651
21652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021653fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021654{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21655echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21656if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021657
21658cat >>confdefs.h <<_ACEOF
21659#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21660_ACEOF
21661
21662
21663fi
21664
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021665{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21666echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021667if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021668 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021669else
Martin v. Löwis11437992002-04-12 09:54:03 +000021670 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021671/* confdefs.h. */
21672_ACEOF
21673cat confdefs.h >>conftest.$ac_ext
21674cat >>conftest.$ac_ext <<_ACEOF
21675/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021676$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021677int
21678main ()
21679{
21680static struct stat ac_aggr;
21681if (ac_aggr.st_blocks)
21682return 0;
21683 ;
21684 return 0;
21685}
21686_ACEOF
21687rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021688if { (ac_try="$ac_compile"
21689case "(($ac_try" in
21690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21691 *) ac_try_echo=$ac_try;;
21692esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021694 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021695 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021696 grep -v '^ *+' conftest.er1 >conftest.err
21697 rm -f conftest.er1
21698 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021700 (exit $ac_status); } && {
21701 test -z "$ac_c_werror_flag" ||
21702 test ! -s conftest.err
21703 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021704 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021705else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021707sed 's/^/| /' conftest.$ac_ext >&5
21708
Martin v. Löwiseba40652007-08-30 20:10:57 +000021709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021710/* confdefs.h. */
21711_ACEOF
21712cat confdefs.h >>conftest.$ac_ext
21713cat >>conftest.$ac_ext <<_ACEOF
21714/* end confdefs.h. */
21715$ac_includes_default
21716int
21717main ()
21718{
21719static struct stat ac_aggr;
21720if (sizeof ac_aggr.st_blocks)
21721return 0;
21722 ;
21723 return 0;
21724}
21725_ACEOF
21726rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021727if { (ac_try="$ac_compile"
21728case "(($ac_try" in
21729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21730 *) ac_try_echo=$ac_try;;
21731esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021733 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021735 grep -v '^ *+' conftest.er1 >conftest.err
21736 rm -f conftest.er1
21737 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021739 (exit $ac_status); } && {
21740 test -z "$ac_c_werror_flag" ||
21741 test ! -s conftest.err
21742 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021743 ac_cv_member_struct_stat_st_blocks=yes
21744else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021746sed 's/^/| /' conftest.$ac_ext >&5
21747
Martin v. Löwiseba40652007-08-30 20:10:57 +000021748 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021750
21751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021753
21754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021755fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021756{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21757echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21758if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021759
Martin v. Löwis11437992002-04-12 09:54:03 +000021760cat >>confdefs.h <<_ACEOF
21761#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21762_ACEOF
21763
21764
21765cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021766#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021767_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021768
21769else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021770 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021771 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021772 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21773 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021774esac
21775
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021776fi
21777
Michael W. Hudson54241132001-12-07 15:38:26 +000021778
Martin v. Löwis11437992002-04-12 09:54:03 +000021779
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021780{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21781echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021782if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021783 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021784else
Martin v. Löwis11437992002-04-12 09:54:03 +000021785 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021786/* confdefs.h. */
21787_ACEOF
21788cat confdefs.h >>conftest.$ac_ext
21789cat >>conftest.$ac_ext <<_ACEOF
21790/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021791#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021792int
21793main ()
21794{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021795return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021796 ;
21797 return 0;
21798}
21799_ACEOF
21800rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021801if { (ac_try="$ac_compile"
21802case "(($ac_try" in
21803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21804 *) ac_try_echo=$ac_try;;
21805esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021807 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021808 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021809 grep -v '^ *+' conftest.er1 >conftest.err
21810 rm -f conftest.er1
21811 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021813 (exit $ac_status); } && {
21814 test -z "$ac_c_werror_flag" ||
21815 test ! -s conftest.err
21816 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021817 ac_cv_header_time_altzone=yes
21818else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021820sed 's/^/| /' conftest.$ac_ext >&5
21821
Martin v. Löwiseba40652007-08-30 20:10:57 +000021822 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021823fi
21824
Martin v. Löwiseba40652007-08-30 20:10:57 +000021825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21826fi
21827
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021828{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21829echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021830if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021831
21832cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021833#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021834_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021835
21836fi
21837
Guido van Rossumda88dad1995-01-26 00:46:29 +000021838was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021839{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21840echo $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 +000021841cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021842/* confdefs.h. */
21843_ACEOF
21844cat confdefs.h >>conftest.$ac_ext
21845cat >>conftest.$ac_ext <<_ACEOF
21846/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021847
21848#include <sys/types.h>
21849#include <sys/select.h>
21850#include <sys/time.h>
21851
Martin v. Löwis11437992002-04-12 09:54:03 +000021852int
21853main ()
21854{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021855;
Martin v. Löwis11437992002-04-12 09:54:03 +000021856 ;
21857 return 0;
21858}
21859_ACEOF
21860rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021861if { (ac_try="$ac_compile"
21862case "(($ac_try" in
21863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21864 *) ac_try_echo=$ac_try;;
21865esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021867 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021868 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021869 grep -v '^ *+' conftest.er1 >conftest.err
21870 rm -f conftest.er1
21871 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021873 (exit $ac_status); } && {
21874 test -z "$ac_c_werror_flag" ||
21875 test ! -s conftest.err
21876 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021877
21878
21879cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021880#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021881_ACEOF
21882
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021883 was_it_defined=yes
21884
Guido van Rossumf78abae1997-01-21 22:02:36 +000021885else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021887sed 's/^/| /' conftest.$ac_ext >&5
21888
Brett Cannon19fab762007-06-02 03:02:29 +000021889
Martin v. Löwiseba40652007-08-30 20:10:57 +000021890fi
21891
21892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021893{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21894echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021895
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021896{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21897echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021898if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021899 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021900else
Martin v. Löwis11437992002-04-12 09:54:03 +000021901 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021902/* confdefs.h. */
21903_ACEOF
21904cat confdefs.h >>conftest.$ac_ext
21905cat >>conftest.$ac_ext <<_ACEOF
21906/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021907
21908# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021909int
21910main ()
21911{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021912struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021913 ;
21914 return 0;
21915}
21916_ACEOF
21917rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021918if { (ac_try="$ac_compile"
21919case "(($ac_try" in
21920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21921 *) ac_try_echo=$ac_try;;
21922esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021924 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021925 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021926 grep -v '^ *+' conftest.er1 >conftest.err
21927 rm -f conftest.er1
21928 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021930 (exit $ac_status); } && {
21931 test -z "$ac_c_werror_flag" ||
21932 test ! -s conftest.err
21933 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021934 ac_cv_struct_addrinfo=yes
21935else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021937sed 's/^/| /' conftest.$ac_ext >&5
21938
Martin v. Löwiseba40652007-08-30 20:10:57 +000021939 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021940fi
21941
Martin v. Löwiseba40652007-08-30 20:10:57 +000021942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21943fi
21944
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021945{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21946echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021947if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021948
21949cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021950#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021951_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021952
21953fi
21954
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021955{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21956echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021957if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021958 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021959else
Martin v. Löwis11437992002-04-12 09:54:03 +000021960 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021961/* confdefs.h. */
21962_ACEOF
21963cat confdefs.h >>conftest.$ac_ext
21964cat >>conftest.$ac_ext <<_ACEOF
21965/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021966
21967# include <sys/types.h>
21968# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021969int
21970main ()
21971{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021972struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021973 ;
21974 return 0;
21975}
21976_ACEOF
21977rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021978if { (ac_try="$ac_compile"
21979case "(($ac_try" in
21980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21981 *) ac_try_echo=$ac_try;;
21982esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021984 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021986 grep -v '^ *+' conftest.er1 >conftest.err
21987 rm -f conftest.er1
21988 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021990 (exit $ac_status); } && {
21991 test -z "$ac_c_werror_flag" ||
21992 test ! -s conftest.err
21993 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021994 ac_cv_struct_sockaddr_storage=yes
21995else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021997sed 's/^/| /' conftest.$ac_ext >&5
21998
Martin v. Löwiseba40652007-08-30 20:10:57 +000021999 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022000fi
22001
Martin v. Löwiseba40652007-08-30 20:10:57 +000022002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22003fi
22004
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022005{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22006echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022007if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022008
22009cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022010#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022011_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022012
22013fi
22014
Guido van Rossum627b2d71993-12-24 10:39:16 +000022015# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022016
Michael W. Hudson54241132001-12-07 15:38:26 +000022017
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022018{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22019echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022020if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022021 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022022else
Martin v. Löwis11437992002-04-12 09:54:03 +000022023 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022024/* confdefs.h. */
22025_ACEOF
22026cat confdefs.h >>conftest.$ac_ext
22027cat >>conftest.$ac_ext <<_ACEOF
22028/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022029$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022030int
22031main ()
22032{
22033static int test_array [1 - 2 * !(((char) -1) < 0)];
22034test_array [0] = 0
22035
22036 ;
22037 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022038}
Martin v. Löwis11437992002-04-12 09:54:03 +000022039_ACEOF
22040rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022041if { (ac_try="$ac_compile"
22042case "(($ac_try" in
22043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22044 *) ac_try_echo=$ac_try;;
22045esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022047 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022049 grep -v '^ *+' conftest.er1 >conftest.err
22050 rm -f conftest.er1
22051 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022053 (exit $ac_status); } && {
22054 test -z "$ac_c_werror_flag" ||
22055 test ! -s conftest.err
22056 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022057 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022058else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022059 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022060sed 's/^/| /' conftest.$ac_ext >&5
22061
Martin v. Löwiseba40652007-08-30 20:10:57 +000022062 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022063fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022064
22065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022066fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022067{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22068echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022069if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022070 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022071#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022072_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022073
22074fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022075
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022076{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22077echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022078if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022079 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022080else
22081 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022082/* confdefs.h. */
22083_ACEOF
22084cat confdefs.h >>conftest.$ac_ext
22085cat >>conftest.$ac_ext <<_ACEOF
22086/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022087
Martin v. Löwis11437992002-04-12 09:54:03 +000022088int
22089main ()
22090{
22091/* FIXME: Include the comments suggested by Paul. */
22092#ifndef __cplusplus
22093 /* Ultrix mips cc rejects this. */
22094 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022095 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022096 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022097 char const *const *pcpcc;
22098 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022099 /* NEC SVR4.0.2 mips cc rejects this. */
22100 struct point {int x, y;};
22101 static struct point const zero = {0,0};
22102 /* AIX XL C 1.02.0.0 rejects this.
22103 It does not let you subtract one const X* pointer from another in
22104 an arm of an if-expression whose if-part is not a constant
22105 expression */
22106 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022107 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022108 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022109 ++pcpcc;
22110 ppc = (char**) pcpcc;
22111 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022112 { /* SCO 3.2v4 cc rejects this. */
22113 char *t;
22114 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022115
Martin v. Löwis11437992002-04-12 09:54:03 +000022116 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022117 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022118 }
22119 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22120 int x[] = {25, 17};
22121 const int *foo = &x[0];
22122 ++foo;
22123 }
22124 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22125 typedef const int *iptr;
22126 iptr p = 0;
22127 ++p;
22128 }
22129 { /* AIX XL C 1.02.0.0 rejects this saying
22130 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22131 struct s { int j; const int *ap[3]; };
22132 struct s *b; b->j = 5;
22133 }
22134 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22135 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022136 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022137 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022138 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022139#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022140
Martin v. Löwis11437992002-04-12 09:54:03 +000022141 ;
22142 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022143}
Martin v. Löwis11437992002-04-12 09:54:03 +000022144_ACEOF
22145rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022146if { (ac_try="$ac_compile"
22147case "(($ac_try" in
22148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22149 *) ac_try_echo=$ac_try;;
22150esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022152 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022153 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022154 grep -v '^ *+' conftest.er1 >conftest.err
22155 rm -f conftest.er1
22156 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022158 (exit $ac_status); } && {
22159 test -z "$ac_c_werror_flag" ||
22160 test ! -s conftest.err
22161 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022162 ac_cv_c_const=yes
22163else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022164 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022165sed 's/^/| /' conftest.$ac_ext >&5
22166
Martin v. Löwiseba40652007-08-30 20:10:57 +000022167 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022169
22170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022171fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022172{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22173echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022174if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022175
22176cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022177#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022178_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022179
22180fi
22181
Michael W. Hudson54241132001-12-07 15:38:26 +000022182
Guido van Rossumda88dad1995-01-26 00:46:29 +000022183works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022184{ echo "$as_me:$LINENO: checking for working volatile" >&5
22185echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022186cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022187/* confdefs.h. */
22188_ACEOF
22189cat confdefs.h >>conftest.$ac_ext
22190cat >>conftest.$ac_ext <<_ACEOF
22191/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022192
Martin v. Löwis11437992002-04-12 09:54:03 +000022193int
22194main ()
22195{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022196volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022197 ;
22198 return 0;
22199}
22200_ACEOF
22201rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022202if { (ac_try="$ac_compile"
22203case "(($ac_try" in
22204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22205 *) ac_try_echo=$ac_try;;
22206esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022208 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022210 grep -v '^ *+' conftest.er1 >conftest.err
22211 rm -f conftest.er1
22212 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022214 (exit $ac_status); } && {
22215 test -z "$ac_c_werror_flag" ||
22216 test ! -s conftest.err
22217 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022218 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022219else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022221sed 's/^/| /' conftest.$ac_ext >&5
22222
Martin v. Löwis11437992002-04-12 09:54:03 +000022223
22224cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022225#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022226_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022227
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022228
Guido van Rossum627b2d71993-12-24 10:39:16 +000022229fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022230
22231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022232{ echo "$as_me:$LINENO: result: $works" >&5
22233echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022234
Guido van Rossumda88dad1995-01-26 00:46:29 +000022235works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022236{ echo "$as_me:$LINENO: checking for working signed char" >&5
22237echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022238cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022239/* confdefs.h. */
22240_ACEOF
22241cat confdefs.h >>conftest.$ac_ext
22242cat >>conftest.$ac_ext <<_ACEOF
22243/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022244
Martin v. Löwis11437992002-04-12 09:54:03 +000022245int
22246main ()
22247{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022248signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022249 ;
22250 return 0;
22251}
22252_ACEOF
22253rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022254if { (ac_try="$ac_compile"
22255case "(($ac_try" in
22256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22257 *) ac_try_echo=$ac_try;;
22258esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022260 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022261 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022262 grep -v '^ *+' conftest.er1 >conftest.err
22263 rm -f conftest.er1
22264 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022266 (exit $ac_status); } && {
22267 test -z "$ac_c_werror_flag" ||
22268 test ! -s conftest.err
22269 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022270 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022271else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022273sed 's/^/| /' conftest.$ac_ext >&5
22274
Martin v. Löwis11437992002-04-12 09:54:03 +000022275
22276cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022277#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022278_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022279
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022280
Guido van Rossum7f43da71994-08-01 12:15:30 +000022281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022282
22283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022284{ echo "$as_me:$LINENO: result: $works" >&5
22285echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022286
Guido van Rossumda88dad1995-01-26 00:46:29 +000022287have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022288{ echo "$as_me:$LINENO: checking for prototypes" >&5
22289echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022290cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022291/* confdefs.h. */
22292_ACEOF
22293cat confdefs.h >>conftest.$ac_ext
22294cat >>conftest.$ac_ext <<_ACEOF
22295/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022296int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022297int
22298main ()
22299{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022300return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022301 ;
22302 return 0;
22303}
22304_ACEOF
22305rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022306if { (ac_try="$ac_compile"
22307case "(($ac_try" in
22308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22309 *) ac_try_echo=$ac_try;;
22310esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022312 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022314 grep -v '^ *+' conftest.er1 >conftest.err
22315 rm -f conftest.er1
22316 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022318 (exit $ac_status); } && {
22319 test -z "$ac_c_werror_flag" ||
22320 test ! -s conftest.err
22321 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022322
22323
22324cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022325#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022326_ACEOF
22327
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022328 have_prototypes=yes
22329
Guido van Rossumf78abae1997-01-21 22:02:36 +000022330else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022332sed 's/^/| /' conftest.$ac_ext >&5
22333
Martin v. Löwiseba40652007-08-30 20:10:57 +000022334
Guido van Rossum7f43da71994-08-01 12:15:30 +000022335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022336
22337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022338{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22339echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022340
Guido van Rossumda88dad1995-01-26 00:46:29 +000022341works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022342{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22343echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022344cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022345/* confdefs.h. */
22346_ACEOF
22347cat confdefs.h >>conftest.$ac_ext
22348cat >>conftest.$ac_ext <<_ACEOF
22349/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022350
22351#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022352int foo(int x, ...) {
22353 va_list va;
22354 va_start(va, x);
22355 va_arg(va, int);
22356 va_arg(va, char *);
22357 va_arg(va, double);
22358 return 0;
22359}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022360
Martin v. Löwis11437992002-04-12 09:54:03 +000022361int
22362main ()
22363{
Guido van Rossum90eea071996-08-30 20:58:57 +000022364return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022365 ;
22366 return 0;
22367}
22368_ACEOF
22369rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022370if { (ac_try="$ac_compile"
22371case "(($ac_try" in
22372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22373 *) ac_try_echo=$ac_try;;
22374esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022376 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022377 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022378 grep -v '^ *+' conftest.er1 >conftest.err
22379 rm -f conftest.er1
22380 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022382 (exit $ac_status); } && {
22383 test -z "$ac_c_werror_flag" ||
22384 test ! -s conftest.err
22385 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022386
22387
22388cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022389#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022390_ACEOF
22391
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022392 works=yes
22393
Guido van Rossumf78abae1997-01-21 22:02:36 +000022394else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022395 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022396sed 's/^/| /' conftest.$ac_ext >&5
22397
Martin v. Löwiseba40652007-08-30 20:10:57 +000022398
Guido van Rossum627b2d71993-12-24 10:39:16 +000022399fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022400
22401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022402{ echo "$as_me:$LINENO: result: $works" >&5
22403echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022404
Martin v. Löwisd6320502004-08-12 13:45:08 +000022405# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022406{ echo "$as_me:$LINENO: checking for socketpair" >&5
22407echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022408cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022409/* confdefs.h. */
22410_ACEOF
22411cat confdefs.h >>conftest.$ac_ext
22412cat >>conftest.$ac_ext <<_ACEOF
22413/* end confdefs.h. */
22414
22415#include <sys/types.h>
22416#include <sys/socket.h>
22417
22418int
22419main ()
22420{
22421void *x=socketpair
22422 ;
22423 return 0;
22424}
22425_ACEOF
22426rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022427if { (ac_try="$ac_compile"
22428case "(($ac_try" in
22429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22430 *) ac_try_echo=$ac_try;;
22431esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022433 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022434 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022435 grep -v '^ *+' conftest.er1 >conftest.err
22436 rm -f conftest.er1
22437 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022439 (exit $ac_status); } && {
22440 test -z "$ac_c_werror_flag" ||
22441 test ! -s conftest.err
22442 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022443
22444cat >>confdefs.h <<\_ACEOF
22445#define HAVE_SOCKETPAIR 1
22446_ACEOF
22447
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022448 { echo "$as_me:$LINENO: result: yes" >&5
22449echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022450else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022451 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022452sed 's/^/| /' conftest.$ac_ext >&5
22453
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022454 { echo "$as_me:$LINENO: result: no" >&5
22455echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022456
22457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022458
22459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022460
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022461# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022462{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22463echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022464cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022465/* confdefs.h. */
22466_ACEOF
22467cat confdefs.h >>conftest.$ac_ext
22468cat >>conftest.$ac_ext <<_ACEOF
22469/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022470#include <sys/types.h>
22471#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022472int
22473main ()
22474{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022475struct sockaddr x;
22476x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022477 ;
22478 return 0;
22479}
22480_ACEOF
22481rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022482if { (ac_try="$ac_compile"
22483case "(($ac_try" in
22484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22485 *) ac_try_echo=$ac_try;;
22486esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022488 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022490 grep -v '^ *+' conftest.er1 >conftest.err
22491 rm -f conftest.er1
22492 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022494 (exit $ac_status); } && {
22495 test -z "$ac_c_werror_flag" ||
22496 test ! -s conftest.err
22497 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022498 { echo "$as_me:$LINENO: result: yes" >&5
22499echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022500
22501cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022502#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022503_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022504
22505else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022506 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022507sed 's/^/| /' conftest.$ac_ext >&5
22508
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022509 { echo "$as_me:$LINENO: result: no" >&5
22510echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022512
22513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022514
Guido van Rossumda88dad1995-01-26 00:46:29 +000022515va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022516{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22517echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022518cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022519/* confdefs.h. */
22520_ACEOF
22521cat confdefs.h >>conftest.$ac_ext
22522cat >>conftest.$ac_ext <<_ACEOF
22523/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022524
22525#ifdef HAVE_STDARG_PROTOTYPES
22526#include <stdarg.h>
22527#else
22528#include <varargs.h>
22529#endif
22530
Martin v. Löwis11437992002-04-12 09:54:03 +000022531int
22532main ()
22533{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022534va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022535 ;
22536 return 0;
22537}
22538_ACEOF
22539rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022540if { (ac_try="$ac_compile"
22541case "(($ac_try" in
22542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22543 *) ac_try_echo=$ac_try;;
22544esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022546 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022548 grep -v '^ *+' conftest.er1 >conftest.err
22549 rm -f conftest.er1
22550 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022552 (exit $ac_status); } && {
22553 test -z "$ac_c_werror_flag" ||
22554 test ! -s conftest.err
22555 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022556 :
22557else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022559sed 's/^/| /' conftest.$ac_ext >&5
22560
Martin v. Löwis11437992002-04-12 09:54:03 +000022561
22562
22563cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022564#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022565_ACEOF
22566
Guido van Rossumda88dad1995-01-26 00:46:29 +000022567 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022568
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022570
22571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022572{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22573echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022574
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022575# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022576
22577
22578
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022579{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22580echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022581if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022582 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022583else
Martin v. Löwis11437992002-04-12 09:54:03 +000022584 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022585/* confdefs.h. */
22586_ACEOF
22587cat confdefs.h >>conftest.$ac_ext
22588cat >>conftest.$ac_ext <<_ACEOF
22589/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022590/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22591 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22592#define gethostbyname_r innocuous_gethostbyname_r
22593
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022594/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022595 which can conflict with char gethostbyname_r (); below.
22596 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022597 <limits.h> exists even on freestanding compilers. */
22598
22599#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022600# include <limits.h>
22601#else
22602# include <assert.h>
22603#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022604
22605#undef gethostbyname_r
22606
Martin v. Löwiseba40652007-08-30 20:10:57 +000022607/* Override any GCC internal prototype to avoid an error.
22608 Use char because int might match the return type of a GCC
22609 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022610#ifdef __cplusplus
22611extern "C"
22612#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022613char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022614/* The GNU C library defines this for functions which it implements
22615 to always fail with ENOSYS. Some functions are actually named
22616 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022617#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022618choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022619#endif
22620
Skip Montanaro6dead952003-09-25 14:50:04 +000022621int
22622main ()
22623{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022624return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022625 ;
22626 return 0;
22627}
22628_ACEOF
22629rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022630if { (ac_try="$ac_link"
22631case "(($ac_try" in
22632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22633 *) ac_try_echo=$ac_try;;
22634esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022636 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022637 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022638 grep -v '^ *+' conftest.er1 >conftest.err
22639 rm -f conftest.er1
22640 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022642 (exit $ac_status); } && {
22643 test -z "$ac_c_werror_flag" ||
22644 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022645 } && test -s conftest$ac_exeext &&
22646 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022647 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022648else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022649 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022650sed 's/^/| /' conftest.$ac_ext >&5
22651
Martin v. Löwiseba40652007-08-30 20:10:57 +000022652 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022653fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022654
22655rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022656 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022657fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022658{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22659echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22660if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022661
Martin v. Löwis11437992002-04-12 09:54:03 +000022662 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022663#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022664_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022665
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022666 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22667echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022668 OLD_CFLAGS=$CFLAGS
22669 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022670 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022671/* confdefs.h. */
22672_ACEOF
22673cat confdefs.h >>conftest.$ac_ext
22674cat >>conftest.$ac_ext <<_ACEOF
22675/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022676
22677# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022678
Martin v. Löwis11437992002-04-12 09:54:03 +000022679int
22680main ()
22681{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022682
22683 char *name;
22684 struct hostent *he, *res;
22685 char buffer[2048];
22686 int buflen = 2048;
22687 int h_errnop;
22688
22689 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022690
22691 ;
22692 return 0;
22693}
22694_ACEOF
22695rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022696if { (ac_try="$ac_compile"
22697case "(($ac_try" in
22698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22699 *) ac_try_echo=$ac_try;;
22700esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022702 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022703 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022704 grep -v '^ *+' conftest.er1 >conftest.err
22705 rm -f conftest.er1
22706 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022708 (exit $ac_status); } && {
22709 test -z "$ac_c_werror_flag" ||
22710 test ! -s conftest.err
22711 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022712
22713 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022714#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022715_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022716
Martin v. Löwis11437992002-04-12 09:54:03 +000022717
22718cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022719#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022720_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022721
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022722 { echo "$as_me:$LINENO: result: yes" >&5
22723echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022724
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022725else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022727sed 's/^/| /' conftest.$ac_ext >&5
22728
Martin v. Löwis11437992002-04-12 09:54:03 +000022729
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022730 { echo "$as_me:$LINENO: result: no" >&5
22731echo "${ECHO_T}no" >&6; }
22732 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22733echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022734 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022735/* confdefs.h. */
22736_ACEOF
22737cat confdefs.h >>conftest.$ac_ext
22738cat >>conftest.$ac_ext <<_ACEOF
22739/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022740
22741# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022742
Martin v. Löwis11437992002-04-12 09:54:03 +000022743int
22744main ()
22745{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022746
22747 char *name;
22748 struct hostent *he;
22749 char buffer[2048];
22750 int buflen = 2048;
22751 int h_errnop;
22752
22753 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022754
22755 ;
22756 return 0;
22757}
22758_ACEOF
22759rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022760if { (ac_try="$ac_compile"
22761case "(($ac_try" in
22762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22763 *) ac_try_echo=$ac_try;;
22764esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022766 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022767 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022768 grep -v '^ *+' conftest.er1 >conftest.err
22769 rm -f conftest.er1
22770 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022772 (exit $ac_status); } && {
22773 test -z "$ac_c_werror_flag" ||
22774 test ! -s conftest.err
22775 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022776
22777 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022778#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022779_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022780
Martin v. Löwis11437992002-04-12 09:54:03 +000022781
22782cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022783#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022784_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022785
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022786 { echo "$as_me:$LINENO: result: yes" >&5
22787echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022788
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022789else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022791sed 's/^/| /' conftest.$ac_ext >&5
22792
Martin v. Löwis11437992002-04-12 09:54:03 +000022793
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022794 { echo "$as_me:$LINENO: result: no" >&5
22795echo "${ECHO_T}no" >&6; }
22796 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22797echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022798 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022799/* confdefs.h. */
22800_ACEOF
22801cat confdefs.h >>conftest.$ac_ext
22802cat >>conftest.$ac_ext <<_ACEOF
22803/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022804
22805# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022806
Martin v. Löwis11437992002-04-12 09:54:03 +000022807int
22808main ()
22809{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022810
22811 char *name;
22812 struct hostent *he;
22813 struct hostent_data data;
22814
22815 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022816
22817 ;
22818 return 0;
22819}
22820_ACEOF
22821rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022822if { (ac_try="$ac_compile"
22823case "(($ac_try" in
22824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22825 *) ac_try_echo=$ac_try;;
22826esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022828 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022830 grep -v '^ *+' conftest.er1 >conftest.err
22831 rm -f conftest.er1
22832 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022834 (exit $ac_status); } && {
22835 test -z "$ac_c_werror_flag" ||
22836 test ! -s conftest.err
22837 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022838
22839 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022840#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022841_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022842
Martin v. Löwis11437992002-04-12 09:54:03 +000022843
22844cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022845#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022846_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022847
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022848 { echo "$as_me:$LINENO: result: yes" >&5
22849echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022850
Guido van Rossuma96f0ba1999-03-22 21:49:51 +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öwis11437992002-04-12 09:54:03 +000022855
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022856 { echo "$as_me:$LINENO: result: no" >&5
22857echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022858
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022860
22861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022862
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022864
22865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022866
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022867fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022868
22869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022870 CFLAGS=$OLD_CFLAGS
22871
22872else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022873
Martin v. Löwis11437992002-04-12 09:54:03 +000022874
22875for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022876do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022877as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22878{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22879echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022880if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022881 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022882else
Martin v. Löwis11437992002-04-12 09:54:03 +000022883 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022884/* confdefs.h. */
22885_ACEOF
22886cat confdefs.h >>conftest.$ac_ext
22887cat >>conftest.$ac_ext <<_ACEOF
22888/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022889/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22890 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22891#define $ac_func innocuous_$ac_func
22892
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022893/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022894 which can conflict with char $ac_func (); below.
22895 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022896 <limits.h> exists even on freestanding compilers. */
22897
22898#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022899# include <limits.h>
22900#else
22901# include <assert.h>
22902#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022903
22904#undef $ac_func
22905
Martin v. Löwiseba40652007-08-30 20:10:57 +000022906/* Override any GCC internal prototype to avoid an error.
22907 Use char because int might match the return type of a GCC
22908 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022909#ifdef __cplusplus
22910extern "C"
22911#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022912char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022913/* The GNU C library defines this for functions which it implements
22914 to always fail with ENOSYS. Some functions are actually named
22915 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022916#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022917choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022918#endif
22919
Skip Montanaro6dead952003-09-25 14:50:04 +000022920int
22921main ()
22922{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022923return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022924 ;
22925 return 0;
22926}
22927_ACEOF
22928rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022929if { (ac_try="$ac_link"
22930case "(($ac_try" in
22931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22932 *) ac_try_echo=$ac_try;;
22933esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022935 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022937 grep -v '^ *+' conftest.er1 >conftest.err
22938 rm -f conftest.er1
22939 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022941 (exit $ac_status); } && {
22942 test -z "$ac_c_werror_flag" ||
22943 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022944 } && test -s conftest$ac_exeext &&
22945 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022946 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022947else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022948 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022949sed 's/^/| /' conftest.$ac_ext >&5
22950
Martin v. Löwiseba40652007-08-30 20:10:57 +000022951 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022952fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022953
22954rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022955 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022956fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022957ac_res=`eval echo '${'$as_ac_var'}'`
22958 { echo "$as_me:$LINENO: result: $ac_res" >&5
22959echo "${ECHO_T}$ac_res" >&6; }
22960if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022961 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022962#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022963_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022964
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022965fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022966done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022967
Michael W. Hudson54241132001-12-07 15:38:26 +000022968
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022969fi
22970
Michael W. Hudson54241132001-12-07 15:38:26 +000022971
22972
22973
22974
22975
22976
Guido van Rossum627b2d71993-12-24 10:39:16 +000022977# checks for system services
22978# (none yet)
22979
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022980# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022981{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22982echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022983if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022984 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022985else
Martin v. Löwis11437992002-04-12 09:54:03 +000022986 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022987/* confdefs.h. */
22988_ACEOF
22989cat confdefs.h >>conftest.$ac_ext
22990cat >>conftest.$ac_ext <<_ACEOF
22991/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022992/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22993 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22994#define __fpu_control innocuous___fpu_control
22995
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022996/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022997 which can conflict with char __fpu_control (); below.
22998 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022999 <limits.h> exists even on freestanding compilers. */
23000
23001#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023002# include <limits.h>
23003#else
23004# include <assert.h>
23005#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023006
23007#undef __fpu_control
23008
Martin v. Löwiseba40652007-08-30 20:10:57 +000023009/* Override any GCC internal prototype to avoid an error.
23010 Use char because int might match the return type of a GCC
23011 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023012#ifdef __cplusplus
23013extern "C"
23014#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023015char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023016/* The GNU C library defines this for functions which it implements
23017 to always fail with ENOSYS. Some functions are actually named
23018 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023019#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023020choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023021#endif
23022
Skip Montanaro6dead952003-09-25 14:50:04 +000023023int
23024main ()
23025{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023026return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023027 ;
23028 return 0;
23029}
23030_ACEOF
23031rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023032if { (ac_try="$ac_link"
23033case "(($ac_try" in
23034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23035 *) ac_try_echo=$ac_try;;
23036esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023038 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023040 grep -v '^ *+' conftest.er1 >conftest.err
23041 rm -f conftest.er1
23042 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023044 (exit $ac_status); } && {
23045 test -z "$ac_c_werror_flag" ||
23046 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023047 } && test -s conftest$ac_exeext &&
23048 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023049 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023050else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023051 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023052sed 's/^/| /' conftest.$ac_ext >&5
23053
Martin v. Löwiseba40652007-08-30 20:10:57 +000023054 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023055fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023056
23057rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023058 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023059fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023060{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23061echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23062if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023063 :
23064else
Martin v. Löwis11437992002-04-12 09:54:03 +000023065
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023066{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23067echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023068if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023069 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023070else
Martin v. Löwis11437992002-04-12 09:54:03 +000023071 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023072LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023073cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023074/* confdefs.h. */
23075_ACEOF
23076cat confdefs.h >>conftest.$ac_ext
23077cat >>conftest.$ac_ext <<_ACEOF
23078/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023079
Martin v. Löwiseba40652007-08-30 20:10:57 +000023080/* Override any GCC internal prototype to avoid an error.
23081 Use char because int might match the return type of a GCC
23082 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023083#ifdef __cplusplus
23084extern "C"
23085#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023086char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023087int
23088main ()
23089{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023090return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023091 ;
23092 return 0;
23093}
23094_ACEOF
23095rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023096if { (ac_try="$ac_link"
23097case "(($ac_try" in
23098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23099 *) ac_try_echo=$ac_try;;
23100esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023102 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023103 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023104 grep -v '^ *+' conftest.er1 >conftest.err
23105 rm -f conftest.er1
23106 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023108 (exit $ac_status); } && {
23109 test -z "$ac_c_werror_flag" ||
23110 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023111 } && test -s conftest$ac_exeext &&
23112 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023113 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023114else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023115 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023116sed 's/^/| /' conftest.$ac_ext >&5
23117
Martin v. Löwiseba40652007-08-30 20:10:57 +000023118 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023120
23121rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023122 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023123LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023124fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023125{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23126echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23127if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023128 cat >>confdefs.h <<_ACEOF
23129#define HAVE_LIBIEEE 1
23130_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023131
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023132 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023133
Guido van Rossum627b2d71993-12-24 10:39:16 +000023134fi
23135
Michael W. Hudson54241132001-12-07 15:38:26 +000023136
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023137fi
23138
Michael W. Hudson54241132001-12-07 15:38:26 +000023139
Guido van Rossum7f253911997-05-09 02:42:48 +000023140# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023141{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23142echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023143
Martin v. Löwiseba40652007-08-30 20:10:57 +000023144# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023145if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023146 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023147if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023148then
23149
23150cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023151#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023152_ACEOF
23153
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023154 { echo "$as_me:$LINENO: result: yes" >&5
23155echo "${ECHO_T}yes" >&6; }
23156else { echo "$as_me:$LINENO: result: no" >&5
23157echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023158fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023159else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023160 { echo "$as_me:$LINENO: result: no" >&5
23161echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023162fi
23163
Guido van Rossum7f253911997-05-09 02:42:48 +000023164
Guido van Rossum7f43da71994-08-01 12:15:30 +000023165# check for --with-libm=...
23166
Guido van Rossum563e7081996-09-10 18:20:48 +000023167case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023168Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023169BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023170*) LIBM=-lm
23171esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023172{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23173echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023174
Martin v. Löwiseba40652007-08-30 20:10:57 +000023175# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023176if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023177 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023178if test "$withval" = no
23179then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023180 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23181echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023182elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023183then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023184 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23185echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23186else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23187echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023188 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023189fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023190else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023191 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23192echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023193fi
23194
Guido van Rossum7f43da71994-08-01 12:15:30 +000023195
23196# check for --with-libc=...
23197
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023198{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23199echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023200
Martin v. Löwiseba40652007-08-30 20:10:57 +000023201# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023202if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023203 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023204if test "$withval" = no
23205then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023206 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23207echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023208elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023209then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023210 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23211echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23212else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23213echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023214 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023215fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023216else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023217 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23218echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023219fi
23220
Guido van Rossum7f43da71994-08-01 12:15:30 +000023221
Christian Heimes0a8143f2007-12-18 23:22:54 +000023222# ************************************
23223# * Check for mathematical functions *
23224# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023225
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023226LIBS_SAVE=$LIBS
23227LIBS="$LIBS $LIBM"
23228
Mark Dickinson04b27232009-01-04 12:29:36 +000023229# Detect whether system arithmetic is subject to x87-style double
23230# rounding issues. The result of this test has little meaning on non
23231# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23232# mode is round-to-nearest and double rounding issues are present, and
23233# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023234{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23235echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000023236if test "${ac_cv_x87_double_rounding+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023237 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson04b27232009-01-04 12:29:36 +000023238else
23239
23240if test "$cross_compiling" = yes; then
23241 ac_cv_x87_double_rounding=no
23242else
23243 cat >conftest.$ac_ext <<_ACEOF
23244/* confdefs.h. */
23245_ACEOF
23246cat confdefs.h >>conftest.$ac_ext
23247cat >>conftest.$ac_ext <<_ACEOF
23248/* end confdefs.h. */
23249
23250#include <stdlib.h>
23251#include <math.h>
23252int main() {
23253 volatile double x, y, z;
23254 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23255 x = 0.99999999999999989; /* 1-2**-53 */
23256 y = 1./x;
23257 if (y != 1.)
23258 exit(0);
23259 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23260 x = 1e16;
23261 y = 2.99999;
23262 z = x + y;
23263 if (z != 1e16+4.)
23264 exit(0);
23265 /* both tests show evidence of double rounding */
23266 exit(1);
23267}
23268
23269_ACEOF
23270rm -f conftest$ac_exeext
23271if { (ac_try="$ac_link"
23272case "(($ac_try" in
23273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23274 *) ac_try_echo=$ac_try;;
23275esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023277 (eval "$ac_link") 2>&5
23278 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023280 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23281 { (case "(($ac_try" in
23282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23283 *) ac_try_echo=$ac_try;;
23284esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023286 (eval "$ac_try") 2>&5
23287 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023289 (exit $ac_status); }; }; then
23290 ac_cv_x87_double_rounding=no
23291else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023292 echo "$as_me: program exited with status $ac_status" >&5
23293echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023294sed 's/^/| /' conftest.$ac_ext >&5
23295
23296( exit $ac_status )
23297ac_cv_x87_double_rounding=yes
23298fi
23299rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23300fi
23301
23302
23303fi
23304
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023305{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23306echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000023307if test "$ac_cv_x87_double_rounding" = yes
23308then
23309
23310cat >>confdefs.h <<\_ACEOF
23311#define X87_DOUBLE_ROUNDING 1
23312_ACEOF
23313
23314fi
23315
Jesse Noller355b1262009-04-02 00:03:28 +000023316# Multiprocessing check for broken sem_getvalue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023317{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23318echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023319if test "${ac_cv_broken_sem_getvalue+set}" = set; then
23320 echo $ECHO_N "(cached) $ECHO_C" >&6
23321else
23322 if test "$cross_compiling" = yes; then
23323 ac_cv_broken_sem_getvalue=yes
Jesse Noller355b1262009-04-02 00:03:28 +000023324else
23325 cat >conftest.$ac_ext <<_ACEOF
23326/* confdefs.h. */
23327_ACEOF
23328cat confdefs.h >>conftest.$ac_ext
23329cat >>conftest.$ac_ext <<_ACEOF
23330/* end confdefs.h. */
23331
23332#include <unistd.h>
23333#include <fcntl.h>
23334#include <stdio.h>
23335#include <semaphore.h>
23336#include <sys/stat.h>
23337
23338int main(void){
23339 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23340 int count;
23341 int res;
23342 if(a==SEM_FAILED){
23343 perror("sem_open");
23344 return 1;
23345
23346 }
23347 res = sem_getvalue(a, &count);
23348 sem_close(a);
23349 return res==-1 ? 1 : 0;
23350}
23351
Jesse Noller355b1262009-04-02 00:03:28 +000023352_ACEOF
23353rm -f conftest$ac_exeext
23354if { (ac_try="$ac_link"
23355case "(($ac_try" in
23356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23357 *) ac_try_echo=$ac_try;;
23358esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023360 (eval "$ac_link") 2>&5
23361 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023363 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23364 { (case "(($ac_try" in
23365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23366 *) ac_try_echo=$ac_try;;
23367esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023369 (eval "$ac_try") 2>&5
23370 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023372 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023373 ac_cv_broken_sem_getvalue=no
Jesse Noller355b1262009-04-02 00:03:28 +000023374else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023375 echo "$as_me: program exited with status $ac_status" >&5
23376echo "$as_me: failed program was:" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023377sed 's/^/| /' conftest.$ac_ext >&5
23378
23379( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023380ac_cv_broken_sem_getvalue=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000023381fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023382rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23383fi
23384
23385
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000023386
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023387fi
23388
23389{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23390echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
23391if test $ac_cv_broken_sem_getvalue = yes
23392then
23393
23394cat >>confdefs.h <<\_ACEOF
23395#define HAVE_BROKEN_SEM_GETVALUE 1
23396_ACEOF
23397
23398fi
23399
Mark Dickinson265d7382008-04-21 22:32:24 +000023400# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23401# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023402{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23403echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000023404if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023405 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000023406else
23407
23408if test "$cross_compiling" = yes; then
23409 ac_cv_tanh_preserves_zero_sign=no
23410else
23411 cat >conftest.$ac_ext <<_ACEOF
23412/* confdefs.h. */
23413_ACEOF
23414cat confdefs.h >>conftest.$ac_ext
23415cat >>conftest.$ac_ext <<_ACEOF
23416/* end confdefs.h. */
23417
23418#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023419#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000023420int main() {
23421 /* return 0 if either negative zeros don't exist
23422 on this platform or if negative zeros exist
23423 and tanh(-0.) == -0. */
23424 if (atan2(0., -1.) == atan2(-0., -1.) ||
23425 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23426 else exit(1);
23427}
23428
23429_ACEOF
23430rm -f conftest$ac_exeext
23431if { (ac_try="$ac_link"
23432case "(($ac_try" in
23433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23434 *) ac_try_echo=$ac_try;;
23435esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023437 (eval "$ac_link") 2>&5
23438 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023440 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23441 { (case "(($ac_try" in
23442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23443 *) ac_try_echo=$ac_try;;
23444esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023446 (eval "$ac_try") 2>&5
23447 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023449 (exit $ac_status); }; }; then
23450 ac_cv_tanh_preserves_zero_sign=yes
23451else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023452 echo "$as_me: program exited with status $ac_status" >&5
23453echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023454sed 's/^/| /' conftest.$ac_ext >&5
23455
23456( exit $ac_status )
23457ac_cv_tanh_preserves_zero_sign=no
23458fi
23459rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23460fi
23461
23462
23463fi
23464
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023465{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23466echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000023467if test "$ac_cv_tanh_preserves_zero_sign" = yes
23468then
23469
23470cat >>confdefs.h <<\_ACEOF
23471#define TANH_PRESERVES_ZERO_SIGN 1
23472_ACEOF
23473
23474fi
23475
Martin v. Löwis11437992002-04-12 09:54:03 +000023476
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023477
Michael W. Hudson54241132001-12-07 15:38:26 +000023478
Christian Heimes0a8143f2007-12-18 23:22:54 +000023479
23480
23481
23482
23483
Mark Dickinson8e5446f2009-04-18 14:41:37 +000023484
Mark Dickinson65898e02009-09-05 10:27:00 +000023485for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23486do
23487as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23488{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23489echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23490if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
23491 echo $ECHO_N "(cached) $ECHO_C" >&6
23492else
23493 cat >conftest.$ac_ext <<_ACEOF
23494/* confdefs.h. */
23495_ACEOF
23496cat confdefs.h >>conftest.$ac_ext
23497cat >>conftest.$ac_ext <<_ACEOF
23498/* end confdefs.h. */
23499/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23500 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23501#define $ac_func innocuous_$ac_func
23502
23503/* System header to define __stub macros and hopefully few prototypes,
23504 which can conflict with char $ac_func (); below.
23505 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23506 <limits.h> exists even on freestanding compilers. */
23507
23508#ifdef __STDC__
23509# include <limits.h>
23510#else
23511# include <assert.h>
23512#endif
23513
23514#undef $ac_func
23515
23516/* Override any GCC internal prototype to avoid an error.
23517 Use char because int might match the return type of a GCC
23518 builtin and then its argument prototype would still apply. */
23519#ifdef __cplusplus
23520extern "C"
23521#endif
23522char $ac_func ();
23523/* The GNU C library defines this for functions which it implements
23524 to always fail with ENOSYS. Some functions are actually named
23525 something starting with __ and the normal name is an alias. */
23526#if defined __stub_$ac_func || defined __stub___$ac_func
23527choke me
23528#endif
23529
23530int
23531main ()
23532{
23533return $ac_func ();
23534 ;
23535 return 0;
23536}
23537_ACEOF
23538rm -f conftest.$ac_objext conftest$ac_exeext
23539if { (ac_try="$ac_link"
23540case "(($ac_try" in
23541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23542 *) ac_try_echo=$ac_try;;
23543esac
23544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23545 (eval "$ac_link") 2>conftest.er1
23546 ac_status=$?
23547 grep -v '^ *+' conftest.er1 >conftest.err
23548 rm -f conftest.er1
23549 cat conftest.err >&5
23550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23551 (exit $ac_status); } && {
23552 test -z "$ac_c_werror_flag" ||
23553 test ! -s conftest.err
23554 } && test -s conftest$ac_exeext &&
23555 $as_test_x conftest$ac_exeext; then
23556 eval "$as_ac_var=yes"
23557else
23558 echo "$as_me: failed program was:" >&5
23559sed 's/^/| /' conftest.$ac_ext >&5
23560
23561 eval "$as_ac_var=no"
23562fi
23563
23564rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23565 conftest$ac_exeext conftest.$ac_ext
23566fi
23567ac_res=`eval echo '${'$as_ac_var'}'`
23568 { echo "$as_me:$LINENO: result: $ac_res" >&5
23569echo "${ECHO_T}$ac_res" >&6; }
23570if test `eval echo '${'$as_ac_var'}'` = yes; then
23571 cat >>confdefs.h <<_ACEOF
23572#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23573_ACEOF
23574
23575fi
23576done
23577
23578
23579
23580
23581
23582
23583for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000023584do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023585as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23586{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23587echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000023588if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023589 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000023590else
23591 cat >conftest.$ac_ext <<_ACEOF
23592/* confdefs.h. */
23593_ACEOF
23594cat confdefs.h >>conftest.$ac_ext
23595cat >>conftest.$ac_ext <<_ACEOF
23596/* end confdefs.h. */
23597/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23598 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23599#define $ac_func innocuous_$ac_func
23600
23601/* System header to define __stub macros and hopefully few prototypes,
23602 which can conflict with char $ac_func (); below.
23603 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23604 <limits.h> exists even on freestanding compilers. */
23605
23606#ifdef __STDC__
23607# include <limits.h>
23608#else
23609# include <assert.h>
23610#endif
23611
23612#undef $ac_func
23613
23614/* Override any GCC internal prototype to avoid an error.
23615 Use char because int might match the return type of a GCC
23616 builtin and then its argument prototype would still apply. */
23617#ifdef __cplusplus
23618extern "C"
23619#endif
23620char $ac_func ();
23621/* The GNU C library defines this for functions which it implements
23622 to always fail with ENOSYS. Some functions are actually named
23623 something starting with __ and the normal name is an alias. */
23624#if defined __stub_$ac_func || defined __stub___$ac_func
23625choke me
23626#endif
23627
23628int
23629main ()
23630{
23631return $ac_func ();
23632 ;
23633 return 0;
23634}
23635_ACEOF
23636rm -f conftest.$ac_objext conftest$ac_exeext
23637if { (ac_try="$ac_link"
23638case "(($ac_try" in
23639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23640 *) ac_try_echo=$ac_try;;
23641esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000023643 (eval "$ac_link") 2>conftest.er1
23644 ac_status=$?
23645 grep -v '^ *+' conftest.er1 >conftest.err
23646 rm -f conftest.er1
23647 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000023649 (exit $ac_status); } && {
23650 test -z "$ac_c_werror_flag" ||
23651 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023652 } && test -s conftest$ac_exeext &&
23653 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000023654 eval "$as_ac_var=yes"
23655else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023656 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000023657sed 's/^/| /' conftest.$ac_ext >&5
23658
23659 eval "$as_ac_var=no"
23660fi
23661
23662rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23663 conftest$ac_exeext conftest.$ac_ext
23664fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023665ac_res=`eval echo '${'$as_ac_var'}'`
23666 { echo "$as_me:$LINENO: result: $ac_res" >&5
23667echo "${ECHO_T}$ac_res" >&6; }
23668if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000023669 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023670#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000023671_ACEOF
23672
23673fi
23674done
23675
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023676{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23677echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023678if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023679 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023680else
23681 cat >conftest.$ac_ext <<_ACEOF
23682/* confdefs.h. */
23683_ACEOF
23684cat confdefs.h >>conftest.$ac_ext
23685cat >>conftest.$ac_ext <<_ACEOF
23686/* end confdefs.h. */
23687#include <math.h>
23688
23689int
23690main ()
23691{
23692#ifndef isinf
23693 (void) isinf;
23694#endif
23695
23696 ;
23697 return 0;
23698}
23699_ACEOF
23700rm -f conftest.$ac_objext
23701if { (ac_try="$ac_compile"
23702case "(($ac_try" in
23703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23704 *) ac_try_echo=$ac_try;;
23705esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023707 (eval "$ac_compile") 2>conftest.er1
23708 ac_status=$?
23709 grep -v '^ *+' conftest.er1 >conftest.err
23710 rm -f conftest.er1
23711 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023713 (exit $ac_status); } && {
23714 test -z "$ac_c_werror_flag" ||
23715 test ! -s conftest.err
23716 } && test -s conftest.$ac_objext; then
23717 ac_cv_have_decl_isinf=yes
23718else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023719 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023720sed 's/^/| /' conftest.$ac_ext >&5
23721
23722 ac_cv_have_decl_isinf=no
23723fi
23724
23725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23726fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023727{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23728echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23729if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023730
23731cat >>confdefs.h <<_ACEOF
23732#define HAVE_DECL_ISINF 1
23733_ACEOF
23734
23735
23736else
23737 cat >>confdefs.h <<_ACEOF
23738#define HAVE_DECL_ISINF 0
23739_ACEOF
23740
23741
23742fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023743{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23744echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023745if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023746 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023747else
23748 cat >conftest.$ac_ext <<_ACEOF
23749/* confdefs.h. */
23750_ACEOF
23751cat confdefs.h >>conftest.$ac_ext
23752cat >>conftest.$ac_ext <<_ACEOF
23753/* end confdefs.h. */
23754#include <math.h>
23755
23756int
23757main ()
23758{
23759#ifndef isnan
23760 (void) isnan;
23761#endif
23762
23763 ;
23764 return 0;
23765}
23766_ACEOF
23767rm -f conftest.$ac_objext
23768if { (ac_try="$ac_compile"
23769case "(($ac_try" in
23770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23771 *) ac_try_echo=$ac_try;;
23772esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023774 (eval "$ac_compile") 2>conftest.er1
23775 ac_status=$?
23776 grep -v '^ *+' conftest.er1 >conftest.err
23777 rm -f conftest.er1
23778 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023780 (exit $ac_status); } && {
23781 test -z "$ac_c_werror_flag" ||
23782 test ! -s conftest.err
23783 } && test -s conftest.$ac_objext; then
23784 ac_cv_have_decl_isnan=yes
23785else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023786 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023787sed 's/^/| /' conftest.$ac_ext >&5
23788
23789 ac_cv_have_decl_isnan=no
23790fi
23791
23792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23793fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023794{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23795echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23796if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023797
23798cat >>confdefs.h <<_ACEOF
23799#define HAVE_DECL_ISNAN 1
23800_ACEOF
23801
23802
23803else
23804 cat >>confdefs.h <<_ACEOF
23805#define HAVE_DECL_ISNAN 0
23806_ACEOF
23807
23808
23809fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023810{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23811echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023812if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023813 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023814else
23815 cat >conftest.$ac_ext <<_ACEOF
23816/* confdefs.h. */
23817_ACEOF
23818cat confdefs.h >>conftest.$ac_ext
23819cat >>conftest.$ac_ext <<_ACEOF
23820/* end confdefs.h. */
23821#include <math.h>
23822
23823int
23824main ()
23825{
23826#ifndef isfinite
23827 (void) isfinite;
23828#endif
23829
23830 ;
23831 return 0;
23832}
23833_ACEOF
23834rm -f conftest.$ac_objext
23835if { (ac_try="$ac_compile"
23836case "(($ac_try" in
23837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23838 *) ac_try_echo=$ac_try;;
23839esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023841 (eval "$ac_compile") 2>conftest.er1
23842 ac_status=$?
23843 grep -v '^ *+' conftest.er1 >conftest.err
23844 rm -f conftest.er1
23845 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023847 (exit $ac_status); } && {
23848 test -z "$ac_c_werror_flag" ||
23849 test ! -s conftest.err
23850 } && test -s conftest.$ac_objext; then
23851 ac_cv_have_decl_isfinite=yes
23852else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023853 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023854sed 's/^/| /' conftest.$ac_ext >&5
23855
23856 ac_cv_have_decl_isfinite=no
23857fi
23858
23859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23860fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023861{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23862echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
23863if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023864
23865cat >>confdefs.h <<_ACEOF
23866#define HAVE_DECL_ISFINITE 1
23867_ACEOF
23868
23869
23870else
23871 cat >>confdefs.h <<_ACEOF
23872#define HAVE_DECL_ISFINITE 0
23873_ACEOF
23874
23875
23876fi
23877
23878
Christian Heimes0a8143f2007-12-18 23:22:54 +000023879
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023880LIBS=$LIBS_SAVE
23881
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023882# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023883{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23884echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023885# Check whether --enable-big-digits was given.
23886if test "${enable_big_digits+set}" = set; then
23887 enableval=$enable_big_digits; case $enable_big_digits in
23888yes)
23889 enable_big_digits=30 ;;
23890no)
23891 enable_big_digits=15 ;;
2389215|30)
23893 ;;
23894*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023895 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23896echo "$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 +000023897 { (exit 1); exit 1; }; } ;;
23898esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023899{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23900echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023901
23902cat >>confdefs.h <<_ACEOF
23903#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23904_ACEOF
23905
23906
23907else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023908 { echo "$as_me:$LINENO: result: no value specified" >&5
23909echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023910fi
23911
23912
Guido van Rossumef2255b2000-03-10 22:30:29 +000023913# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023914if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023915 { echo "$as_me:$LINENO: checking for wchar.h" >&5
23916echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023917if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023918 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023919fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023920{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23921echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023922else
Martin v. Löwis11437992002-04-12 09:54:03 +000023923 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023924{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
23925echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023926cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023927/* confdefs.h. */
23928_ACEOF
23929cat confdefs.h >>conftest.$ac_ext
23930cat >>conftest.$ac_ext <<_ACEOF
23931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023932$ac_includes_default
23933#include <wchar.h>
23934_ACEOF
23935rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023936if { (ac_try="$ac_compile"
23937case "(($ac_try" in
23938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23939 *) ac_try_echo=$ac_try;;
23940esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023942 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023943 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023944 grep -v '^ *+' conftest.er1 >conftest.err
23945 rm -f conftest.er1
23946 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023948 (exit $ac_status); } && {
23949 test -z "$ac_c_werror_flag" ||
23950 test ! -s conftest.err
23951 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023952 ac_header_compiler=yes
23953else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023955sed 's/^/| /' conftest.$ac_ext >&5
23956
Martin v. Löwiseba40652007-08-30 20:10:57 +000023957 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023959
23960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023961{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23962echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023963
23964# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023965{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
23966echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023967cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023968/* confdefs.h. */
23969_ACEOF
23970cat confdefs.h >>conftest.$ac_ext
23971cat >>conftest.$ac_ext <<_ACEOF
23972/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023973#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023974_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023975if { (ac_try="$ac_cpp conftest.$ac_ext"
23976case "(($ac_try" in
23977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23978 *) ac_try_echo=$ac_try;;
23979esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023981 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023982 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023983 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023984 rm -f conftest.er1
23985 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023987 (exit $ac_status); } >/dev/null && {
23988 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23989 test ! -s conftest.err
23990 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023991 ac_header_preproc=yes
23992else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023994sed 's/^/| /' conftest.$ac_ext >&5
23995
Martin v. Löwis11437992002-04-12 09:54:03 +000023996 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023998
Martin v. Löwis11437992002-04-12 09:54:03 +000023999rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024000{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24001echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024002
24003# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024004case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24005 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024006 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24007echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24008 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24009echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024010 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024011 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024012 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024013 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24014echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24015 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24016echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24017 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24018echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24019 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24020echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24021 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24022echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24023 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24024echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000024025 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000024026## -------------------------------------- ##
24027## Report this to http://bugs.python.org/ ##
24028## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024029_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000024030 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024031 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024032esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024033{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24034echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024035if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024036 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024037else
24038 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024039fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024040{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24041echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024042
24043fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024044if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024045
24046
24047cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024048#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024049_ACEOF
24050
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024051 wchar_h="yes"
24052
Guido van Rossumef2255b2000-03-10 22:30:29 +000024053else
Martin v. Löwis11437992002-04-12 09:54:03 +000024054 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024055
24056fi
24057
Michael W. Hudson54241132001-12-07 15:38:26 +000024058
Martin v. Löwis11437992002-04-12 09:54:03 +000024059
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024060# determine wchar_t size
24061if test "$wchar_h" = yes
24062then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024063 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24064echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24065if test "${ac_cv_type_wchar_t+set}" = set; then
24066 echo $ECHO_N "(cached) $ECHO_C" >&6
24067else
24068 cat >conftest.$ac_ext <<_ACEOF
24069/* confdefs.h. */
24070_ACEOF
24071cat confdefs.h >>conftest.$ac_ext
24072cat >>conftest.$ac_ext <<_ACEOF
24073/* end confdefs.h. */
24074#include <wchar.h>
24075
24076typedef wchar_t ac__type_new_;
24077int
24078main ()
24079{
24080if ((ac__type_new_ *) 0)
24081 return 0;
24082if (sizeof (ac__type_new_))
24083 return 0;
24084 ;
24085 return 0;
24086}
24087_ACEOF
24088rm -f conftest.$ac_objext
24089if { (ac_try="$ac_compile"
24090case "(($ac_try" in
24091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24092 *) ac_try_echo=$ac_try;;
24093esac
24094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24095 (eval "$ac_compile") 2>conftest.er1
24096 ac_status=$?
24097 grep -v '^ *+' conftest.er1 >conftest.err
24098 rm -f conftest.er1
24099 cat conftest.err >&5
24100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24101 (exit $ac_status); } && {
24102 test -z "$ac_c_werror_flag" ||
24103 test ! -s conftest.err
24104 } && test -s conftest.$ac_objext; then
24105 ac_cv_type_wchar_t=yes
24106else
24107 echo "$as_me: failed program was:" >&5
24108sed 's/^/| /' conftest.$ac_ext >&5
24109
24110 ac_cv_type_wchar_t=no
24111fi
24112
24113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24114fi
24115{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24116echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24117
24118# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000024119# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24120# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24121# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024122{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24123echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024124if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024125 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024126else
Martin v. Löwis11437992002-04-12 09:54:03 +000024127 if test "$cross_compiling" = yes; then
24128 # Depending upon the size, compute the lo and hi bounds.
24129cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024130/* confdefs.h. */
24131_ACEOF
24132cat confdefs.h >>conftest.$ac_ext
24133cat >>conftest.$ac_ext <<_ACEOF
24134/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024135#include <wchar.h>
24136
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024137 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024138int
24139main ()
24140{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024141static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024142test_array [0] = 0
24143
24144 ;
24145 return 0;
24146}
24147_ACEOF
24148rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024149if { (ac_try="$ac_compile"
24150case "(($ac_try" in
24151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24152 *) ac_try_echo=$ac_try;;
24153esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024155 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024156 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024157 grep -v '^ *+' conftest.er1 >conftest.err
24158 rm -f conftest.er1
24159 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024161 (exit $ac_status); } && {
24162 test -z "$ac_c_werror_flag" ||
24163 test ! -s conftest.err
24164 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024165 ac_lo=0 ac_mid=0
24166 while :; do
24167 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024168/* confdefs.h. */
24169_ACEOF
24170cat confdefs.h >>conftest.$ac_ext
24171cat >>conftest.$ac_ext <<_ACEOF
24172/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024173#include <wchar.h>
24174
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024175 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024176int
24177main ()
24178{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024179static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024180test_array [0] = 0
24181
24182 ;
24183 return 0;
24184}
24185_ACEOF
24186rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024187if { (ac_try="$ac_compile"
24188case "(($ac_try" in
24189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24190 *) ac_try_echo=$ac_try;;
24191esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024193 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024194 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024195 grep -v '^ *+' conftest.er1 >conftest.err
24196 rm -f conftest.er1
24197 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024199 (exit $ac_status); } && {
24200 test -z "$ac_c_werror_flag" ||
24201 test ! -s conftest.err
24202 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024203 ac_hi=$ac_mid; break
24204else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024205 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024206sed 's/^/| /' conftest.$ac_ext >&5
24207
Martin v. Löwiseba40652007-08-30 20:10:57 +000024208 ac_lo=`expr $ac_mid + 1`
24209 if test $ac_lo -le $ac_mid; then
24210 ac_lo= ac_hi=
24211 break
24212 fi
24213 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024215
24216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024217 done
24218else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024220sed 's/^/| /' conftest.$ac_ext >&5
24221
Martin v. Löwiseba40652007-08-30 20:10:57 +000024222 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024223/* confdefs.h. */
24224_ACEOF
24225cat confdefs.h >>conftest.$ac_ext
24226cat >>conftest.$ac_ext <<_ACEOF
24227/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024228#include <wchar.h>
24229
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024230 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024231int
24232main ()
24233{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024234static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024235test_array [0] = 0
24236
24237 ;
24238 return 0;
24239}
24240_ACEOF
24241rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024242if { (ac_try="$ac_compile"
24243case "(($ac_try" in
24244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24245 *) ac_try_echo=$ac_try;;
24246esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024248 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024249 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024250 grep -v '^ *+' conftest.er1 >conftest.err
24251 rm -f conftest.er1
24252 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024254 (exit $ac_status); } && {
24255 test -z "$ac_c_werror_flag" ||
24256 test ! -s conftest.err
24257 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024258 ac_hi=-1 ac_mid=-1
24259 while :; do
24260 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024261/* confdefs.h. */
24262_ACEOF
24263cat confdefs.h >>conftest.$ac_ext
24264cat >>conftest.$ac_ext <<_ACEOF
24265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024266#include <wchar.h>
24267
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024268 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024269int
24270main ()
24271{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024272static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024273test_array [0] = 0
24274
24275 ;
24276 return 0;
24277}
24278_ACEOF
24279rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024280if { (ac_try="$ac_compile"
24281case "(($ac_try" in
24282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24283 *) ac_try_echo=$ac_try;;
24284esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024286 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024288 grep -v '^ *+' conftest.er1 >conftest.err
24289 rm -f conftest.er1
24290 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024292 (exit $ac_status); } && {
24293 test -z "$ac_c_werror_flag" ||
24294 test ! -s conftest.err
24295 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024296 ac_lo=$ac_mid; break
24297else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024298 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024299sed 's/^/| /' conftest.$ac_ext >&5
24300
Martin v. Löwiseba40652007-08-30 20:10:57 +000024301 ac_hi=`expr '(' $ac_mid ')' - 1`
24302 if test $ac_mid -le $ac_hi; then
24303 ac_lo= ac_hi=
24304 break
24305 fi
24306 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024307fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024308
24309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024310 done
24311else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024313sed 's/^/| /' conftest.$ac_ext >&5
24314
Martin v. Löwiseba40652007-08-30 20:10:57 +000024315 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024316fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024317
24318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024320
24321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024322# Binary search between lo and hi bounds.
24323while test "x$ac_lo" != "x$ac_hi"; do
24324 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24325 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024326/* confdefs.h. */
24327_ACEOF
24328cat confdefs.h >>conftest.$ac_ext
24329cat >>conftest.$ac_ext <<_ACEOF
24330/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024331#include <wchar.h>
24332
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024333 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024334int
24335main ()
24336{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024337static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024338test_array [0] = 0
24339
24340 ;
24341 return 0;
24342}
24343_ACEOF
24344rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024345if { (ac_try="$ac_compile"
24346case "(($ac_try" in
24347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24348 *) ac_try_echo=$ac_try;;
24349esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024351 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024353 grep -v '^ *+' conftest.er1 >conftest.err
24354 rm -f conftest.er1
24355 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024357 (exit $ac_status); } && {
24358 test -z "$ac_c_werror_flag" ||
24359 test ! -s conftest.err
24360 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024361 ac_hi=$ac_mid
24362else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024364sed 's/^/| /' conftest.$ac_ext >&5
24365
Martin v. Löwiseba40652007-08-30 20:10:57 +000024366 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024368
24369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024370done
24371case $ac_lo in
24372?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024373'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024374 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024375See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024376echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024377See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024378 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024379 else
24380 ac_cv_sizeof_wchar_t=0
24381 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024382esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024383else
Martin v. Löwis11437992002-04-12 09:54:03 +000024384 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024385/* confdefs.h. */
24386_ACEOF
24387cat confdefs.h >>conftest.$ac_ext
24388cat >>conftest.$ac_ext <<_ACEOF
24389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024390#include <wchar.h>
24391
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024392 typedef wchar_t ac__type_sizeof_;
24393static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24394static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024395#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024396#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024397int
24398main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024399{
Martin v. Löwis11437992002-04-12 09:54:03 +000024400
24401 FILE *f = fopen ("conftest.val", "w");
24402 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024403 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024404 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024405 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000024406 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024407 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000024408 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024409 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024410 }
24411 else
24412 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000024413 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024414 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000024415 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024416 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024417 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024418 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024419
24420 ;
24421 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024422}
Martin v. Löwis11437992002-04-12 09:54:03 +000024423_ACEOF
24424rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024425if { (ac_try="$ac_link"
24426case "(($ac_try" in
24427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24428 *) ac_try_echo=$ac_try;;
24429esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024431 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024432 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024434 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024435 { (case "(($ac_try" in
24436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24437 *) ac_try_echo=$ac_try;;
24438esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024440 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024441 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024443 (exit $ac_status); }; }; then
24444 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024445else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024446 echo "$as_me: program exited with status $ac_status" >&5
24447echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024448sed 's/^/| /' conftest.$ac_ext >&5
24449
Martin v. Löwis11437992002-04-12 09:54:03 +000024450( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000024451if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024452 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024453See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024454echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024455See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024456 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024457 else
24458 ac_cv_sizeof_wchar_t=0
24459 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024461rm -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 +000024462fi
24463rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024464fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024465{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24466echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024467
24468
24469
Martin v. Löwis11437992002-04-12 09:54:03 +000024470cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024471#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024472_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024473
Michael W. Hudson54241132001-12-07 15:38:26 +000024474
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024475fi
24476
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024477{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24478echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024479have_ucs4_tcl=no
24480cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024481/* confdefs.h. */
24482_ACEOF
24483cat confdefs.h >>conftest.$ac_ext
24484cat >>conftest.$ac_ext <<_ACEOF
24485/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024486
24487#include <tcl.h>
24488#if TCL_UTF_MAX != 6
24489# error "NOT UCS4_TCL"
24490#endif
24491int
24492main ()
24493{
24494
24495 ;
24496 return 0;
24497}
24498_ACEOF
24499rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024500if { (ac_try="$ac_compile"
24501case "(($ac_try" in
24502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24503 *) ac_try_echo=$ac_try;;
24504esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024506 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024507 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024508 grep -v '^ *+' conftest.er1 >conftest.err
24509 rm -f conftest.er1
24510 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024512 (exit $ac_status); } && {
24513 test -z "$ac_c_werror_flag" ||
24514 test ! -s conftest.err
24515 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024516
24517
24518cat >>confdefs.h <<\_ACEOF
24519#define HAVE_UCS4_TCL 1
24520_ACEOF
24521
24522 have_ucs4_tcl=yes
24523
24524else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024526sed 's/^/| /' conftest.$ac_ext >&5
24527
Martin v. Löwiseba40652007-08-30 20:10:57 +000024528
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024529fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024530
24531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024532{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24533echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024534
Skip Montanaro6dead952003-09-25 14:50:04 +000024535# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024536if test "$wchar_h" = yes
24537then
24538 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024539 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24540echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024541 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024542 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024543else
24544
24545 if test "$cross_compiling" = yes; then
24546 ac_cv_wchar_t_signed=yes
24547else
24548 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024549/* confdefs.h. */
24550_ACEOF
24551cat confdefs.h >>conftest.$ac_ext
24552cat >>conftest.$ac_ext <<_ACEOF
24553/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024554
24555 #include <wchar.h>
24556 int main()
24557 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000024558 /* Success: exit code 0 */
24559 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024560 }
24561
24562_ACEOF
24563rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024564if { (ac_try="$ac_link"
24565case "(($ac_try" in
24566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24567 *) ac_try_echo=$ac_try;;
24568esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024570 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024571 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024573 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024574 { (case "(($ac_try" in
24575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24576 *) ac_try_echo=$ac_try;;
24577esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024579 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024580 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024582 (exit $ac_status); }; }; then
24583 ac_cv_wchar_t_signed=yes
24584else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024585 echo "$as_me: program exited with status $ac_status" >&5
24586echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024587sed 's/^/| /' conftest.$ac_ext >&5
24588
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024589( exit $ac_status )
24590ac_cv_wchar_t_signed=no
24591fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024592rm -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 +000024593fi
24594
Martin v. Löwiseba40652007-08-30 20:10:57 +000024595
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024596fi
24597
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024598 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24599echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024600fi
24601
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024602{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
24603echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024604# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024605if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024606 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024607else
24608 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000024609fi
24610
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024611
24612if test $enable_unicode = yes
24613then
Martin v. Löwisfd917792001-06-27 20:22:04 +000024614 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024615 case "$have_ucs4_tcl" in
24616 yes) enable_unicode="ucs4"
24617 ;;
24618 *) enable_unicode="ucs2"
24619 ;;
24620 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024621fi
24622
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024623
24624
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024625case "$enable_unicode" in
24626ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000024627 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024628#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000024629_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024630
24631 ;;
24632ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000024633 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024634#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024635_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024636
24637 ;;
24638esac
24639
Michael W. Hudson54241132001-12-07 15:38:26 +000024640
Martin v. Löwis11437992002-04-12 09:54:03 +000024641
24642
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024643
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024644if test "$enable_unicode" = "no"
24645then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000024646 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024647 { echo "$as_me:$LINENO: result: not used" >&5
24648echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024649else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000024650 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000024651
24652cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024653#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024654_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024655
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024656
24657 # wchar_t is only usable if it maps to an unsigned type
24658 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024659 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024660 then
24661 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024662
Martin v. Löwis11437992002-04-12 09:54:03 +000024663cat >>confdefs.h <<\_ACEOF
24664#define HAVE_USABLE_WCHAR_T 1
24665_ACEOF
24666
24667 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024668#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024669_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024670
24671 elif test "$ac_cv_sizeof_short" = "$unicode_size"
24672 then
24673 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000024674 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024675#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024676_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024677
24678 elif test "$ac_cv_sizeof_long" = "$unicode_size"
24679 then
24680 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000024681 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024682#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024683_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024684
24685 else
24686 PY_UNICODE_TYPE="no type found"
24687 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024688 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24689echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024690fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000024691
24692# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024693{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24694echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024695if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024696 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024697else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024698 # See if sys/param.h defines the BYTE_ORDER macro.
24699cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024700/* confdefs.h. */
24701_ACEOF
24702cat confdefs.h >>conftest.$ac_ext
24703cat >>conftest.$ac_ext <<_ACEOF
24704/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024705#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024706#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024707
Martin v. Löwis11437992002-04-12 09:54:03 +000024708int
24709main ()
24710{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024711#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
24712 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
24713 bogus endian macros
24714#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024715
24716 ;
24717 return 0;
24718}
24719_ACEOF
24720rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024721if { (ac_try="$ac_compile"
24722case "(($ac_try" in
24723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24724 *) ac_try_echo=$ac_try;;
24725esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024727 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024728 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024729 grep -v '^ *+' conftest.er1 >conftest.err
24730 rm -f conftest.er1
24731 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024733 (exit $ac_status); } && {
24734 test -z "$ac_c_werror_flag" ||
24735 test ! -s conftest.err
24736 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024737 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024738cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024739/* confdefs.h. */
24740_ACEOF
24741cat confdefs.h >>conftest.$ac_ext
24742cat >>conftest.$ac_ext <<_ACEOF
24743/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024744#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024745#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024746
Martin v. Löwis11437992002-04-12 09:54:03 +000024747int
24748main ()
24749{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024750#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024751 not big endian
24752#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024753
24754 ;
24755 return 0;
24756}
24757_ACEOF
24758rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024759if { (ac_try="$ac_compile"
24760case "(($ac_try" in
24761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24762 *) ac_try_echo=$ac_try;;
24763esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024767 grep -v '^ *+' conftest.er1 >conftest.err
24768 rm -f conftest.er1
24769 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024771 (exit $ac_status); } && {
24772 test -z "$ac_c_werror_flag" ||
24773 test ! -s conftest.err
24774 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024775 ac_cv_c_bigendian=yes
24776else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024778sed 's/^/| /' conftest.$ac_ext >&5
24779
Martin v. Löwiseba40652007-08-30 20:10:57 +000024780 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024781fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024782
24783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024784else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024786sed 's/^/| /' conftest.$ac_ext >&5
24787
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024788 # It does not; compile a test program.
24789if test "$cross_compiling" = yes; then
24790 # try to guess the endianness by grepping values into an object file
24791 ac_cv_c_bigendian=unknown
24792 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024793/* confdefs.h. */
24794_ACEOF
24795cat confdefs.h >>conftest.$ac_ext
24796cat >>conftest.$ac_ext <<_ACEOF
24797/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024798short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24799short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24800void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
24801short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24802short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24803void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024804int
24805main ()
24806{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024807 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024808 ;
24809 return 0;
24810}
24811_ACEOF
24812rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024813if { (ac_try="$ac_compile"
24814case "(($ac_try" in
24815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24816 *) ac_try_echo=$ac_try;;
24817esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024819 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024820 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024821 grep -v '^ *+' conftest.er1 >conftest.err
24822 rm -f conftest.er1
24823 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024825 (exit $ac_status); } && {
24826 test -z "$ac_c_werror_flag" ||
24827 test ! -s conftest.err
24828 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024829 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024830 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024831fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024832if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24833 if test "$ac_cv_c_bigendian" = unknown; then
24834 ac_cv_c_bigendian=no
24835 else
24836 # finding both strings is unlikely to happen, but who knows?
24837 ac_cv_c_bigendian=unknown
24838 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024839fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024840else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024842sed 's/^/| /' conftest.$ac_ext >&5
24843
Martin v. Löwiseba40652007-08-30 20:10:57 +000024844
Martin v. Löwis11437992002-04-12 09:54:03 +000024845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024846
24847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024848else
24849 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024850/* confdefs.h. */
24851_ACEOF
24852cat confdefs.h >>conftest.$ac_ext
24853cat >>conftest.$ac_ext <<_ACEOF
24854/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000024855$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024856int
24857main ()
24858{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024859
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024860 /* Are we little or big endian? From Harbison&Steele. */
24861 union
24862 {
24863 long int l;
24864 char c[sizeof (long int)];
24865 } u;
24866 u.l = 1;
24867 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024868
24869 ;
24870 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024871}
Martin v. Löwis11437992002-04-12 09:54:03 +000024872_ACEOF
24873rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024874if { (ac_try="$ac_link"
24875case "(($ac_try" in
24876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24877 *) ac_try_echo=$ac_try;;
24878esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024880 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024881 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024883 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024884 { (case "(($ac_try" in
24885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24886 *) ac_try_echo=$ac_try;;
24887esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024889 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024890 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024892 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024893 ac_cv_c_bigendian=no
24894else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024895 echo "$as_me: program exited with status $ac_status" >&5
24896echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024897sed 's/^/| /' conftest.$ac_ext >&5
24898
Martin v. Löwis11437992002-04-12 09:54:03 +000024899( exit $ac_status )
24900ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024901fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024902rm -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 +000024903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024904
24905
Martin v. Löwis11437992002-04-12 09:54:03 +000024906fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024907
24908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24909fi
24910{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24911echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
24912case $ac_cv_c_bigendian in
24913 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024914
24915cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024916#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024917_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024918 ;;
24919 no)
24920 ;;
24921 *)
24922 { { echo "$as_me:$LINENO: error: unknown endianness
24923presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24924echo "$as_me: error: unknown endianness
24925presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024926 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024927esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024928
Michael W. Hudson54241132001-12-07 15:38:26 +000024929
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024930# Check whether right shifting a negative integer extends the sign bit
24931# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024932{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24933echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024934if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024935 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024936else
Martin v. Löwis11437992002-04-12 09:54:03 +000024937
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024938if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024939 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024940else
Martin v. Löwis11437992002-04-12 09:54:03 +000024941 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024942/* confdefs.h. */
24943_ACEOF
24944cat confdefs.h >>conftest.$ac_ext
24945cat >>conftest.$ac_ext <<_ACEOF
24946/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024947
24948int main()
24949{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024950 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024951}
24952
Martin v. Löwis11437992002-04-12 09:54:03 +000024953_ACEOF
24954rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024955if { (ac_try="$ac_link"
24956case "(($ac_try" in
24957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24958 *) ac_try_echo=$ac_try;;
24959esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024961 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024962 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024964 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024965 { (case "(($ac_try" in
24966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24967 *) ac_try_echo=$ac_try;;
24968esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024970 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024971 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024973 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024974 ac_cv_rshift_extends_sign=yes
24975else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024976 echo "$as_me: program exited with status $ac_status" >&5
24977echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024978sed 's/^/| /' conftest.$ac_ext >&5
24979
Martin v. Löwis11437992002-04-12 09:54:03 +000024980( exit $ac_status )
24981ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024983rm -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 +000024984fi
24985
Martin v. Löwiseba40652007-08-30 20:10:57 +000024986
24987fi
24988
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024989{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24990echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024991if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024992then
Martin v. Löwis11437992002-04-12 09:54:03 +000024993
24994cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024995#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024996_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024997
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024998fi
24999
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025000# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025001{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25002echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025003if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025004 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025005else
Martin v. Löwis11437992002-04-12 09:54:03 +000025006
25007cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025008/* confdefs.h. */
25009_ACEOF
25010cat confdefs.h >>conftest.$ac_ext
25011cat >>conftest.$ac_ext <<_ACEOF
25012/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025013#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025014int
25015main ()
25016{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025017
25018 FILE *f = fopen("/dev/null", "r");
25019 flockfile(f);
25020 getc_unlocked(f);
25021 funlockfile(f);
25022
Martin v. Löwis11437992002-04-12 09:54:03 +000025023 ;
25024 return 0;
25025}
25026_ACEOF
25027rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025028if { (ac_try="$ac_link"
25029case "(($ac_try" in
25030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25031 *) ac_try_echo=$ac_try;;
25032esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025034 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025035 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025036 grep -v '^ *+' conftest.er1 >conftest.err
25037 rm -f conftest.er1
25038 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025040 (exit $ac_status); } && {
25041 test -z "$ac_c_werror_flag" ||
25042 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025043 } && test -s conftest$ac_exeext &&
25044 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025045 ac_cv_have_getc_unlocked=yes
25046else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025047 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025048sed 's/^/| /' conftest.$ac_ext >&5
25049
Martin v. Löwiseba40652007-08-30 20:10:57 +000025050 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025051fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025052
25053rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025054 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025055fi
25056
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025057{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25058echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025059if test "$ac_cv_have_getc_unlocked" = yes
25060then
Martin v. Löwis11437992002-04-12 09:54:03 +000025061
25062cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025063#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025064_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025065
25066fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025067
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025068# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025069# save the value of LIBS so we don't actually link Python with readline
25070LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025071
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025072# On some systems we need to link readline to a termcap compatible
25073# library. NOTE: Keep the precedence of listed libraries synchronised
25074# with setup.py.
25075py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025076{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25077echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025078for py_libtermcap in "" ncursesw ncurses curses termcap; do
25079 if test -z "$py_libtermcap"; then
25080 READLINE_LIBS="-lreadline"
25081 else
25082 READLINE_LIBS="-lreadline -l$py_libtermcap"
25083 fi
25084 LIBS="$READLINE_LIBS $LIBS_no_readline"
25085 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025086/* confdefs.h. */
25087_ACEOF
25088cat confdefs.h >>conftest.$ac_ext
25089cat >>conftest.$ac_ext <<_ACEOF
25090/* end confdefs.h. */
25091
Martin v. Löwiseba40652007-08-30 20:10:57 +000025092/* Override any GCC internal prototype to avoid an error.
25093 Use char because int might match the return type of a GCC
25094 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025095#ifdef __cplusplus
25096extern "C"
25097#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025098char readline ();
25099int
25100main ()
25101{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025102return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025103 ;
25104 return 0;
25105}
25106_ACEOF
25107rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025108if { (ac_try="$ac_link"
25109case "(($ac_try" in
25110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25111 *) ac_try_echo=$ac_try;;
25112esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025114 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025115 ac_status=$?
25116 grep -v '^ *+' conftest.er1 >conftest.err
25117 rm -f conftest.er1
25118 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025120 (exit $ac_status); } && {
25121 test -z "$ac_c_werror_flag" ||
25122 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025123 } && test -s conftest$ac_exeext &&
25124 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025125 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025126else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025127 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025128sed 's/^/| /' conftest.$ac_ext >&5
25129
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025130
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025132
25133rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025134 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025135 if test $py_cv_lib_readline = yes; then
25136 break
25137 fi
25138done
25139# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25140#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000025141if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025142 { echo "$as_me:$LINENO: result: none" >&5
25143echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025144else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025145 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25146echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025147
25148cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025149#define HAVE_LIBREADLINE 1
25150_ACEOF
25151
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025152fi
25153
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025154# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025155{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25156echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025157if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025158 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025159else
25160 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025161LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025162cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025163/* confdefs.h. */
25164_ACEOF
25165cat confdefs.h >>conftest.$ac_ext
25166cat >>conftest.$ac_ext <<_ACEOF
25167/* end confdefs.h. */
25168
Martin v. Löwiseba40652007-08-30 20:10:57 +000025169/* Override any GCC internal prototype to avoid an error.
25170 Use char because int might match the return type of a GCC
25171 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025172#ifdef __cplusplus
25173extern "C"
25174#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025175char rl_callback_handler_install ();
25176int
25177main ()
25178{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025179return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025180 ;
25181 return 0;
25182}
25183_ACEOF
25184rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025185if { (ac_try="$ac_link"
25186case "(($ac_try" in
25187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25188 *) ac_try_echo=$ac_try;;
25189esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025191 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025193 grep -v '^ *+' conftest.er1 >conftest.err
25194 rm -f conftest.er1
25195 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025197 (exit $ac_status); } && {
25198 test -z "$ac_c_werror_flag" ||
25199 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025200 } && test -s conftest$ac_exeext &&
25201 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025202 ac_cv_lib_readline_rl_callback_handler_install=yes
25203else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025204 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025205sed 's/^/| /' conftest.$ac_ext >&5
25206
Martin v. Löwiseba40652007-08-30 20:10:57 +000025207 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025208fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025209
25210rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025211 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025212LIBS=$ac_check_lib_save_LIBS
25213fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025214{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25215echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25216if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025217
25218cat >>confdefs.h <<\_ACEOF
25219#define HAVE_RL_CALLBACK 1
25220_ACEOF
25221
25222fi
25223
25224
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025225# check for readline 2.2
25226cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025227/* confdefs.h. */
25228_ACEOF
25229cat confdefs.h >>conftest.$ac_ext
25230cat >>conftest.$ac_ext <<_ACEOF
25231/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025232#include <readline/readline.h>
25233_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025234if { (ac_try="$ac_cpp conftest.$ac_ext"
25235case "(($ac_try" in
25236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25237 *) ac_try_echo=$ac_try;;
25238esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025240 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025241 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025242 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025243 rm -f conftest.er1
25244 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025246 (exit $ac_status); } >/dev/null && {
25247 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25248 test ! -s conftest.err
25249 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025250 have_readline=yes
25251else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025252 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025253sed 's/^/| /' conftest.$ac_ext >&5
25254
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025255 have_readline=no
25256fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025257
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025258rm -f conftest.err conftest.$ac_ext
25259if test $have_readline = yes
25260then
25261 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025262/* confdefs.h. */
25263_ACEOF
25264cat confdefs.h >>conftest.$ac_ext
25265cat >>conftest.$ac_ext <<_ACEOF
25266/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025267#include <readline/readline.h>
25268
25269_ACEOF
25270if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025271 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025272
25273cat >>confdefs.h <<\_ACEOF
25274#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25275_ACEOF
25276
25277fi
Ronald Oussoren25967582009-09-06 10:00:26 +000025278rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025279
25280fi
25281
Martin v. Löwis0daad592001-09-30 21:09:59 +000025282# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025283{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25284echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025285if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025286 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025287else
Martin v. Löwis11437992002-04-12 09:54:03 +000025288 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025289LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025290cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025291/* confdefs.h. */
25292_ACEOF
25293cat confdefs.h >>conftest.$ac_ext
25294cat >>conftest.$ac_ext <<_ACEOF
25295/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025296
Martin v. Löwiseba40652007-08-30 20:10:57 +000025297/* Override any GCC internal prototype to avoid an error.
25298 Use char because int might match the return type of a GCC
25299 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025300#ifdef __cplusplus
25301extern "C"
25302#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025303char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025304int
25305main ()
25306{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025307return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025308 ;
25309 return 0;
25310}
25311_ACEOF
25312rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025313if { (ac_try="$ac_link"
25314case "(($ac_try" in
25315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25316 *) ac_try_echo=$ac_try;;
25317esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025319 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025321 grep -v '^ *+' conftest.er1 >conftest.err
25322 rm -f conftest.er1
25323 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025325 (exit $ac_status); } && {
25326 test -z "$ac_c_werror_flag" ||
25327 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025328 } && test -s conftest$ac_exeext &&
25329 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025330 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025331else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025332 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025333sed 's/^/| /' conftest.$ac_ext >&5
25334
Martin v. Löwiseba40652007-08-30 20:10:57 +000025335 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025337
25338rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025339 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025340LIBS=$ac_check_lib_save_LIBS
25341fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025342{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25343echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25344if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025345
Martin v. Löwis11437992002-04-12 09:54:03 +000025346cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025347#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025348_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025349
Martin v. Löwis0daad592001-09-30 21:09:59 +000025350fi
25351
Michael W. Hudson54241132001-12-07 15:38:26 +000025352
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025353# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025354{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25355echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025356if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025357 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025358else
25359 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025360LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025361cat >conftest.$ac_ext <<_ACEOF
25362/* confdefs.h. */
25363_ACEOF
25364cat confdefs.h >>conftest.$ac_ext
25365cat >>conftest.$ac_ext <<_ACEOF
25366/* end confdefs.h. */
25367
25368/* Override any GCC internal prototype to avoid an error.
25369 Use char because int might match the return type of a GCC
25370 builtin and then its argument prototype would still apply. */
25371#ifdef __cplusplus
25372extern "C"
25373#endif
25374char rl_completion_display_matches_hook ();
25375int
25376main ()
25377{
25378return rl_completion_display_matches_hook ();
25379 ;
25380 return 0;
25381}
25382_ACEOF
25383rm -f conftest.$ac_objext conftest$ac_exeext
25384if { (ac_try="$ac_link"
25385case "(($ac_try" in
25386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25387 *) ac_try_echo=$ac_try;;
25388esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025390 (eval "$ac_link") 2>conftest.er1
25391 ac_status=$?
25392 grep -v '^ *+' conftest.er1 >conftest.err
25393 rm -f conftest.er1
25394 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025396 (exit $ac_status); } && {
25397 test -z "$ac_c_werror_flag" ||
25398 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025399 } && test -s conftest$ac_exeext &&
25400 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025401 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25402else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025403 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025404sed 's/^/| /' conftest.$ac_ext >&5
25405
25406 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25407fi
25408
25409rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25410 conftest$ac_exeext conftest.$ac_ext
25411LIBS=$ac_check_lib_save_LIBS
25412fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025413{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25414echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25415if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025416
25417cat >>confdefs.h <<\_ACEOF
25418#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25419_ACEOF
25420
25421fi
25422
25423
Martin v. Löwis0daad592001-09-30 21:09:59 +000025424# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025425{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25426echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025427if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025428 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025429else
Martin v. Löwis11437992002-04-12 09:54:03 +000025430 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025431LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025432cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025433/* confdefs.h. */
25434_ACEOF
25435cat confdefs.h >>conftest.$ac_ext
25436cat >>conftest.$ac_ext <<_ACEOF
25437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025438
Martin v. Löwiseba40652007-08-30 20:10:57 +000025439/* Override any GCC internal prototype to avoid an error.
25440 Use char because int might match the return type of a GCC
25441 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025442#ifdef __cplusplus
25443extern "C"
25444#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025445char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025446int
25447main ()
25448{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025449return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025450 ;
25451 return 0;
25452}
25453_ACEOF
25454rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025455if { (ac_try="$ac_link"
25456case "(($ac_try" in
25457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25458 *) ac_try_echo=$ac_try;;
25459esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025461 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025462 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025463 grep -v '^ *+' conftest.er1 >conftest.err
25464 rm -f conftest.er1
25465 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025467 (exit $ac_status); } && {
25468 test -z "$ac_c_werror_flag" ||
25469 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025470 } && test -s conftest$ac_exeext &&
25471 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025472 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025473else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025474 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025475sed 's/^/| /' conftest.$ac_ext >&5
25476
Martin v. Löwiseba40652007-08-30 20:10:57 +000025477 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025478fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025479
25480rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025481 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025482LIBS=$ac_check_lib_save_LIBS
25483fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025484{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25485echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25486if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025487
Martin v. Löwis11437992002-04-12 09:54:03 +000025488cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025489#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025490_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025491
Guido van Rossum353ae582001-07-10 16:45:32 +000025492fi
25493
Jack Jansendd19cf82001-12-06 22:36:17 +000025494
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025495# also in readline 4.2
25496cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025497/* confdefs.h. */
25498_ACEOF
25499cat confdefs.h >>conftest.$ac_ext
25500cat >>conftest.$ac_ext <<_ACEOF
25501/* end confdefs.h. */
25502#include <readline/readline.h>
25503_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025504if { (ac_try="$ac_cpp conftest.$ac_ext"
25505case "(($ac_try" in
25506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25507 *) ac_try_echo=$ac_try;;
25508esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025510 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025511 ac_status=$?
25512 grep -v '^ *+' conftest.er1 >conftest.err
25513 rm -f conftest.er1
25514 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025516 (exit $ac_status); } >/dev/null && {
25517 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25518 test ! -s conftest.err
25519 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025520 have_readline=yes
25521else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025522 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025523sed 's/^/| /' conftest.$ac_ext >&5
25524
25525 have_readline=no
25526fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025527
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025528rm -f conftest.err conftest.$ac_ext
25529if test $have_readline = yes
25530then
25531 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025532/* confdefs.h. */
25533_ACEOF
25534cat confdefs.h >>conftest.$ac_ext
25535cat >>conftest.$ac_ext <<_ACEOF
25536/* end confdefs.h. */
25537#include <readline/readline.h>
25538
25539_ACEOF
25540if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25541 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25542
25543cat >>confdefs.h <<\_ACEOF
25544#define HAVE_RL_CATCH_SIGNAL 1
25545_ACEOF
25546
25547fi
Ronald Oussoren25967582009-09-06 10:00:26 +000025548rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025549
25550fi
25551
Martin v. Löwis82bca632006-02-10 20:49:30 +000025552# End of readline checks: restore LIBS
25553LIBS=$LIBS_no_readline
25554
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025555{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25556echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025557if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025558 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025559else
Martin v. Löwis11437992002-04-12 09:54:03 +000025560
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025561if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025562 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025563else
Martin v. Löwis11437992002-04-12 09:54:03 +000025564 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025565/* confdefs.h. */
25566_ACEOF
25567cat confdefs.h >>conftest.$ac_ext
25568cat >>conftest.$ac_ext <<_ACEOF
25569/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025570
25571int main()
25572{
25573 int val1 = nice(1);
25574 if (val1 != -1 && val1 == nice(2))
25575 exit(0);
25576 exit(1);
25577}
25578
Martin v. Löwis11437992002-04-12 09:54:03 +000025579_ACEOF
25580rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025581if { (ac_try="$ac_link"
25582case "(($ac_try" in
25583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25584 *) ac_try_echo=$ac_try;;
25585esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025587 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025588 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025590 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025591 { (case "(($ac_try" in
25592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25593 *) ac_try_echo=$ac_try;;
25594esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025596 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025597 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025599 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025600 ac_cv_broken_nice=yes
25601else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025602 echo "$as_me: program exited with status $ac_status" >&5
25603echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025604sed 's/^/| /' conftest.$ac_ext >&5
25605
Martin v. Löwis11437992002-04-12 09:54:03 +000025606( exit $ac_status )
25607ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025609rm -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 +000025610fi
25611
Martin v. Löwiseba40652007-08-30 20:10:57 +000025612
25613fi
25614
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025615{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25616echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025617if test "$ac_cv_broken_nice" = yes
25618then
Martin v. Löwis11437992002-04-12 09:54:03 +000025619
25620cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025621#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025622_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025623
25624fi
25625
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025626{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25627echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025628if test "${ac_cv_broken_poll+set}" = set; then
25629 echo $ECHO_N "(cached) $ECHO_C" >&6
25630else
25631 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025632 ac_cv_broken_poll=no
25633else
25634 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025635/* confdefs.h. */
25636_ACEOF
25637cat confdefs.h >>conftest.$ac_ext
25638cat >>conftest.$ac_ext <<_ACEOF
25639/* end confdefs.h. */
25640
25641#include <poll.h>
25642
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025643int main()
25644{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025645 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025646 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025647
25648 close (42);
25649
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025650 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025651 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025652 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025653 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025654 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025655 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025656 return 1;
25657}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025658
25659_ACEOF
25660rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025661if { (ac_try="$ac_link"
25662case "(($ac_try" in
25663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25664 *) ac_try_echo=$ac_try;;
25665esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025667 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025668 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025670 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025671 { (case "(($ac_try" in
25672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25673 *) ac_try_echo=$ac_try;;
25674esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025676 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025677 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025679 (exit $ac_status); }; }; then
25680 ac_cv_broken_poll=yes
25681else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025682 echo "$as_me: program exited with status $ac_status" >&5
25683echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025684sed 's/^/| /' conftest.$ac_ext >&5
25685
25686( exit $ac_status )
25687ac_cv_broken_poll=no
25688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025689rm -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 +000025690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025691
25692
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025693fi
25694
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025695{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25696echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025697if test "$ac_cv_broken_poll" = yes
25698then
25699
25700cat >>confdefs.h <<\_ACEOF
25701#define HAVE_BROKEN_POLL 1
25702_ACEOF
25703
25704fi
25705
Brett Cannon43802422005-02-10 20:48:03 +000025706# 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 +000025707# (which is not required by ISO C or UNIX spec) and/or if we support
25708# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025709{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25710echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025711if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025712 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025713else
25714 cat >conftest.$ac_ext <<_ACEOF
25715/* confdefs.h. */
25716_ACEOF
25717cat confdefs.h >>conftest.$ac_ext
25718cat >>conftest.$ac_ext <<_ACEOF
25719/* end confdefs.h. */
25720#include <sys/types.h>
25721#include <$ac_cv_struct_tm>
25722
25723
25724int
25725main ()
25726{
25727static struct tm ac_aggr;
25728if (ac_aggr.tm_zone)
25729return 0;
25730 ;
25731 return 0;
25732}
25733_ACEOF
25734rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025735if { (ac_try="$ac_compile"
25736case "(($ac_try" in
25737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25738 *) ac_try_echo=$ac_try;;
25739esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025741 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025742 ac_status=$?
25743 grep -v '^ *+' conftest.er1 >conftest.err
25744 rm -f conftest.er1
25745 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025747 (exit $ac_status); } && {
25748 test -z "$ac_c_werror_flag" ||
25749 test ! -s conftest.err
25750 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025751 ac_cv_member_struct_tm_tm_zone=yes
25752else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025753 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025754sed 's/^/| /' conftest.$ac_ext >&5
25755
Martin v. Löwiseba40652007-08-30 20:10:57 +000025756 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025757/* confdefs.h. */
25758_ACEOF
25759cat confdefs.h >>conftest.$ac_ext
25760cat >>conftest.$ac_ext <<_ACEOF
25761/* end confdefs.h. */
25762#include <sys/types.h>
25763#include <$ac_cv_struct_tm>
25764
25765
25766int
25767main ()
25768{
25769static struct tm ac_aggr;
25770if (sizeof ac_aggr.tm_zone)
25771return 0;
25772 ;
25773 return 0;
25774}
25775_ACEOF
25776rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025777if { (ac_try="$ac_compile"
25778case "(($ac_try" in
25779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25780 *) ac_try_echo=$ac_try;;
25781esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025783 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025784 ac_status=$?
25785 grep -v '^ *+' conftest.er1 >conftest.err
25786 rm -f conftest.er1
25787 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025789 (exit $ac_status); } && {
25790 test -z "$ac_c_werror_flag" ||
25791 test ! -s conftest.err
25792 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025793 ac_cv_member_struct_tm_tm_zone=yes
25794else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025795 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025796sed 's/^/| /' conftest.$ac_ext >&5
25797
Martin v. Löwiseba40652007-08-30 20:10:57 +000025798 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025799fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025800
25801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025802fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025803
25804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025805fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025806{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25807echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
25808if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025809
25810cat >>confdefs.h <<_ACEOF
25811#define HAVE_STRUCT_TM_TM_ZONE 1
25812_ACEOF
25813
25814
25815fi
25816
25817if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25818
25819cat >>confdefs.h <<\_ACEOF
25820#define HAVE_TM_ZONE 1
25821_ACEOF
25822
25823else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025824 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25825echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025826if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025827 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000025828else
25829 cat >conftest.$ac_ext <<_ACEOF
25830/* confdefs.h. */
25831_ACEOF
25832cat confdefs.h >>conftest.$ac_ext
25833cat >>conftest.$ac_ext <<_ACEOF
25834/* end confdefs.h. */
25835#include <time.h>
25836
25837int
25838main ()
25839{
25840#ifndef tzname
25841 (void) tzname;
25842#endif
25843
25844 ;
25845 return 0;
25846}
25847_ACEOF
25848rm -f conftest.$ac_objext
25849if { (ac_try="$ac_compile"
25850case "(($ac_try" in
25851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25852 *) ac_try_echo=$ac_try;;
25853esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025855 (eval "$ac_compile") 2>conftest.er1
25856 ac_status=$?
25857 grep -v '^ *+' conftest.er1 >conftest.err
25858 rm -f conftest.er1
25859 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025861 (exit $ac_status); } && {
25862 test -z "$ac_c_werror_flag" ||
25863 test ! -s conftest.err
25864 } && test -s conftest.$ac_objext; then
25865 ac_cv_have_decl_tzname=yes
25866else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025867 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025868sed 's/^/| /' conftest.$ac_ext >&5
25869
25870 ac_cv_have_decl_tzname=no
25871fi
25872
25873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25874fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025875{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25876echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
25877if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025878
25879cat >>confdefs.h <<_ACEOF
25880#define HAVE_DECL_TZNAME 1
25881_ACEOF
25882
25883
25884else
25885 cat >>confdefs.h <<_ACEOF
25886#define HAVE_DECL_TZNAME 0
25887_ACEOF
25888
25889
25890fi
25891
25892
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025893 { echo "$as_me:$LINENO: checking for tzname" >&5
25894echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025895if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025896 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025897else
25898 cat >conftest.$ac_ext <<_ACEOF
25899/* confdefs.h. */
25900_ACEOF
25901cat confdefs.h >>conftest.$ac_ext
25902cat >>conftest.$ac_ext <<_ACEOF
25903/* end confdefs.h. */
25904#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000025905#if !HAVE_DECL_TZNAME
25906extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025907#endif
25908
25909int
25910main ()
25911{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025912return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025913 ;
25914 return 0;
25915}
25916_ACEOF
25917rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025918if { (ac_try="$ac_link"
25919case "(($ac_try" in
25920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25921 *) ac_try_echo=$ac_try;;
25922esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025924 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025925 ac_status=$?
25926 grep -v '^ *+' conftest.er1 >conftest.err
25927 rm -f conftest.er1
25928 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025930 (exit $ac_status); } && {
25931 test -z "$ac_c_werror_flag" ||
25932 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025933 } && test -s conftest$ac_exeext &&
25934 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000025935 ac_cv_var_tzname=yes
25936else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025937 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025938sed 's/^/| /' conftest.$ac_ext >&5
25939
Martin v. Löwiseba40652007-08-30 20:10:57 +000025940 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025942
25943rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025944 conftest$ac_exeext conftest.$ac_ext
25945fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025946{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25947echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025948 if test $ac_cv_var_tzname = yes; then
25949
25950cat >>confdefs.h <<\_ACEOF
25951#define HAVE_TZNAME 1
25952_ACEOF
25953
25954 fi
25955fi
25956
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025957
Martin v. Löwis1d459062005-03-14 21:23:33 +000025958# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025959{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25960echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025961if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025962 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025963else
25964
25965if test "$cross_compiling" = yes; then
25966 ac_cv_working_tzset=no
25967else
25968 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025969/* confdefs.h. */
25970_ACEOF
25971cat confdefs.h >>conftest.$ac_ext
25972cat >>conftest.$ac_ext <<_ACEOF
25973/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025974
25975#include <stdlib.h>
25976#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025977#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025978
25979#if HAVE_TZNAME
25980extern char *tzname[];
25981#endif
25982
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025983int main()
25984{
Brett Cannon18367812003-09-19 00:59:16 +000025985 /* Note that we need to ensure that not only does tzset(3)
25986 do 'something' with localtime, but it works as documented
25987 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025988 This includes making sure that tzname is set properly if
25989 tm->tm_zone does not exist since it is the alternative way
25990 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025991
25992 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025993 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025994 */
25995
Martin v. Löwis1d459062005-03-14 21:23:33 +000025996 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025997 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25998
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025999 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026000 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026001 if (localtime(&groundhogday)->tm_hour != 0)
26002 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026003#if HAVE_TZNAME
26004 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26005 if (strcmp(tzname[0], "UTC") ||
26006 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26007 exit(1);
26008#endif
Brett Cannon18367812003-09-19 00:59:16 +000026009
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026010 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026011 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026012 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026013 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026014#if HAVE_TZNAME
26015 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26016 exit(1);
26017#endif
Brett Cannon18367812003-09-19 00:59:16 +000026018
26019 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26020 tzset();
26021 if (localtime(&groundhogday)->tm_hour != 11)
26022 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026023#if HAVE_TZNAME
26024 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26025 exit(1);
26026#endif
26027
26028#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026029 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26030 exit(1);
26031 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26032 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026033#endif
Brett Cannon18367812003-09-19 00:59:16 +000026034
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026035 exit(0);
26036}
26037
26038_ACEOF
26039rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026040if { (ac_try="$ac_link"
26041case "(($ac_try" in
26042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26043 *) ac_try_echo=$ac_try;;
26044esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026046 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026047 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026049 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026050 { (case "(($ac_try" in
26051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26052 *) ac_try_echo=$ac_try;;
26053esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026055 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026056 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026058 (exit $ac_status); }; }; then
26059 ac_cv_working_tzset=yes
26060else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026061 echo "$as_me: program exited with status $ac_status" >&5
26062echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026063sed 's/^/| /' conftest.$ac_ext >&5
26064
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026065( exit $ac_status )
26066ac_cv_working_tzset=no
26067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026068rm -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 +000026069fi
26070
Martin v. Löwiseba40652007-08-30 20:10:57 +000026071
26072fi
26073
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026074{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26075echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026076if test "$ac_cv_working_tzset" = yes
26077then
26078
26079cat >>confdefs.h <<\_ACEOF
26080#define HAVE_WORKING_TZSET 1
26081_ACEOF
26082
26083fi
26084
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026085# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026086{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26087echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026088if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026089 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026090else
26091 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026092/* confdefs.h. */
26093_ACEOF
26094cat confdefs.h >>conftest.$ac_ext
26095cat >>conftest.$ac_ext <<_ACEOF
26096/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026097#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026098int
26099main ()
26100{
26101
26102struct stat st;
26103st.st_mtim.tv_nsec = 1;
26104
26105 ;
26106 return 0;
26107}
26108_ACEOF
26109rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026110if { (ac_try="$ac_compile"
26111case "(($ac_try" in
26112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26113 *) ac_try_echo=$ac_try;;
26114esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026116 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026117 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026118 grep -v '^ *+' conftest.er1 >conftest.err
26119 rm -f conftest.er1
26120 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026122 (exit $ac_status); } && {
26123 test -z "$ac_c_werror_flag" ||
26124 test ! -s conftest.err
26125 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026126 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026127else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026128 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026129sed 's/^/| /' conftest.$ac_ext >&5
26130
Martin v. Löwiseba40652007-08-30 20:10:57 +000026131 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026132fi
26133
Martin v. Löwiseba40652007-08-30 20:10:57 +000026134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26135fi
26136
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026137{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26138echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026139if test "$ac_cv_stat_tv_nsec" = yes
26140then
26141
26142cat >>confdefs.h <<\_ACEOF
26143#define HAVE_STAT_TV_NSEC 1
26144_ACEOF
26145
26146fi
26147
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026148# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026149{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26150echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026151if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026152 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026153else
26154 cat >conftest.$ac_ext <<_ACEOF
26155/* confdefs.h. */
26156_ACEOF
26157cat confdefs.h >>conftest.$ac_ext
26158cat >>conftest.$ac_ext <<_ACEOF
26159/* end confdefs.h. */
26160#include <sys/stat.h>
26161int
26162main ()
26163{
26164
26165struct stat st;
26166st.st_mtimespec.tv_nsec = 1;
26167
26168 ;
26169 return 0;
26170}
26171_ACEOF
26172rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026173if { (ac_try="$ac_compile"
26174case "(($ac_try" in
26175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26176 *) ac_try_echo=$ac_try;;
26177esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026180 ac_status=$?
26181 grep -v '^ *+' conftest.er1 >conftest.err
26182 rm -f conftest.er1
26183 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026185 (exit $ac_status); } && {
26186 test -z "$ac_c_werror_flag" ||
26187 test ! -s conftest.err
26188 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026189 ac_cv_stat_tv_nsec2=yes
26190else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026191 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026192sed 's/^/| /' conftest.$ac_ext >&5
26193
Martin v. Löwiseba40652007-08-30 20:10:57 +000026194 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026195fi
26196
Martin v. Löwiseba40652007-08-30 20:10:57 +000026197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26198fi
26199
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026200{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26201echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026202if test "$ac_cv_stat_tv_nsec2" = yes
26203then
26204
26205cat >>confdefs.h <<\_ACEOF
26206#define HAVE_STAT_TV_NSEC2 1
26207_ACEOF
26208
26209fi
26210
Jack Jansen666b1e72001-10-31 12:11:48 +000026211# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026212{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26213echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026214if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026215 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026216else
Martin v. Löwis11437992002-04-12 09:54:03 +000026217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026218/* confdefs.h. */
26219_ACEOF
26220cat confdefs.h >>conftest.$ac_ext
26221cat >>conftest.$ac_ext <<_ACEOF
26222/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026223#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026224int
26225main ()
26226{
Jack Jansen666b1e72001-10-31 12:11:48 +000026227
26228 int rtn;
26229 rtn = mvwdelch(0,0,0);
26230
Martin v. Löwis11437992002-04-12 09:54:03 +000026231 ;
26232 return 0;
26233}
26234_ACEOF
26235rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026236if { (ac_try="$ac_compile"
26237case "(($ac_try" in
26238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26239 *) ac_try_echo=$ac_try;;
26240esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026242 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026244 grep -v '^ *+' conftest.er1 >conftest.err
26245 rm -f conftest.er1
26246 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026248 (exit $ac_status); } && {
26249 test -z "$ac_c_werror_flag" ||
26250 test ! -s conftest.err
26251 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026252 ac_cv_mvwdelch_is_expression=yes
26253else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026254 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026255sed 's/^/| /' conftest.$ac_ext >&5
26256
Martin v. Löwiseba40652007-08-30 20:10:57 +000026257 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026258fi
26259
Martin v. Löwiseba40652007-08-30 20:10:57 +000026260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26261fi
26262
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026263{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26264echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026265
26266if test "$ac_cv_mvwdelch_is_expression" = yes
26267then
Martin v. Löwis11437992002-04-12 09:54:03 +000026268
26269cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026270#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026271_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026272
26273fi
26274
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026275{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26276echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026277if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026278 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026279else
Martin v. Löwis11437992002-04-12 09:54:03 +000026280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026281/* confdefs.h. */
26282_ACEOF
26283cat confdefs.h >>conftest.$ac_ext
26284cat >>conftest.$ac_ext <<_ACEOF
26285/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026286#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026287int
26288main ()
26289{
Jack Jansen666b1e72001-10-31 12:11:48 +000026290
26291 WINDOW *w;
26292 w->_flags = 0;
26293
Martin v. Löwis11437992002-04-12 09:54:03 +000026294 ;
26295 return 0;
26296}
26297_ACEOF
26298rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026299if { (ac_try="$ac_compile"
26300case "(($ac_try" in
26301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26302 *) ac_try_echo=$ac_try;;
26303esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026305 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026306 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026307 grep -v '^ *+' conftest.er1 >conftest.err
26308 rm -f conftest.er1
26309 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026311 (exit $ac_status); } && {
26312 test -z "$ac_c_werror_flag" ||
26313 test ! -s conftest.err
26314 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026315 ac_cv_window_has_flags=yes
26316else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026318sed 's/^/| /' conftest.$ac_ext >&5
26319
Martin v. Löwiseba40652007-08-30 20:10:57 +000026320 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026321fi
26322
Martin v. Löwiseba40652007-08-30 20:10:57 +000026323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26324fi
26325
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026326{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26327echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026328
Jack Jansen666b1e72001-10-31 12:11:48 +000026329
26330if test "$ac_cv_window_has_flags" = yes
26331then
Martin v. Löwis11437992002-04-12 09:54:03 +000026332
26333cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026334#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026335_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026336
26337fi
26338
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026339{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26340echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026341cat >conftest.$ac_ext <<_ACEOF
26342/* confdefs.h. */
26343_ACEOF
26344cat confdefs.h >>conftest.$ac_ext
26345cat >>conftest.$ac_ext <<_ACEOF
26346/* end confdefs.h. */
26347#include <curses.h>
26348int
26349main ()
26350{
26351void *x=is_term_resized
26352 ;
26353 return 0;
26354}
26355_ACEOF
26356rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026357if { (ac_try="$ac_compile"
26358case "(($ac_try" in
26359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26360 *) ac_try_echo=$ac_try;;
26361esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026363 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026364 ac_status=$?
26365 grep -v '^ *+' conftest.er1 >conftest.err
26366 rm -f conftest.er1
26367 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026369 (exit $ac_status); } && {
26370 test -z "$ac_c_werror_flag" ||
26371 test ! -s conftest.err
26372 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026373
26374cat >>confdefs.h <<\_ACEOF
26375#define HAVE_CURSES_IS_TERM_RESIZED 1
26376_ACEOF
26377
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026378 { echo "$as_me:$LINENO: result: yes" >&5
26379echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026380else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026381 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026382sed 's/^/| /' conftest.$ac_ext >&5
26383
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026384 { echo "$as_me:$LINENO: result: no" >&5
26385echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026386
26387fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026388
Martin v. Löwiseba40652007-08-30 20:10:57 +000026389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26390
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026391{ echo "$as_me:$LINENO: checking for resize_term" >&5
26392echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026393cat >conftest.$ac_ext <<_ACEOF
26394/* confdefs.h. */
26395_ACEOF
26396cat confdefs.h >>conftest.$ac_ext
26397cat >>conftest.$ac_ext <<_ACEOF
26398/* end confdefs.h. */
26399#include <curses.h>
26400int
26401main ()
26402{
26403void *x=resize_term
26404 ;
26405 return 0;
26406}
26407_ACEOF
26408rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026409if { (ac_try="$ac_compile"
26410case "(($ac_try" in
26411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26412 *) ac_try_echo=$ac_try;;
26413esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026415 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026416 ac_status=$?
26417 grep -v '^ *+' conftest.er1 >conftest.err
26418 rm -f conftest.er1
26419 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026421 (exit $ac_status); } && {
26422 test -z "$ac_c_werror_flag" ||
26423 test ! -s conftest.err
26424 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026425
26426cat >>confdefs.h <<\_ACEOF
26427#define HAVE_CURSES_RESIZE_TERM 1
26428_ACEOF
26429
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026430 { echo "$as_me:$LINENO: result: yes" >&5
26431echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026432else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026433 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026434sed 's/^/| /' conftest.$ac_ext >&5
26435
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026436 { echo "$as_me:$LINENO: result: no" >&5
26437echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026438
26439fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026440
Martin v. Löwiseba40652007-08-30 20:10:57 +000026441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26442
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026443{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26444echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026445cat >conftest.$ac_ext <<_ACEOF
26446/* confdefs.h. */
26447_ACEOF
26448cat confdefs.h >>conftest.$ac_ext
26449cat >>conftest.$ac_ext <<_ACEOF
26450/* end confdefs.h. */
26451#include <curses.h>
26452int
26453main ()
26454{
26455void *x=resizeterm
26456 ;
26457 return 0;
26458}
26459_ACEOF
26460rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026461if { (ac_try="$ac_compile"
26462case "(($ac_try" in
26463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26464 *) ac_try_echo=$ac_try;;
26465esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026467 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026468 ac_status=$?
26469 grep -v '^ *+' conftest.er1 >conftest.err
26470 rm -f conftest.er1
26471 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026473 (exit $ac_status); } && {
26474 test -z "$ac_c_werror_flag" ||
26475 test ! -s conftest.err
26476 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026477
26478cat >>confdefs.h <<\_ACEOF
26479#define HAVE_CURSES_RESIZETERM 1
26480_ACEOF
26481
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026482 { echo "$as_me:$LINENO: result: yes" >&5
26483echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026484else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026485 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026486sed 's/^/| /' conftest.$ac_ext >&5
26487
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026488 { echo "$as_me:$LINENO: result: no" >&5
26489echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026490
26491fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026492
Martin v. Löwiseba40652007-08-30 20:10:57 +000026493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26494
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026495{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26496echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026497
26498if test -r /dev/ptmx
26499then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026500 { echo "$as_me:$LINENO: result: yes" >&5
26501echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026502
26503cat >>confdefs.h <<\_ACEOF
26504#define HAVE_DEV_PTMX 1
26505_ACEOF
26506
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026507else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026508 { echo "$as_me:$LINENO: result: no" >&5
26509echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026510fi
26511
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026512{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26513echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026514
26515if test -r /dev/ptc
26516then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026517 { echo "$as_me:$LINENO: result: yes" >&5
26518echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026519
26520cat >>confdefs.h <<\_ACEOF
26521#define HAVE_DEV_PTC 1
26522_ACEOF
26523
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026524else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026525 { echo "$as_me:$LINENO: result: no" >&5
26526echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026527fi
26528
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026529{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26530echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026531if test "${ac_cv_have_size_t_format+set}" = set; then
26532 echo $ECHO_N "(cached) $ECHO_C" >&6
26533else
26534 if test "$cross_compiling" = yes; then
26535 ac_cv_have_size_t_format=no
Brett Cannon09d12362006-05-11 05:11:33 +000026536else
26537 cat >conftest.$ac_ext <<_ACEOF
26538/* confdefs.h. */
26539_ACEOF
26540cat confdefs.h >>conftest.$ac_ext
26541cat >>conftest.$ac_ext <<_ACEOF
26542/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026543
Brett Cannon09d12362006-05-11 05:11:33 +000026544#include <stdio.h>
26545#include <stddef.h>
26546#include <string.h>
26547
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000026548#ifdef HAVE_SYS_TYPES_H
26549#include <sys/types.h>
26550#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000026551
26552#ifdef HAVE_SSIZE_T
26553typedef ssize_t Py_ssize_t;
26554#elif SIZEOF_VOID_P == SIZEOF_LONG
26555typedef long Py_ssize_t;
26556#else
26557typedef int Py_ssize_t;
26558#endif
Brett Cannon09d12362006-05-11 05:11:33 +000026559
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000026560int main()
26561{
26562 char buffer[256];
26563
Brett Cannon09d12362006-05-11 05:11:33 +000026564 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26565 return 1;
26566
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000026567 if (strcmp(buffer, "123"))
26568 return 1;
26569
26570 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26571 return 1;
26572
26573 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000026574 return 1;
26575
26576 return 0;
26577}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026578
Brett Cannon09d12362006-05-11 05:11:33 +000026579_ACEOF
26580rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026581if { (ac_try="$ac_link"
26582case "(($ac_try" in
26583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26584 *) ac_try_echo=$ac_try;;
26585esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026587 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000026588 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000026590 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026591 { (case "(($ac_try" in
26592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26593 *) ac_try_echo=$ac_try;;
26594esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026596 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000026597 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000026599 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026600 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026601else
26602 echo "$as_me: program exited with status $ac_status" >&5
26603echo "$as_me: failed program was:" >&5
26604sed 's/^/| /' conftest.$ac_ext >&5
26605
26606( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026607ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026608fi
26609rm -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 +000026610fi
26611
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026612
26613
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026614fi
26615
26616{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26617echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
26618if test $ac_cv_have_size_t_format = yes
26619then
26620
26621cat >>confdefs.h <<\_ACEOF
26622#define PY_FORMAT_SIZE_T "z"
26623_ACEOF
26624
26625fi
26626
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026627{ echo "$as_me:$LINENO: checking for socklen_t" >&5
26628echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026629if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026630 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026631else
Martin v. Löwis11437992002-04-12 09:54:03 +000026632 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026633/* confdefs.h. */
26634_ACEOF
26635cat confdefs.h >>conftest.$ac_ext
26636cat >>conftest.$ac_ext <<_ACEOF
26637/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026638
26639#ifdef HAVE_SYS_TYPES_H
26640#include <sys/types.h>
26641#endif
26642#ifdef HAVE_SYS_SOCKET_H
26643#include <sys/socket.h>
26644#endif
26645
26646
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026647typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000026648int
26649main ()
26650{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026651if ((ac__type_new_ *) 0)
26652 return 0;
26653if (sizeof (ac__type_new_))
26654 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026655 ;
26656 return 0;
26657}
26658_ACEOF
26659rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026660if { (ac_try="$ac_compile"
26661case "(($ac_try" in
26662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26663 *) ac_try_echo=$ac_try;;
26664esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026666 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026668 grep -v '^ *+' conftest.er1 >conftest.err
26669 rm -f conftest.er1
26670 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026672 (exit $ac_status); } && {
26673 test -z "$ac_c_werror_flag" ||
26674 test ! -s conftest.err
26675 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026676 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000026677else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026679sed 's/^/| /' conftest.$ac_ext >&5
26680
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026681 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000026682fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026683
26684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026685fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026686{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26687echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
26688if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026689 :
26690else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026691
Martin v. Löwis01c04012002-11-11 14:58:44 +000026692cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026693#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026694_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026695
26696fi
26697
Michael W. Hudson54241132001-12-07 15:38:26 +000026698
Michael W. Hudson54241132001-12-07 15:38:26 +000026699
26700
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026701for h in `(cd $srcdir;echo Python/thread_*.h)`
26702do
26703 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26704done
26705
Michael W. Hudson54241132001-12-07 15:38:26 +000026706
Neal Norwitzd24499d2005-12-18 21:36:39 +000026707SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026708{ echo "$as_me:$LINENO: checking for build directories" >&5
26709echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026710for dir in $SRCDIRS; do
26711 if test ! -d $dir; then
26712 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026713 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026714done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026715{ echo "$as_me:$LINENO: result: done" >&5
26716echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026717
Guido van Rossum627b2d71993-12-24 10:39:16 +000026718# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000026719ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026720
Martin v. Löwis11437992002-04-12 09:54:03 +000026721cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026722# This file is a shell script that caches the results of configure
26723# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026724# scripts and configure runs, see configure's option --config-cache.
26725# It is not useful on other systems. If it contains results you don't
26726# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026727#
Martin v. Löwis11437992002-04-12 09:54:03 +000026728# config.status only pays attention to the cache file if you give it
26729# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026730#
Skip Montanaro6dead952003-09-25 14:50:04 +000026731# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026732# loading this file, other *unset* `ac_cv_foo' will be assigned the
26733# following values.
26734
26735_ACEOF
26736
Guido van Rossumf78abae1997-01-21 22:02:36 +000026737# The following way of writing the cache mishandles newlines in values,
26738# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026739# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026740# Ultrix sh set writes to stderr and can't be redirected directly,
26741# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026742(
26743 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26744 eval ac_val=\$$ac_var
26745 case $ac_val in #(
26746 *${as_nl}*)
26747 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026748 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
26749echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026750 esac
26751 case $ac_var in #(
26752 _ | IFS | as_nl) ;; #(
26753 *) $as_unset $ac_var ;;
26754 esac ;;
26755 esac
26756 done
26757
Martin v. Löwis11437992002-04-12 09:54:03 +000026758 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026759 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26760 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026761 # `set' does not quote correctly, so add quotes (double-quote
26762 # substitution turns \\\\ into \\, and sed turns \\ into \).
26763 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026764 "s/'/'\\\\''/g;
26765 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000026766 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000026767 *)
26768 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026769 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000026770 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026771 esac |
26772 sort
26773) |
Martin v. Löwis11437992002-04-12 09:54:03 +000026774 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000026775 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000026776 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000026777 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000026778 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26779 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000026780 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26781 :end' >>confcache
26782if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26783 if test -w "$cache_file"; then
26784 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026785 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
26786echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026787 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026788 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026789 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26790echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026791 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026792fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026793rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000026794
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026795test "x$prefix" = xNONE && prefix=$ac_default_prefix
26796# Let make expand exec_prefix.
26797test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000026798
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026799DEFS=-DHAVE_CONFIG_H
26800
Skip Montanaro6dead952003-09-25 14:50:04 +000026801ac_libobjs=
26802ac_ltlibobjs=
26803for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26804 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026805 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026806 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000026807 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26808 # will be set to the directory where LIBOBJS objects are built.
26809 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26810 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000026811done
26812LIBOBJS=$ac_libobjs
26813
26814LTLIBOBJS=$ac_ltlibobjs
26815
26816
Martin v. Löwis11437992002-04-12 09:54:03 +000026817
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026818: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000026819ac_clean_files_save=$ac_clean_files
26820ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026821{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26822echo "$as_me: creating $CONFIG_STATUS" >&6;}
26823cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026824#! $SHELL
26825# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026826# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026827# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000026828# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026829
Martin v. Löwis11437992002-04-12 09:54:03 +000026830debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000026831ac_cs_recheck=false
26832ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026833SHELL=\${CONFIG_SHELL-$SHELL}
26834_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000026835
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026836cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026837## --------------------- ##
26838## M4sh Initialization. ##
26839## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026840
Martin v. Löwiseba40652007-08-30 20:10:57 +000026841# Be more Bourne compatible
26842DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026843if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26844 emulate sh
26845 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026846 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026847 # is contrary to our usage. Disable this feature.
26848 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026849 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000026850else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026851 case `(set -o) 2>/dev/null` in
26852 *posix*) set -o posix ;;
26853esac
26854
Martin v. Löwis11437992002-04-12 09:54:03 +000026855fi
Michael W. Hudson54241132001-12-07 15:38:26 +000026856
Skip Montanaro6dead952003-09-25 14:50:04 +000026857
Martin v. Löwis11437992002-04-12 09:54:03 +000026858
26859
Martin v. Löwiseba40652007-08-30 20:10:57 +000026860# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026861# Avoid depending upon Character Ranges.
26862as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26863as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26864as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26865as_cr_digits='0123456789'
26866as_cr_alnum=$as_cr_Letters$as_cr_digits
26867
26868# The user is always right.
26869if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026870 echo "#! /bin/sh" >conf$$.sh
26871 echo "exit 0" >>conf$$.sh
26872 chmod +x conf$$.sh
26873 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26874 PATH_SEPARATOR=';'
26875 else
26876 PATH_SEPARATOR=:
26877 fi
26878 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026879fi
26880
Martin v. Löwiseba40652007-08-30 20:10:57 +000026881# Support unset when possible.
26882if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26883 as_unset=unset
26884else
26885 as_unset=false
26886fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026887
Martin v. Löwiseba40652007-08-30 20:10:57 +000026888
26889# IFS
26890# We need space, tab and new line, in precisely that order. Quoting is
26891# there to prevent editors from complaining about space-tab.
26892# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26893# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026894as_nl='
26895'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026896IFS=" "" $as_nl"
26897
26898# Find who we are. Look in the path if we contain no directory separator.
26899case $0 in
26900 *[\\/]* ) as_myself=$0 ;;
26901 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026902for as_dir in $PATH
26903do
26904 IFS=$as_save_IFS
26905 test -z "$as_dir" && as_dir=.
26906 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26907done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026908IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026909
Martin v. Löwiseba40652007-08-30 20:10:57 +000026910 ;;
26911esac
26912# We did not find ourselves, most probably we were run as `sh COMMAND'
26913# in which case we are not to be found in the path.
26914if test "x$as_myself" = x; then
26915 as_myself=$0
26916fi
26917if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026918 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000026919 { (exit 1); exit 1; }
26920fi
26921
26922# Work around bugs in pre-3.0 UWIN ksh.
26923for as_var in ENV MAIL MAILPATH
26924do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26925done
26926PS1='$ '
26927PS2='> '
26928PS4='+ '
26929
26930# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026931for as_var in \
26932 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26933 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26934 LC_TELEPHONE LC_TIME
26935do
26936 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26937 eval $as_var=C; export $as_var
26938 else
26939 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26940 fi
26941done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026942
26943# Required to use basename.
26944if expr a : '\(a\)' >/dev/null 2>&1 &&
26945 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26946 as_expr=expr
26947else
26948 as_expr=false
26949fi
26950
26951if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26952 as_basename=basename
26953else
26954 as_basename=false
26955fi
26956
26957
26958# Name of the executable.
26959as_me=`$as_basename -- "$0" ||
26960$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26961 X"$0" : 'X\(//\)$' \| \
26962 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026963echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026964 sed '/^.*\/\([^/][^/]*\)\/*$/{
26965 s//\1/
26966 q
26967 }
26968 /^X\/\(\/\/\)$/{
26969 s//\1/
26970 q
26971 }
26972 /^X\/\(\/\).*/{
26973 s//\1/
26974 q
26975 }
26976 s/.*/./; q'`
26977
26978# CDPATH.
26979$as_unset CDPATH
26980
26981
26982
Martin v. Löwis11437992002-04-12 09:54:03 +000026983 as_lineno_1=$LINENO
26984 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026985 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000026986 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026987
Martin v. Löwis11437992002-04-12 09:54:03 +000026988 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26989 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000026990 # line-number line after each line using $LINENO; the second 'sed'
26991 # does the real work. The second script uses 'N' to pair each
26992 # line-number line with the line containing $LINENO, and appends
26993 # trailing '-' during substitution so that $LINENO is not a special
26994 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000026995 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000026996 # scripts with optimization help from Paolo Bonzini. Blame Lee
26997 # E. McMahon (1931-1989) for sed's syntax. :-)
26998 sed -n '
26999 p
27000 /[$]LINENO/=
27001 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027002 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027003 s/[$]LINENO.*/&-/
27004 t lineno
27005 b
27006 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027007 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000027008 :loop
27009 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027010 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000027011 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027012 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000027013 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027014 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027015 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027016
Martin v. Löwis11437992002-04-12 09:54:03 +000027017 # Don't try to exec as it changes $[0], causing all sort of problems
27018 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000027019 # original and so on. Autoconf is especially sensitive to this).
27020 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027021 # Exit status is that of the last command.
27022 exit
27023}
27024
27025
Martin v. Löwiseba40652007-08-30 20:10:57 +000027026if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27027 as_dirname=dirname
27028else
27029 as_dirname=false
27030fi
27031
27032ECHO_C= ECHO_N= ECHO_T=
27033case `echo -n x` in
27034-n*)
27035 case `echo 'x\c'` in
27036 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27037 *) ECHO_C='\c';;
27038 esac;;
27039*)
27040 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027041esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027042
Martin v. Löwiseba40652007-08-30 20:10:57 +000027043if expr a : '\(a\)' >/dev/null 2>&1 &&
27044 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027045 as_expr=expr
27046else
27047 as_expr=false
27048fi
27049
27050rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000027051if test -d conf$$.dir; then
27052 rm -f conf$$.dir/conf$$.file
27053else
27054 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027055 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000027056fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027057echo >conf$$.file
27058if ln -s conf$$.file conf$$ 2>/dev/null; then
27059 as_ln_s='ln -s'
27060 # ... but there are two gotchas:
27061 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27062 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27063 # In both cases, we have to default to `cp -p'.
27064 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027065 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027066elif ln conf$$.file conf$$ 2>/dev/null; then
27067 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027068else
27069 as_ln_s='cp -p'
27070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027071rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27072rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027073
Skip Montanaro6dead952003-09-25 14:50:04 +000027074if mkdir -p . 2>/dev/null; then
27075 as_mkdir_p=:
27076else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027077 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027078 as_mkdir_p=false
27079fi
27080
Martin v. Löwiseba40652007-08-30 20:10:57 +000027081if test -x / >/dev/null 2>&1; then
27082 as_test_x='test -x'
27083else
27084 if ls -dL / >/dev/null 2>&1; then
27085 as_ls_L_option=L
27086 else
27087 as_ls_L_option=
27088 fi
27089 as_test_x='
27090 eval sh -c '\''
27091 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027092 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000027093 else
27094 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027095 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027096 esac;
27097 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27098 ???[sx]*):;;*)false;;esac;fi
27099 '\'' sh
27100 '
27101fi
27102as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027103
27104# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027105as_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 +000027106
27107# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027108as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027109
27110
Martin v. Löwis11437992002-04-12 09:54:03 +000027111exec 6>&1
27112
Martin v. Löwiseba40652007-08-30 20:10:57 +000027113# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027114# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000027115# values after options handling.
27116ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000027117This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027118generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027119
27120 CONFIG_FILES = $CONFIG_FILES
27121 CONFIG_HEADERS = $CONFIG_HEADERS
27122 CONFIG_LINKS = $CONFIG_LINKS
27123 CONFIG_COMMANDS = $CONFIG_COMMANDS
27124 $ $0 $@
27125
Martin v. Löwiseba40652007-08-30 20:10:57 +000027126on `(hostname || uname -n) 2>/dev/null | sed 1q`
27127"
27128
Martin v. Löwis11437992002-04-12 09:54:03 +000027129_ACEOF
27130
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027131cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027132# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000027133config_files="$ac_config_files"
27134config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027135
Martin v. Löwiseba40652007-08-30 20:10:57 +000027136_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027137
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027138cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027139ac_cs_usage="\
27140\`$as_me' instantiates files from templates according to the
27141current configuration.
27142
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027143Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027144
27145 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000027146 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027147 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027148 -d, --debug don't remove temporary files
27149 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027150 --file=FILE[:TEMPLATE]
27151 instantiate the configuration file FILE
27152 --header=FILE[:TEMPLATE]
27153 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027154
27155Configuration files:
27156$config_files
27157
27158Configuration headers:
27159$config_headers
27160
27161Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000027162
Martin v. Löwiseba40652007-08-30 20:10:57 +000027163_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027164cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027165ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000027166python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027167configured by $0, generated by GNU Autoconf 2.61,
27168 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027169
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027170Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027171This config.status script is free software; the Free Software Foundation
27172gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000027173
27174ac_pwd='$ac_pwd'
27175srcdir='$srcdir'
27176INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027177_ACEOF
27178
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027179cat >>$CONFIG_STATUS <<\_ACEOF
27180# If no file are specified by the user, then we need to provide default
27181# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027182ac_need_defaults=:
27183while test $# != 0
27184do
27185 case $1 in
27186 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000027187 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27188 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027189 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027190 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027191 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027192 ac_option=$1
27193 ac_optarg=$2
27194 ac_shift=shift
27195 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027196 esac
27197
Skip Montanaro6dead952003-09-25 14:50:04 +000027198 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027199 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027200 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27201 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027202 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027203 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027204 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027205 debug=: ;;
27206 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027207 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027208 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027209 ac_need_defaults=false;;
27210 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027211 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027212 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027213 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027214 --he | --h)
27215 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027216 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000027217Try \`$0 --help' for more information." >&2
27218 { (exit 1); exit 1; }; };;
27219 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027220 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027221 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27222 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27223 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027224
27225 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027226 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000027227Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027228 { (exit 1); exit 1; }; } ;;
27229
Martin v. Löwiseba40652007-08-30 20:10:57 +000027230 *) ac_config_targets="$ac_config_targets $1"
27231 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027232
27233 esac
27234 shift
27235done
27236
Skip Montanaro6dead952003-09-25 14:50:04 +000027237ac_configure_extra_args=
27238
27239if $ac_cs_silent; then
27240 exec 6>/dev/null
27241 ac_configure_extra_args="$ac_configure_extra_args --silent"
27242fi
27243
27244_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027245cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027246if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027247 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27248 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000027249 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027250 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027251fi
27252
Martin v. Löwis11437992002-04-12 09:54:03 +000027253_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027254cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027255exec 5>>config.log
27256{
27257 echo
27258 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27259## Running $as_me. ##
27260_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027261 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027262} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027263
Martin v. Löwiseba40652007-08-30 20:10:57 +000027264_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027265cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027266_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027267
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027268cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027269
27270# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027271for ac_config_target in $ac_config_targets
27272do
Martin v. Löwiseba40652007-08-30 20:10:57 +000027273 case $ac_config_target in
27274 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27275 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27276 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
27277 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000027278 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27279 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027280 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27281 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027282 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027283
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027284 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27285echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027286 { (exit 1); exit 1; }; };;
27287 esac
27288done
27289
Martin v. Löwiseba40652007-08-30 20:10:57 +000027290
Martin v. Löwis11437992002-04-12 09:54:03 +000027291# If the user did not use the arguments to specify the items to instantiate,
27292# then the envvar interface is used. Set only those that are not.
27293# We use the long form for the default assignment because of an extremely
27294# bizarre bug on SunOS 4.1.3.
27295if $ac_need_defaults; then
27296 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27297 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27298fi
27299
Skip Montanaro6dead952003-09-25 14:50:04 +000027300# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000027301# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027302# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027303# Hook for its removal unless debugging.
27304# Note that there is a small window in which the directory will not be cleaned:
27305# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027306$debug ||
27307{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027308 tmp=
27309 trap 'exit_status=$?
27310 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27311' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027312 trap '{ (exit 1); exit 1; }' 1 2 13 15
27313}
Martin v. Löwis11437992002-04-12 09:54:03 +000027314# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027315
Martin v. Löwis11437992002-04-12 09:54:03 +000027316{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027317 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027318 test -n "$tmp" && test -d "$tmp"
27319} ||
27320{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027321 tmp=./conf$$-$RANDOM
27322 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027323} ||
27324{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027325 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027326 { (exit 1); exit 1; }
27327}
27328
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027329#
27330# Set up the sed scripts for CONFIG_FILES section.
27331#
27332
27333# No need to generate the scripts if there are no CONFIG_FILES.
27334# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000027335if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027336
27337_ACEOF
27338
Martin v. Löwiseba40652007-08-30 20:10:57 +000027339
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027340
Martin v. Löwiseba40652007-08-30 20:10:57 +000027341ac_delim='%!_!# '
27342for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027343 cat >conf$$subs.sed <<_ACEOF
27344SHELL!$SHELL$ac_delim
27345PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27346PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27347PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27348PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27349PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27350PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27351exec_prefix!$exec_prefix$ac_delim
27352prefix!$prefix$ac_delim
27353program_transform_name!$program_transform_name$ac_delim
27354bindir!$bindir$ac_delim
27355sbindir!$sbindir$ac_delim
27356libexecdir!$libexecdir$ac_delim
27357datarootdir!$datarootdir$ac_delim
27358datadir!$datadir$ac_delim
27359sysconfdir!$sysconfdir$ac_delim
27360sharedstatedir!$sharedstatedir$ac_delim
27361localstatedir!$localstatedir$ac_delim
27362includedir!$includedir$ac_delim
27363oldincludedir!$oldincludedir$ac_delim
27364docdir!$docdir$ac_delim
27365infodir!$infodir$ac_delim
27366htmldir!$htmldir$ac_delim
27367dvidir!$dvidir$ac_delim
27368pdfdir!$pdfdir$ac_delim
27369psdir!$psdir$ac_delim
27370libdir!$libdir$ac_delim
27371localedir!$localedir$ac_delim
27372mandir!$mandir$ac_delim
27373DEFS!$DEFS$ac_delim
27374ECHO_C!$ECHO_C$ac_delim
27375ECHO_N!$ECHO_N$ac_delim
27376ECHO_T!$ECHO_T$ac_delim
27377LIBS!$LIBS$ac_delim
27378build_alias!$build_alias$ac_delim
27379host_alias!$host_alias$ac_delim
27380target_alias!$target_alias$ac_delim
27381VERSION!$VERSION$ac_delim
27382SOVERSION!$SOVERSION$ac_delim
27383CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27384UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27385ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
27386PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27387PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27388PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27389PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27390PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27391FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27392FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27393FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27394FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27395FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27396MACHDEP!$MACHDEP$ac_delim
27397SGI_ABI!$SGI_ABI$ac_delim
27398EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
27399EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
27400CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27401EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27402CC!$CC$ac_delim
27403CFLAGS!$CFLAGS$ac_delim
27404LDFLAGS!$LDFLAGS$ac_delim
27405CPPFLAGS!$CPPFLAGS$ac_delim
27406ac_ct_CC!$ac_ct_CC$ac_delim
27407EXEEXT!$EXEEXT$ac_delim
27408OBJEXT!$OBJEXT$ac_delim
27409CXX!$CXX$ac_delim
27410MAINCC!$MAINCC$ac_delim
27411CPP!$CPP$ac_delim
27412GREP!$GREP$ac_delim
27413EGREP!$EGREP$ac_delim
27414BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27415LIBRARY!$LIBRARY$ac_delim
27416LDLIBRARY!$LDLIBRARY$ac_delim
27417DLLLIBRARY!$DLLLIBRARY$ac_delim
27418BLDLIBRARY!$BLDLIBRARY$ac_delim
27419LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27420INSTSONAME!$INSTSONAME$ac_delim
27421RUNSHARED!$RUNSHARED$ac_delim
27422LINKCC!$LINKCC$ac_delim
27423GNULD!$GNULD$ac_delim
27424RANLIB!$RANLIB$ac_delim
27425AR!$AR$ac_delim
27426ARFLAGS!$ARFLAGS$ac_delim
27427SVNVERSION!$SVNVERSION$ac_delim
27428INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27429INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27430INSTALL_DATA!$INSTALL_DATA$ac_delim
27431LN!$LN$ac_delim
27432OPT!$OPT$ac_delim
27433BASECFLAGS!$BASECFLAGS$ac_delim
27434UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27435OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27436LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27437SO!$SO$ac_delim
27438LDSHARED!$LDSHARED$ac_delim
27439BLDSHARED!$BLDSHARED$ac_delim
27440CCSHARED!$CCSHARED$ac_delim
27441_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027442
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027443 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 +000027444 break
27445 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027446 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27447echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027448 { (exit 1); exit 1; }; }
27449 else
27450 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027451 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027452done
27453
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027454ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27455if test -n "$ac_eof"; then
27456 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27457 ac_eof=`expr $ac_eof + 1`
27458fi
27459
27460cat >>$CONFIG_STATUS <<_ACEOF
27461cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27462/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000027463_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027464sed '
27465s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27466s/^/s,@/; s/!/@,|#_!!_#|/
27467:n
27468t n
27469s/'"$ac_delim"'$/,g/; t
27470s/$/\\/; p
27471N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27472' >>$CONFIG_STATUS <conf$$subs.sed
27473rm -f conf$$subs.sed
27474cat >>$CONFIG_STATUS <<_ACEOF
27475CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000027476_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027477
27478
27479ac_delim='%!_!# '
27480for ac_last_try in false false false false false :; do
27481 cat >conf$$subs.sed <<_ACEOF
27482LINKFORSHARED!$LINKFORSHARED$ac_delim
27483CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
27484SHLIBS!$SHLIBS$ac_delim
27485USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27486SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27487USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27488LDLAST!$LDLAST$ac_delim
27489THREADOBJ!$THREADOBJ$ac_delim
27490DLINCLDIR!$DLINCLDIR$ac_delim
27491DYNLOADFILE!$DYNLOADFILE$ac_delim
27492MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27493TRUE!$TRUE$ac_delim
27494LIBOBJS!$LIBOBJS$ac_delim
27495HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27496HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27497HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27498HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27499HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27500LIBM!$LIBM$ac_delim
27501LIBC!$LIBC$ac_delim
27502UNICODE_OBJS!$UNICODE_OBJS$ac_delim
27503THREADHEADERS!$THREADHEADERS$ac_delim
27504SRCDIRS!$SRCDIRS$ac_delim
27505LTLIBOBJS!$LTLIBOBJS$ac_delim
27506_ACEOF
27507
27508 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
27509 break
27510 elif $ac_last_try; then
27511 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27512echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027513 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027514 else
27515 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27516 fi
27517done
27518
27519ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27520if test -n "$ac_eof"; then
27521 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27522 ac_eof=`expr $ac_eof + 1`
27523fi
27524
27525cat >>$CONFIG_STATUS <<_ACEOF
27526cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
27527/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027528_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027529sed '
27530s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27531s/^/s,@/; s/!/@,|#_!!_#|/
27532:n
27533t n
27534s/'"$ac_delim"'$/,g/; t
27535s/$/\\/; p
27536N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27537' >>$CONFIG_STATUS <conf$$subs.sed
27538rm -f conf$$subs.sed
27539cat >>$CONFIG_STATUS <<_ACEOF
27540:end
27541s/|#_!!_#|//g
27542CEOF$ac_eof
27543_ACEOF
27544
Martin v. Löwiseba40652007-08-30 20:10:57 +000027545
27546# VPATH may cause trouble with some makes, so we remove $(srcdir),
27547# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27548# trailing colons and then remove the whole line if VPATH becomes empty
27549# (actually we leave an empty line to preserve line numbers).
27550if test "x$srcdir" = x.; then
27551 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27552s/:*\$(srcdir):*/:/
27553s/:*\${srcdir}:*/:/
27554s/:*@srcdir@:*/:/
27555s/^\([^=]*=[ ]*\):*/\1/
27556s/:*$//
27557s/^[^=]*=[ ]*$//
27558}'
27559fi
27560
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027561cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027562fi # test -n "$CONFIG_FILES"
27563
Martin v. Löwiseba40652007-08-30 20:10:57 +000027564
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027565for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000027566do
27567 case $ac_tag in
27568 :[FHLC]) ac_mode=$ac_tag; continue;;
27569 esac
27570 case $ac_mode$ac_tag in
27571 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027572 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
27573echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027574 { (exit 1); exit 1; }; };;
27575 :[FH]-) ac_tag=-:-;;
27576 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27577 esac
27578 ac_save_IFS=$IFS
27579 IFS=:
27580 set x $ac_tag
27581 IFS=$ac_save_IFS
27582 shift
27583 ac_file=$1
27584 shift
27585
27586 case $ac_mode in
27587 :L) ac_source=$1;;
27588 :[FH])
27589 ac_file_inputs=
27590 for ac_f
27591 do
27592 case $ac_f in
27593 -) ac_f="$tmp/stdin";;
27594 *) # Look for the file first in the build tree, then in the source tree
27595 # (if the path is not absolute). The absolute path cannot be DOS-style,
27596 # because $ac_f cannot contain `:'.
27597 test -f "$ac_f" ||
27598 case $ac_f in
27599 [\\/$]*) false;;
27600 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27601 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027602 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27603echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027604 { (exit 1); exit 1; }; };;
27605 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027606 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027607 done
27608
27609 # Let's still pretend it is `configure' which instantiates (i.e., don't
27610 # use $as_me), people would be surprised to read:
27611 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027612 configure_input="Generated from "`IFS=:
27613 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000027614 if test x"$ac_file" != x-; then
27615 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027616 { echo "$as_me:$LINENO: creating $ac_file" >&5
27617echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027618 fi
27619
27620 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027621 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027622 esac
27623 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027624 esac
27625
Martin v. Löwiseba40652007-08-30 20:10:57 +000027626 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027627$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027628 X"$ac_file" : 'X\(//\)[^/]' \| \
27629 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000027630 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027631echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027632 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27633 s//\1/
27634 q
27635 }
27636 /^X\(\/\/\)[^/].*/{
27637 s//\1/
27638 q
27639 }
27640 /^X\(\/\/\)$/{
27641 s//\1/
27642 q
27643 }
27644 /^X\(\/\).*/{
27645 s//\1/
27646 q
27647 }
27648 s/.*/./; q'`
27649 { as_dir="$ac_dir"
27650 case $as_dir in #(
27651 -*) as_dir=./$as_dir;;
27652 esac
27653 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027654 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000027655 while :; do
27656 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027657 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000027658 *) as_qdir=$as_dir;;
27659 esac
27660 as_dirs="'$as_qdir' $as_dirs"
27661 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027662$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027663 X"$as_dir" : 'X\(//\)[^/]' \| \
27664 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000027665 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027666echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027667 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27668 s//\1/
27669 q
27670 }
27671 /^X\(\/\/\)[^/].*/{
27672 s//\1/
27673 q
27674 }
27675 /^X\(\/\/\)$/{
27676 s//\1/
27677 q
27678 }
27679 /^X\(\/\).*/{
27680 s//\1/
27681 q
27682 }
27683 s/.*/./; q'`
27684 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027685 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027686 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027687 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27688echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027689 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027690 ac_builddir=.
27691
Martin v. Löwiseba40652007-08-30 20:10:57 +000027692case "$ac_dir" in
27693.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27694*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027695 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027696 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027697 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027698 case $ac_top_builddir_sub in
27699 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27700 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27701 esac ;;
27702esac
27703ac_abs_top_builddir=$ac_pwd
27704ac_abs_builddir=$ac_pwd$ac_dir_suffix
27705# for backward compatibility:
27706ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027707
27708case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000027709 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027710 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027711 ac_top_srcdir=$ac_top_builddir_sub
27712 ac_abs_top_srcdir=$ac_pwd ;;
27713 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027714 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027715 ac_top_srcdir=$srcdir
27716 ac_abs_top_srcdir=$srcdir ;;
27717 *) # Relative name.
27718 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27719 ac_top_srcdir=$ac_top_build_prefix$srcdir
27720 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027721esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000027722ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027723
Martin v. Löwis11437992002-04-12 09:54:03 +000027724
Martin v. Löwiseba40652007-08-30 20:10:57 +000027725 case $ac_mode in
27726 :F)
27727 #
27728 # CONFIG_FILE
27729 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027730
27731 case $INSTALL in
27732 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027733 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027734 esac
Brett Cannon19fab762007-06-02 03:02:29 +000027735_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027736
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027737cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027738# If the template does not know about datarootdir, expand it.
27739# FIXME: This hack should be removed a few years after 2.60.
27740ac_datarootdir_hack=; ac_datarootdir_seen=
27741
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027742case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000027743 p
27744 q
27745}
27746/@datadir@/p
27747/@docdir@/p
27748/@infodir@/p
27749/@localedir@/p
27750/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027751' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000027752*datarootdir*) ac_datarootdir_seen=yes;;
27753*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027754 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27755echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027756_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027757cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027758 ac_datarootdir_hack='
27759 s&@datadir@&$datadir&g
27760 s&@docdir@&$docdir&g
27761 s&@infodir@&$infodir&g
27762 s&@localedir@&$localedir&g
27763 s&@mandir@&$mandir&g
27764 s&\\\${datarootdir}&$datarootdir&g' ;;
27765esac
27766_ACEOF
27767
27768# Neutralize VPATH when `$srcdir' = `.'.
27769# Shell code in configure.ac might set extrasub.
27770# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027771cat >>$CONFIG_STATUS <<_ACEOF
27772 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000027773$extrasub
27774_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027775cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027776:t
27777/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027778s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000027779s&@top_builddir@&$ac_top_builddir_sub&;t t
27780s&@srcdir@&$ac_srcdir&;t t
27781s&@abs_srcdir@&$ac_abs_srcdir&;t t
27782s&@top_srcdir@&$ac_top_srcdir&;t t
27783s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27784s&@builddir@&$ac_builddir&;t t
27785s&@abs_builddir@&$ac_abs_builddir&;t t
27786s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27787s&@INSTALL@&$ac_INSTALL&;t t
27788$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027789" $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 +000027790
Martin v. Löwiseba40652007-08-30 20:10:57 +000027791test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27792 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27793 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027794 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027795which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027796echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027797which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027798
Martin v. Löwiseba40652007-08-30 20:10:57 +000027799 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000027800 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027801 -) cat "$tmp/out"; rm -f "$tmp/out";;
27802 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
27803 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000027804 ;;
27805 :H)
27806 #
27807 # CONFIG_HEADER
27808 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027809_ACEOF
27810
27811# Transform confdefs.h into a sed script `conftest.defines', that
27812# substitutes the proper values into config.h.in to produce config.h.
27813rm -f conftest.defines conftest.tail
27814# First, append a space to every undef/define line, to ease matching.
27815echo 's/$/ /' >conftest.defines
27816# Then, protect against being on the right side of a sed subst, or in
27817# an unquoted here document, in config.status. If some macros were
27818# called several times there might be several #defines for the same
27819# symbol, which is useless. But do not sort them, since the last
27820# AC_DEFINE must be honored.
27821ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27822# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
27823# NAME is the cpp macro being defined, VALUE is the value it is being given.
27824# PARAMS is the parameter list in the macro definition--in most cases, it's
27825# just an empty string.
27826ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
27827ac_dB='\\)[ (].*,\\1define\\2'
27828ac_dC=' '
27829ac_dD=' ,'
27830
27831uniq confdefs.h |
27832 sed -n '
27833 t rset
27834 :rset
27835 s/^[ ]*#[ ]*define[ ][ ]*//
27836 t ok
27837 d
27838 :ok
27839 s/[\\&,]/\\&/g
27840 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
27841 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
27842 ' >>conftest.defines
27843
27844# Remove the space that was appended to ease matching.
27845# Then replace #undef with comments. This is necessary, for
27846# example, in the case of _POSIX_SOURCE, which is predefined and required
27847# on some systems where configure will not decide to define it.
27848# (The regexp can be short, since the line contains either #define or #undef.)
27849echo 's/ $//
27850s,^[ #]*u.*,/* & */,' >>conftest.defines
27851
27852# Break up conftest.defines:
27853ac_max_sed_lines=50
27854
27855# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
27856# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
27857# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
27858# et cetera.
27859ac_in='$ac_file_inputs'
27860ac_out='"$tmp/out1"'
27861ac_nxt='"$tmp/out2"'
27862
27863while :
27864do
27865 # Write a here document:
27866 cat >>$CONFIG_STATUS <<_ACEOF
27867 # First, check the format of the line:
27868 cat >"\$tmp/defines.sed" <<\\CEOF
27869/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
27870/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
27871b
27872:def
27873_ACEOF
27874 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
27875 echo 'CEOF
27876 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27877 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27878 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27879 grep . conftest.tail >/dev/null || break
27880 rm -f conftest.defines
27881 mv conftest.tail conftest.defines
27882done
27883rm -f conftest.defines conftest.tail
27884
27885echo "ac_result=$ac_in" >>$CONFIG_STATUS
27886cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027887 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027888 echo "/* $configure_input */" >"$tmp/config.h"
27889 cat "$ac_result" >>"$tmp/config.h"
27890 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27891 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27892echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027893 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027894 rm -f $ac_file
27895 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027896 fi
27897 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027898 echo "/* $configure_input */"
27899 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027900 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027901 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027902 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027903
Martin v. Löwiseba40652007-08-30 20:10:57 +000027904
27905 esac
27906
27907done # for ac_tag
27908
Guido van Rossum627b2d71993-12-24 10:39:16 +000027909
Martin v. Löwis11437992002-04-12 09:54:03 +000027910{ (exit 0); exit 0; }
27911_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027912chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027913ac_clean_files=$ac_clean_files_save
27914
27915
27916# configure is writing to config.log, and then calls config.status.
27917# config.status does its own redirection, appending to config.log.
27918# Unfortunately, on DOS this fails, as config.log is still kept open
27919# by configure, so config.status won't be able to write to it; its
27920# output is simply discarded. So we exec the FD to /dev/null,
27921# effectively closing config.log, so it can be properly (re)opened and
27922# appended to by config.status. When coming back to configure, we
27923# need to make the FD available again.
27924if test "$no_create" != yes; then
27925 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027926 ac_config_status_args=
27927 test "$silent" = yes &&
27928 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027929 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027930 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027931 exec 5>>config.log
27932 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27933 # would make configure fail if this is the last instruction.
27934 $ac_cs_success || { (exit 1); exit 1; }
27935fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027936
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027937
Martin v. Löwisf7afe952006-04-14 15:16:15 +000027938echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027939if test ! -f Modules/Setup
27940then
27941 cp $srcdir/Modules/Setup.dist Modules/Setup
27942fi
27943
Martin v. Löwisf7afe952006-04-14 15:16:15 +000027944echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027945if test ! -f Modules/Setup.local
27946then
27947 echo "# Edit this file for local setup changes" >Modules/Setup.local
27948fi
27949
27950echo "creating Makefile"
27951$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27952 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027953 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000027954
27955case $ac_sys_system in
27956BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027957 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000027958
27959 Support for BeOS is deprecated as of Python 2.6.
27960 See PEP 11 for the gory details.
27961 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027962echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000027963
27964 Support for BeOS is deprecated as of Python 2.6.
27965 See PEP 11 for the gory details.
27966 " >&2;}
27967 ;;
27968*) ;;
27969esac
27970
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027971mv config.c Modules