blob: 2b90eaa845cdb8d4d2af38c59409c4f112d4404f [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Georg Brandlfe18a112009-09-04 07:55:14 +00002# From configure.in Revision: 74072 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004# Generated by GNU Autoconf 2.61 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Martin v. Löwiseba40652007-08-30 20:10:57 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Martin v. Löwiseba40652007-08-30 20:10:57 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Martin v. Löwiseba40652007-08-30 20:10:57 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000069as_nl='
70'
Martin v. Löwiseba40652007-08-30 20:10:57 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000138echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000164 if test $as_have_required = yes && (eval ":
Martin v. Löwiseba40652007-08-30 20:10:57 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Martin v. Löwiseba40652007-08-30 20:10:57 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Martin v. Löwiseba40652007-08-30 20:10:57 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Martin v. Löwiseba40652007-08-30 20:10:57 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000485
Martin v. Löwiseba40652007-08-30 20:10:57 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000498 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +0000499fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Martin v. Löwiseba40652007-08-30 20:10:57 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000535 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +0000536 else
537 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000538 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000578PACKAGE_VERSION='2.7'
579PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000619ac_subst_vars='SHELL
Alexandre Vassalottia2db6872009-07-17 07:46:46 +0000620PATH_SEPARATOR
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
661PYTHONFRAMEWORK
662PYTHONFRAMEWORKIDENTIFIER
663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673EXTRAPLATDIR
674EXTRAMACHDEPPATH
675CONFIGURE_MACOSX_DEPLOYMENT_TARGET
676EXPORT_MACOSX_DEPLOYMENT_TARGET
677CC
678CFLAGS
679LDFLAGS
680CPPFLAGS
681ac_ct_CC
682EXEEXT
683OBJEXT
684CXX
685MAINCC
686CPP
687GREP
688EGREP
689BUILDEXEEXT
690LIBRARY
691LDLIBRARY
692DLLLIBRARY
693BLDLIBRARY
694LDLIBRARYDIR
695INSTSONAME
696RUNSHARED
697LINKCC
698GNULD
699RANLIB
700AR
701ARFLAGS
702SVNVERSION
703INSTALL_PROGRAM
704INSTALL_SCRIPT
705INSTALL_DATA
706LN
707OPT
708BASECFLAGS
709UNIVERSAL_ARCH_FLAGS
710OTHER_LIBTOOL_OPT
711LIBTOOL_CRUFT
712SO
713LDSHARED
714BLDSHARED
715CCSHARED
716LINKFORSHARED
717CFLAGSFORSHARED
718SHLIBS
719USE_SIGNAL_MODULE
720SIGNAL_OBJS
721USE_THREAD_MODULE
722LDLAST
723THREADOBJ
724DLINCLDIR
725DYNLOADFILE
726MACHDEP_OBJS
727TRUE
728LIBOBJS
729HAVE_GETHOSTBYNAME_R_6_ARG
730HAVE_GETHOSTBYNAME_R_5_ARG
731HAVE_GETHOSTBYNAME_R_3_ARG
732HAVE_GETHOSTBYNAME_R
733HAVE_GETHOSTBYNAME
734LIBM
735LIBC
736UNICODE_OBJS
737THREADHEADERS
738SRCDIRS
739LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000741 ac_precious_vars='build_alias
742host_alias
743target_alias
744CC
745CFLAGS
746LDFLAGS
747LIBS
748CPPFLAGS
749CPP'
750
Guido van Rossum627b2d71993-12-24 10:39:16 +0000751
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000753ac_init_help=
754ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755# The variables have the same names as the options, with
756# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000757cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000759no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000760no_recursion=
761prefix=NONE
762program_prefix=NONE
763program_suffix=NONE
764program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000769x_includes=NONE
770x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000771
772# Installation directory options.
773# These are left unexpanded so users can "make install exec_prefix=/foo"
774# and all the variables that are supposed to be based on exec_prefix
775# by default will actually change.
776# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000777# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778bindir='${exec_prefix}/bin'
779sbindir='${exec_prefix}/sbin'
780libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000781datarootdir='${prefix}/share'
782datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783sysconfdir='${prefix}/etc'
784sharedstatedir='${prefix}/com'
785localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000786includedir='${prefix}/include'
787oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000788docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
789infodir='${datarootdir}/info'
790htmldir='${docdir}'
791dvidir='${docdir}'
792pdfdir='${docdir}'
793psdir='${docdir}'
794libdir='${exec_prefix}/lib'
795localedir='${datarootdir}/locale'
796mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000797
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000799ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000801do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 # If the previous option needs an argument, assign it.
803 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000804 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805 ac_prev=
806 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000807 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Martin v. Löwiseba40652007-08-30 20:10:57 +0000809 case $ac_option in
810 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
811 *) ac_optarg=yes ;;
812 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814 # Accept the important Cygnus configure options, so we can diagnose typos.
815
Martin v. Löwiseba40652007-08-30 20:10:57 +0000816 case $ac_dashdash$ac_option in
817 --)
818 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820 -bindir | --bindir | --bindi | --bind | --bin | --bi)
821 ac_prev=bindir ;;
822 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824
825 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000828 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830 -cache-file | --cache-file | --cache-fil | --cache-fi \
831 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
832 ac_prev=cache_file ;;
833 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
834 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000835 cache_file=$ac_optarg ;;
836
837 --config-cache | -C)
838 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000842 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844
Martin v. Löwiseba40652007-08-30 20:10:57 +0000845 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
846 | --dataroo | --dataro | --datar)
847 ac_prev=datarootdir ;;
848 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
849 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
850 datarootdir=$ac_optarg ;;
851
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852 -disable-* | --disable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000853 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000855 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
856 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000858 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
859 eval enable_$ac_feature=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000860
861 -docdir | --docdir | --docdi | --doc | --do)
862 ac_prev=docdir ;;
863 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
864 docdir=$ac_optarg ;;
865
866 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
867 ac_prev=dvidir ;;
868 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
869 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870
871 -enable-* | --enable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000872 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000874 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
875 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000877 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
878 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
881 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
882 | --exec | --exe | --ex)
883 ac_prev=exec_prefix ;;
884 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
885 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
886 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000887 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
889 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890 # Obsolete; use --with-gas.
891 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Martin v. Löwis11437992002-04-12 09:54:03 +0000893 -help | --help | --hel | --he | -h)
894 ac_init_help=long ;;
895 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
896 ac_init_help=recursive ;;
897 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
898 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
900 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Martin v. Löwiseba40652007-08-30 20:10:57 +0000905 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
906 ac_prev=htmldir ;;
907 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
908 | --ht=*)
909 htmldir=$ac_optarg ;;
910
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911 -includedir | --includedir | --includedi | --included | --include \
912 | --includ | --inclu | --incl | --inc)
913 ac_prev=includedir ;;
914 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
915 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -infodir | --infodir | --infodi | --infod | --info | --inf)
919 ac_prev=infodir ;;
920 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libdir | --libdir | --libdi | --libd)
924 ac_prev=libdir ;;
925 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927
928 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
929 | --libexe | --libex | --libe)
930 ac_prev=libexecdir ;;
931 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
932 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
Martin v. Löwiseba40652007-08-30 20:10:57 +0000935 -localedir | --localedir | --localedi | --localed | --locale)
936 ac_prev=localedir ;;
937 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
938 localedir=$ac_optarg ;;
939
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000941 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 ac_prev=localstatedir ;;
943 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000944 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
947 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
948 ac_prev=mandir ;;
949 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 # Obsolete; use --without-fp.
954 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955
956 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958 no_create=yes ;;
959
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
962 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
965 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
966 | --oldin | --oldi | --old | --ol | --o)
967 ac_prev=oldincludedir ;;
968 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
969 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
970 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
974 ac_prev=prefix ;;
975 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
978 -program-prefix | --program-prefix | --program-prefi | --program-pref \
979 | --program-pre | --program-pr | --program-p)
980 ac_prev=program_prefix ;;
981 -program-prefix=* | --program-prefix=* | --program-prefi=* \
982 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -program-suffix | --program-suffix | --program-suffi | --program-suff \
986 | --program-suf | --program-su | --program-s)
987 ac_prev=program_suffix ;;
988 -program-suffix=* | --program-suffix=* | --program-suffi=* \
989 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -program-transform-name | --program-transform-name \
993 | --program-transform-nam | --program-transform-na \
994 | --program-transform-n | --program-transform- \
995 | --program-transform | --program-transfor \
996 | --program-transfo | --program-transf \
997 | --program-trans | --program-tran \
998 | --progr-tra | --program-tr | --program-t)
999 ac_prev=program_transform_name ;;
1000 -program-transform-name=* | --program-transform-name=* \
1001 | --program-transform-nam=* | --program-transform-na=* \
1002 | --program-transform-n=* | --program-transform-=* \
1003 | --program-transform=* | --program-transfor=* \
1004 | --program-transfo=* | --program-transf=* \
1005 | --program-trans=* | --program-tran=* \
1006 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Martin v. Löwiseba40652007-08-30 20:10:57 +00001009 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1010 ac_prev=pdfdir ;;
1011 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1012 pdfdir=$ac_optarg ;;
1013
1014 -psdir | --psdir | --psdi | --psd | --ps)
1015 ac_prev=psdir ;;
1016 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1017 psdir=$ac_optarg ;;
1018
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1020 | -silent | --silent | --silen | --sile | --sil)
1021 silent=yes ;;
1022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1024 ac_prev=sbindir ;;
1025 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1026 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1030 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1031 | --sharedst | --shareds | --shared | --share | --shar \
1032 | --sha | --sh)
1033 ac_prev=sharedstatedir ;;
1034 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1035 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1036 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1037 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040 -site | --site | --sit)
1041 ac_prev=site ;;
1042 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1046 ac_prev=srcdir ;;
1047 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1051 | --syscon | --sysco | --sysc | --sys | --sy)
1052 ac_prev=sysconfdir ;;
1053 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1054 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
1062 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1063 verbose=yes ;;
1064
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 -version | --version | --versio | --versi | --vers | -V)
1066 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -with-* | --with-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001069 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001071 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1072 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001074 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1075 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -without-* | --without-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001078 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001080 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1081 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001083 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1084 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 --x)
1087 # Obsolete; use --with-x.
1088 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1091 | --x-incl | --x-inc | --x-in | --x-i)
1092 ac_prev=x_includes ;;
1093 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1094 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1098 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1099 ac_prev=x_libraries ;;
1100 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1101 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001104 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001105Try \`$0 --help' for more information." >&2
1106 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 ;;
1108
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 *=*)
1110 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1111 # Reject names that are not valid shell variable names.
1112 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001113 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001115 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 export $ac_envvar ;;
1117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001118 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 # FIXME: should be removed in autoconf 3.0.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001120 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001122 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 ;;
1125
1126 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001127done
1128
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001131 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133fi
1134
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001135# Be sure to have absolute directory names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001136for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1137 datadir sysconfdir sharedstatedir localstatedir includedir \
1138 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1139 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001141 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001143 [\\/$]* | ?:[\\/]* ) continue;;
1144 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001146 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001147 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001148done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001149
Martin v. Löwis11437992002-04-12 09:54:03 +00001150# There might be people who depend on the old broken behavior: `$host'
1151# used to hold the argument of --host etc.
1152# FIXME: To remove some day.
1153build=$build_alias
1154host=$host_alias
1155target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001156
Martin v. Löwis11437992002-04-12 09:54:03 +00001157# FIXME: To remove some day.
1158if test "x$host_alias" != x; then
1159 if test "x$build_alias" = x; then
1160 cross_compiling=maybe
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001161 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 If a cross compiler is detected then cross compile mode will be used." >&2
1163 elif test "x$build_alias" != "x$host_alias"; then
1164 cross_compiling=yes
1165 fi
1166fi
1167
1168ac_tool_prefix=
1169test -n "$host_alias" && ac_tool_prefix=$host_alias-
1170
1171test "$silent" = yes && exec 6>/dev/null
1172
Guido van Rossum627b2d71993-12-24 10:39:16 +00001173
Martin v. Löwiseba40652007-08-30 20:10:57 +00001174ac_pwd=`pwd` && test -n "$ac_pwd" &&
1175ac_ls_di=`ls -di .` &&
1176ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001177 { echo "$as_me: error: Working directory cannot be determined" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001178 { (exit 1); exit 1; }; }
1179test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001180 { echo "$as_me: error: pwd does not report name of working directory" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001181 { (exit 1); exit 1; }; }
1182
1183
Guido van Rossum627b2d71993-12-24 10:39:16 +00001184# Find the source files, if location was not specified.
1185if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001187 # Try the directory containing this script, then the parent directory.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001188 ac_confdir=`$as_dirname -- "$0" ||
1189$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1190 X"$0" : 'X\(//\)[^/]' \| \
1191 X"$0" : 'X\(//\)$' \| \
1192 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1193echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001194 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1195 s//\1/
1196 q
1197 }
1198 /^X\(\/\/\)[^/].*/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\/\)$/{
1203 s//\1/
1204 q
1205 }
1206 /^X\(\/\).*/{
1207 s//\1/
1208 q
1209 }
1210 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001212 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213 srcdir=..
1214 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215else
1216 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001218if test ! -r "$srcdir/$ac_unique_file"; then
1219 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001220 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001223ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1224ac_abs_confdir=`(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001225 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001226 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001227 pwd)`
1228# When building in place, set srcdir=.
1229if test "$ac_abs_confdir" = "$ac_pwd"; then
1230 srcdir=.
1231fi
1232# Remove unnecessary trailing slashes from srcdir.
1233# Double slashes in file names in object file debugging info
1234# mess up M-x gdb in Emacs.
1235case $srcdir in
1236*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1237esac
1238for ac_var in $ac_precious_vars; do
1239 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_env_${ac_var}_value=\$${ac_var}
1241 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1242 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1243done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001244
Martin v. Löwis11437992002-04-12 09:54:03 +00001245#
1246# Report the --help message.
1247#
1248if test "$ac_init_help" = "long"; then
1249 # Omit some internal or obsolete options to make the list less imposing.
1250 # This message is too long to be a string in the A/UX 3.1 sh.
1251 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001252\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001253
1254Usage: $0 [OPTION]... [VAR=VALUE]...
1255
1256To assign environment variables (e.g., CC, CFLAGS...), specify them as
1257VAR=VALUE. See below for descriptions of some of the useful variables.
1258
1259Defaults for the options are specified in brackets.
1260
1261Configuration:
1262 -h, --help display this help and exit
1263 --help=short display options specific to this package
1264 --help=recursive display the short help of all the included packages
1265 -V, --version display version information and exit
1266 -q, --quiet, --silent do not print \`checking...' messages
1267 --cache-file=FILE cache test results in FILE [disabled]
1268 -C, --config-cache alias for \`--cache-file=config.cache'
1269 -n, --no-create do not create output files
1270 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1271
Martin v. Löwis11437992002-04-12 09:54:03 +00001272Installation directories:
1273 --prefix=PREFIX install architecture-independent files in PREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001274 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001276 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001277
1278By default, \`make install' will install all the files in
1279\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1280an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1281for instance \`--prefix=\$HOME'.
1282
1283For better control, use the options below.
1284
1285Fine tuning of the installation directories:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001286 --bindir=DIR user executables [EPREFIX/bin]
1287 --sbindir=DIR system admin executables [EPREFIX/sbin]
1288 --libexecdir=DIR program executables [EPREFIX/libexec]
1289 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1290 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1291 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1292 --libdir=DIR object code libraries [EPREFIX/lib]
1293 --includedir=DIR C header files [PREFIX/include]
1294 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1295 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1296 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1297 --infodir=DIR info documentation [DATAROOTDIR/info]
1298 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1299 --mandir=DIR man documentation [DATAROOTDIR/man]
1300 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1301 --htmldir=DIR html documentation [DOCDIR]
1302 --dvidir=DIR dvi documentation [DOCDIR]
1303 --pdfdir=DIR pdf documentation [DOCDIR]
1304 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001305_ACEOF
1306
1307 cat <<\_ACEOF
1308_ACEOF
1309fi
1310
1311if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001313 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001314 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 cat <<\_ACEOF
1316
1317Optional Features:
1318 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1319 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001320 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001321 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322 --enable-framework[=INSTALLDIR]
1323 Build (MacOSX|Darwin) framework
1324 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001325 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001326 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1327 --enable-ipv6 Enable ipv6 (with ipv4) support
1328 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001329 --enable-big-digits[=BITS]
1330 use big digits for Python longs [BITS=30]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001331 --enable-unicode[=ucs[24]]
1332 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001333
1334Optional Packages:
1335 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1336 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001337 --with-universal-archs=ARCH
1338 select architectures for universal build ("32-bit",
1339 "64-bit" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001340 --with-framework-name=FRAMEWORK
1341 specify an alternate name of the framework built
1342 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001343 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001344 --with-cxx-main=<compiler>
1345 compile main() and link python executable with C++
1346 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --with-suffix=.exe set executable suffix
1348 --with-pydebug build with Py_DEBUG defined
1349 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001350 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001351 --with-dbmliborder=db1:db2:...
1352 order to check db backends for dbm. Valid value is a
1353 colon separated string with the backend names
1354 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001355 --with-signal-module disable/enable signal module
1356 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1357 --with(out)-threads[=DIRECTORY]
1358 disable/enable thread support
1359 --with(out)-thread[=DIRECTORY]
1360 deprecated; use --with(out)-threads
1361 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001363 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001364 --with(out)-pymalloc disable/enable specialized mallocs
1365 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001366 --with-fpectl enable SIGFPE catching
1367 --with-libm=STRING math library
1368 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001369
1370Some influential environment variables:
1371 CC C compiler command
1372 CFLAGS C compiler flags
1373 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1374 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001375 LIBS libraries to pass to the linker, e.g. -l<library>
1376 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1377 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 CPP C preprocessor
1379
1380Use these variables to override the choices made by `configure' or to help
1381it to find libraries and programs with nonstandard names/locations.
1382
Georg Brandl464432d2009-05-20 18:24:08 +00001383Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001384_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001385ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001386fi
1387
1388if test "$ac_init_help" = "recursive"; then
1389 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001391 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 ac_builddir=.
1393
Martin v. Löwiseba40652007-08-30 20:10:57 +00001394case "$ac_dir" in
1395.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1396*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001397 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001398 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001399 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001400 case $ac_top_builddir_sub in
1401 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1402 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1403 esac ;;
1404esac
1405ac_abs_top_builddir=$ac_pwd
1406ac_abs_builddir=$ac_pwd$ac_dir_suffix
1407# for backward compatibility:
1408ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001409
1410case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001411 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001413 ac_top_srcdir=$ac_top_builddir_sub
1414 ac_abs_top_srcdir=$ac_pwd ;;
1415 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001417 ac_top_srcdir=$srcdir
1418 ac_abs_top_srcdir=$srcdir ;;
1419 *) # Relative name.
1420 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1421 ac_top_srcdir=$ac_top_build_prefix$srcdir
1422 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001423esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001424ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001425
Martin v. Löwiseba40652007-08-30 20:10:57 +00001426 cd "$ac_dir" || { ac_status=$?; continue; }
1427 # Check for guested configure.
1428 if test -f "$ac_srcdir/configure.gnu"; then
1429 echo &&
1430 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1431 elif test -f "$ac_srcdir/configure"; then
1432 echo &&
1433 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001435 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001436 fi || ac_status=$?
1437 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 done
1439fi
1440
Martin v. Löwiseba40652007-08-30 20:10:57 +00001441test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001442if $ac_init_version; then
1443 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001444python configure 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001445generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001446
Martin v. Löwiseba40652007-08-30 20:10:57 +00001447Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014482002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001449This configure script is free software; the Free Software Foundation
1450gives unlimited permission to copy, distribute and modify it.
1451_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001452 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001454cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001455This file contains any messages produced by compilers while
1456running configure, to aid debugging if configure makes a mistake.
1457
Martin v. Löwis174440b2008-10-03 08:59:41 +00001458It was created by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001459generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001460
1461 $ $0 $@
1462
1463_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001464exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001465{
1466cat <<_ASUNAME
1467## --------- ##
1468## Platform. ##
1469## --------- ##
1470
1471hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1472uname -m = `(uname -m) 2>/dev/null || echo unknown`
1473uname -r = `(uname -r) 2>/dev/null || echo unknown`
1474uname -s = `(uname -s) 2>/dev/null || echo unknown`
1475uname -v = `(uname -v) 2>/dev/null || echo unknown`
1476
1477/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1478/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1479
1480/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1481/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1482/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001483/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001484/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1485/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1486/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1487
1488_ASUNAME
1489
1490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1491for as_dir in $PATH
1492do
1493 IFS=$as_save_IFS
1494 test -z "$as_dir" && as_dir=.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001495 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001496done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001497IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001498
1499} >&5
1500
1501cat >&5 <<_ACEOF
1502
1503
1504## ----------- ##
1505## Core tests. ##
1506## ----------- ##
1507
1508_ACEOF
1509
1510
1511# Keep a trace of the command line.
1512# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001513# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001514# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001515# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001517ac_configure_args0=
1518ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001519ac_must_keep_next=false
1520for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001521do
Skip Montanaro6dead952003-09-25 14:50:04 +00001522 for ac_arg
1523 do
1524 case $ac_arg in
1525 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1526 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1527 | -silent | --silent | --silen | --sile | --sil)
1528 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001529 *\'*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001530 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001531 esac
1532 case $ac_pass in
1533 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1534 2)
1535 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1536 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001537 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001538 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001539 case $ac_arg in
1540 *=* | --config-cache | -C | -disable-* | --disable-* \
1541 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1542 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1543 | -with-* | --with-* | -without-* | --without-* | --x)
1544 case "$ac_configure_args0 " in
1545 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1546 esac
1547 ;;
1548 -* ) ac_must_keep_next=true ;;
1549 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001550 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001551 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001552 ;;
1553 esac
1554 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001555done
Skip Montanaro6dead952003-09-25 14:50:04 +00001556$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1557$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001558
1559# When interrupted or exit'd, cleanup temporary files, and complete
1560# config.log. We remove comments because anyway the quotes in there
1561# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001562# WARNING: Use '\'' to represent an apostrophe within the trap.
1563# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001564trap 'exit_status=$?
1565 # Save into config.log some information that might help in debugging.
1566 {
1567 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001568
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 cat <<\_ASBOX
1570## ---------------- ##
1571## Cache variables. ##
1572## ---------------- ##
1573_ASBOX
1574 echo
1575 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001576(
1577 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1578 eval ac_val=\$$ac_var
1579 case $ac_val in #(
1580 *${as_nl}*)
1581 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001582 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1583echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001584 esac
1585 case $ac_var in #(
1586 _ | IFS | as_nl) ;; #(
1587 *) $as_unset $ac_var ;;
1588 esac ;;
1589 esac
1590 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001592 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1593 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001595 "s/'\''/'\''\\\\'\'''\''/g;
1596 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1597 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001598 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001599 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001600 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001601 esac |
1602 sort
1603)
Martin v. Löwis11437992002-04-12 09:54:03 +00001604 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001605
1606 cat <<\_ASBOX
1607## ----------------- ##
1608## Output variables. ##
1609## ----------------- ##
1610_ASBOX
1611 echo
1612 for ac_var in $ac_subst_vars
1613 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001614 eval ac_val=\$$ac_var
1615 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001616 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001617 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001618 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001619 done | sort
1620 echo
1621
1622 if test -n "$ac_subst_files"; then
1623 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001624## ------------------- ##
1625## File substitutions. ##
1626## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001627_ASBOX
1628 echo
1629 for ac_var in $ac_subst_files
1630 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001631 eval ac_val=\$$ac_var
1632 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001633 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001634 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001635 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001636 done | sort
1637 echo
1638 fi
1639
Martin v. Löwis11437992002-04-12 09:54:03 +00001640 if test -s confdefs.h; then
1641 cat <<\_ASBOX
1642## ----------- ##
1643## confdefs.h. ##
1644## ----------- ##
1645_ASBOX
1646 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001647 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001648 echo
1649 fi
1650 test "$ac_signal" != 0 &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001651 echo "$as_me: caught signal $ac_signal"
1652 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001654 rm -f core *.core core.conftest.* &&
1655 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001656 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001657' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001658for ac_signal in 1 2 13 15; do
1659 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1660done
1661ac_signal=0
1662
1663# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001664rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001665
1666# Predefined preprocessor variables.
1667
1668cat >>confdefs.h <<_ACEOF
1669#define PACKAGE_NAME "$PACKAGE_NAME"
1670_ACEOF
1671
1672
1673cat >>confdefs.h <<_ACEOF
1674#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1675_ACEOF
1676
1677
1678cat >>confdefs.h <<_ACEOF
1679#define PACKAGE_VERSION "$PACKAGE_VERSION"
1680_ACEOF
1681
1682
1683cat >>confdefs.h <<_ACEOF
1684#define PACKAGE_STRING "$PACKAGE_STRING"
1685_ACEOF
1686
1687
1688cat >>confdefs.h <<_ACEOF
1689#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1690_ACEOF
1691
1692
1693# Let the site file select an alternate cache file if it wants to.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001694# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001695if test -n "$CONFIG_SITE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001696 set x "$CONFIG_SITE"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001697elif test "x$prefix" != xNONE; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001698 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001700 set x "$ac_default_prefix/share/config.site" \
1701 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001703shift
1704for ac_site_file
Martin v. Löwiseba40652007-08-30 20:10:57 +00001705do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706 if test -r "$ac_site_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001707 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1708echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001710 . "$ac_site_file"
1711 fi
1712done
1713
1714if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001715 # Some versions of bash will fail to source /dev/null (special
1716 # files actually), so we avoid doing that.
1717 if test -f "$cache_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001718 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1719echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001721 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1722 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001723 esac
1724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001725else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001726 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1727echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001728 >$cache_file
1729fi
1730
1731# Check that the precious variables saved in the cache have kept the same
1732# value.
1733ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001734for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001735 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1736 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001737 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1738 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001739 case $ac_old_set,$ac_new_set in
1740 set,)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001741 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1742echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001743 ac_cache_corrupted=: ;;
1744 ,set)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001745 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1746echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001747 ac_cache_corrupted=: ;;
1748 ,);;
1749 *)
1750 if test "x$ac_old_val" != "x$ac_new_val"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001751 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1752echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1753 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1754echo "$as_me: former value: $ac_old_val" >&2;}
1755 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1756echo "$as_me: current value: $ac_new_val" >&2;}
1757 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001758 fi;;
1759 esac
1760 # Pass precious variables to config.status.
1761 if test "$ac_new_set" = set; then
1762 case $ac_new_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001763 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001764 *) ac_arg=$ac_var=$ac_new_val ;;
1765 esac
1766 case " $ac_configure_args " in
1767 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1768 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1769 esac
1770 fi
1771done
1772if $ac_cache_corrupted; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001773 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1774echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1775 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1776echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001777 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001778fi
1779
Martin v. Löwiseba40652007-08-30 20:10:57 +00001780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
Guido van Rossum7f43da71994-08-01 12:15:30 +00001804ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001806ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1807ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1808ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001809
Guido van Rossum627b2d71993-12-24 10:39:16 +00001810
Michael W. Hudson54241132001-12-07 15:38:26 +00001811
Martin v. Löwiseba40652007-08-30 20:10:57 +00001812ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001813
1814
Martin v. Löwis11437992002-04-12 09:54:03 +00001815
Georg Brandlbcd64a32009-03-31 21:45:18 +00001816if test "$prefix" != "/"; then
1817 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1818fi
1819
1820
Martin v. Löwis11437992002-04-12 09:54:03 +00001821
1822
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001823
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001824
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001825# We don't use PACKAGE_ variables, and they cause conflicts
1826# with other autoconf-based packages that include Python.h
1827grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1828rm confdefs.h
1829mv confdefs.h.new confdefs.h
1830
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001831
Martin v. Löwis174440b2008-10-03 08:59:41 +00001832VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001833
Martin v. Löwis1142de32002-03-29 16:28:31 +00001834
1835SOVERSION=1.0
1836
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001837# The later defininition of _XOPEN_SOURCE disables certain features
1838# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1839
1840cat >>confdefs.h <<\_ACEOF
1841#define _GNU_SOURCE 1
1842_ACEOF
1843
1844
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001845# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1846# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1847# them.
1848
1849cat >>confdefs.h <<\_ACEOF
1850#define _NETBSD_SOURCE 1
1851_ACEOF
1852
1853
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001854# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1855# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1856# them.
1857
1858cat >>confdefs.h <<\_ACEOF
1859#define __BSD_VISIBLE 1
1860_ACEOF
1861
1862
Martin v. Löwisd6320502004-08-12 13:45:08 +00001863# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1864# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1865
1866cat >>confdefs.h <<\_ACEOF
1867#define _BSD_TYPES 1
1868_ACEOF
1869
1870
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001871# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1872# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1873# them.
1874
1875cat >>confdefs.h <<\_ACEOF
1876#define _DARWIN_C_SOURCE 1
1877_ACEOF
1878
1879
1880
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001881define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001882
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001883# Arguments passed to configure.
1884
1885CONFIG_ARGS="$ac_configure_args"
1886
Martin v. Löwiseba40652007-08-30 20:10:57 +00001887# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001888if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001889 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001890 case $enableval in
1891 yes)
1892 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1893 ;;
1894 esac
1895 case $enableval in
1896 no)
1897 UNIVERSALSDK=
1898 enable_universalsdk=
1899 ;;
1900 *)
1901 UNIVERSALSDK=$enableval
1902 ;;
1903 esac
1904
1905else
1906
1907 UNIVERSALSDK=
1908 enable_universalsdk=
1909
Martin v. Löwiseba40652007-08-30 20:10:57 +00001910fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001911
1912
Martin v. Löwiseba40652007-08-30 20:10:57 +00001913
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001914ARCH_RUN_32BIT=
1915
1916
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001917UNIVERSAL_ARCHS="32-bit"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001918{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1919echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001920
1921# Check whether --with-universal-archs was given.
1922if test "${with_universal_archs+set}" = set; then
1923 withval=$with_universal_archs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001924 { echo "$as_me:$LINENO: result: $withval" >&5
1925echo "${ECHO_T}$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001926 UNIVERSAL_ARCHS="$withval"
1927
1928else
1929
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001930 { echo "$as_me:$LINENO: result: 32-bit" >&5
1931echo "${ECHO_T}32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001932
1933fi
1934
1935
1936
1937
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001938
1939# Check whether --with-framework-name was given.
1940if test "${with_framework_name+set}" = set; then
1941 withval=$with_framework_name;
1942 PYTHONFRAMEWORK=${withval}
1943 PYTHONFRAMEWORKDIR=${withval}.framework
1944 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1945
1946else
1947
1948 PYTHONFRAMEWORK=Python
1949 PYTHONFRAMEWORKDIR=Python.framework
1950 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1951
1952fi
1953
Martin v. Löwiseba40652007-08-30 20:10:57 +00001954# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001955if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001956 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001957 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001958 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001959 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001960 esac
1961 case $enableval in
1962 no)
1963 PYTHONFRAMEWORK=
1964 PYTHONFRAMEWORKDIR=no-framework
1965 PYTHONFRAMEWORKPREFIX=
1966 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001967 FRAMEWORKINSTALLFIRST=
1968 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001969 FRAMEWORKALTINSTALLFIRST=
1970 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001971 if test "x${prefix}" = "xNONE"; then
1972 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1973 else
1974 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1975 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001976 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001977 ;;
1978 *)
1979 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001980 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001981 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001982 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1983 if test "$UNIVERSAL_ARCHS" = "all"
1984 then
1985 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001986 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001987 else
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001988 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001989 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1990 fi
1991
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001992 if test "x${prefix}" = "xNONE" ; then
1993 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1994 else
1995 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1996 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001997 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001998
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001999 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002000 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002001 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002002
Martin v. Löwiseba40652007-08-30 20:10:57 +00002003 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002004
Martin v. Löwiseba40652007-08-30 20:10:57 +00002005 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002006
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002007 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2008
2009 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2010
Jack Jansene578a632001-08-15 01:27:14 +00002011 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002012
Guido van Rossum563e7081996-09-10 18:20:48 +00002013else
Martin v. Löwis11437992002-04-12 09:54:03 +00002014
Jack Jansene578a632001-08-15 01:27:14 +00002015 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002016 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002017 PYTHONFRAMEWORKPREFIX=
2018 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002019 FRAMEWORKINSTALLFIRST=
2020 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002021 FRAMEWORKALTINSTALLFIRST=
2022 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002023 if test "x${prefix}" = "xNONE" ; then
2024 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2025 else
2026 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2027 fi
Jack Jansene578a632001-08-15 01:27:14 +00002028 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002029
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002030 if test "$UNIVERSAL_ARCHS" = "all"
2031 then
2032 FRAMEWORKINSTALLLAST=update4wayuniversal
2033 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2034 fi
2035
Martin v. Löwiseba40652007-08-30 20:10:57 +00002036fi
2037
Michael W. Hudson54241132001-12-07 15:38:26 +00002038
2039
2040
2041
Jack Jansene578a632001-08-15 01:27:14 +00002042
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002043
2044
Ronald Oussoren5b787322006-06-06 19:50:24 +00002045
2046
2047
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002048
Jack Jansene578a632001-08-15 01:27:14 +00002049##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002050## AC_HELP_STRING(--with-dyld,
2051## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002052##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002053# Set name for machine-dependent library files
2054
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002055{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2056echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002057if test -z "$MACHDEP"
2058then
Guido van Rossum563e7081996-09-10 18:20:48 +00002059 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002060 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002061 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002062 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002063 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002064 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002065 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002066 ac_md_system=`echo $ac_sys_system |
2067 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2068 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002069 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002070 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002071
Guido van Rossum07397971997-04-29 21:49:50 +00002072 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002073 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002074 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002075 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002076 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002077 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002078 esac
2079fi
Guido van Rossum91922671997-10-09 20:24:13 +00002080
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002081# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2082# disable features if it is defined, without any means to access these
2083# features as extensions. For these systems, we skip the definition of
2084# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2085# some feature, make sure there is no alternative way to access this
2086# feature. Also, when using wildcards, make sure you have verified the
2087# need for not defining _XOPEN_SOURCE on all systems matching the
2088# wildcard, and that the wildcard does not include future systems
2089# (which may remove their limitations).
2090case $ac_sys_system/$ac_sys_release in
2091 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2092 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002093 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002094 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002095 define_xopen_source=no
2096 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2097 # also defined. This can be overridden by defining _BSD_SOURCE
2098 # As this has a different meaning on Linux, only define it on OpenBSD
2099
2100cat >>confdefs.h <<\_ACEOF
2101#define _BSD_SOURCE 1
2102_ACEOF
2103
2104 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002105 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2106 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2107 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002108 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002109 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002110 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2111 # of union __?sigval. Reported by Stuart Bishop.
2112 SunOS/5.6)
2113 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002114 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2115 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002116 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002117 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002118 define_xopen_source=no;;
2119 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002120 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002121 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002122 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002123 # On FreeBSD 4, the math functions C89 does not cover are never defined
2124 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2125 FreeBSD/4.*)
2126 define_xopen_source=no;;
2127 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2128 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2129 # identifies itself as Darwin/7.*
2130 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2131 # disables platform specific features beyond repair.
2132 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2133 # has no effect, don't bother defining them
2134 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002135 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002136 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2137 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2138 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002139 AIX/4)
2140 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002141 AIX/5)
2142 if test `uname -r` -eq 1; then
2143 define_xopen_source=no
2144 fi
2145 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002146 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2147 # defining NI_NUMERICHOST.
2148 QNX/6.3.2)
2149 define_xopen_source=no
2150 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002151
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002152esac
2153
2154if test $define_xopen_source = yes
2155then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002156 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2157 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002158 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2159 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002160 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002161 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002162
2163cat >>confdefs.h <<\_ACEOF
2164#define _XOPEN_SOURCE 500
2165_ACEOF
2166
2167 ;;
2168 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002169
2170cat >>confdefs.h <<\_ACEOF
2171#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002172_ACEOF
2173
Skip Montanarof0d5f792004-08-15 14:08:23 +00002174 ;;
2175 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002176
2177 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2178 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2179 # several APIs are not declared. Since this is also needed in some
2180 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002181 # except for Solaris 10, where it must not be defined,
2182 # as it implies XPG4.2
2183 case $ac_sys_system/$ac_sys_release in
2184 SunOS/5.10)
2185 ;;
2186 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002187
2188cat >>confdefs.h <<\_ACEOF
2189#define _XOPEN_SOURCE_EXTENDED 1
2190_ACEOF
2191
Martin v. Löwis7dece662005-11-26 11:38:24 +00002192 ;;
2193 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002194
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002195
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002196cat >>confdefs.h <<\_ACEOF
2197#define _POSIX_C_SOURCE 200112L
2198_ACEOF
2199
2200
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002201fi
2202
Guido van Rossum91922671997-10-09 20:24:13 +00002203#
2204# SGI compilers allow the specification of the both the ABI and the
2205# ISA on the command line. Depending on the values of these switches,
2206# different and often incompatable code will be generated.
2207#
2208# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2209# thus supply support for various ABI/ISA combinations. The MACHDEP
2210# variable is also adjusted.
2211#
2212
2213if test ! -z "$SGI_ABI"
2214then
2215 CC="cc $SGI_ABI"
2216 LDFLAGS="$SGI_ABI $LDFLAGS"
2217 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2218fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002219{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2220echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002221
Jack Jansen83f898c2002-12-30 22:23:40 +00002222# And add extra plat-mac for darwin
2223
Jack Jansen7b59b422003-03-17 15:44:10 +00002224
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002225{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2226echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002227if test -z "$EXTRAPLATDIR"
2228then
2229 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002230 darwin)
2231 EXTRAPLATDIR="\$(PLATMACDIRS)"
2232 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2233 ;;
2234 *)
2235 EXTRAPLATDIR=""
2236 EXTRAMACHDEPPATH=""
2237 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002238 esac
2239fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002240{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2241echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002242
Jack Jansen6b08a402004-06-03 12:41:45 +00002243# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2244# it may influence the way we can build extensions, so distutils
2245# needs to check it
2246
Ronald Oussoren988117f2006-04-29 11:31:35 +00002247
Jack Jansen6b08a402004-06-03 12:41:45 +00002248CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002249EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002250
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002251{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2252echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002253ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002254{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2255echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002256
Guido van Rossum627b2d71993-12-24 10:39:16 +00002257# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002258
2259# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2260# for debug/optimization stuff. BASECFLAGS is for flags that are required
2261# just to get things to compile and link. Users are free to override OPT
2262# when running configure or make. The build should not break if they do.
2263# BASECFLAGS should generally not be messed with, however.
2264
2265# XXX shouldn't some/most/all of this code be merged with the stuff later
2266# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002267{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2268echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002269
Martin v. Löwiseba40652007-08-30 20:10:57 +00002270# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002271if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002272 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002273 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002274 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002275 without_gcc=yes;;
2276 yes) CC=gcc
2277 without_gcc=no;;
2278 *) CC=$withval
2279 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002280 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002281else
Martin v. Löwis11437992002-04-12 09:54:03 +00002282
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002283 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002284 AIX*) CC=cc_r
2285 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002286 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002287 case $BE_HOST_CPU in
2288 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002289 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002290 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002291 BASECFLAGS="$BASECFLAGS -export pragma"
2292 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002293 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002294 ;;
2295 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002296 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002297 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002298 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002299 ;;
2300 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002301 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2302echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002303 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002304 ;;
2305 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002306 AR="\$(srcdir)/Modules/ar_beos"
2307 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002308 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002309 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002310 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002311fi
2312
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002313{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2314echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002315
Guido van Rossum8b131c51995-03-09 14:10:13 +00002316# If the user switches compilers, we can't believe the cache
2317if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2318then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002319 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002320(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002321echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002322(it is also a good idea to do 'make clean' before compiling)" >&2;}
2323 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002324fi
2325
Martin v. Löwis11437992002-04-12 09:54:03 +00002326ac_ext=c
2327ac_cpp='$CPP $CPPFLAGS'
2328ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2329ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2330ac_compiler_gnu=$ac_cv_c_compiler_gnu
2331if test -n "$ac_tool_prefix"; then
2332 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2333set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002334{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2335echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002336if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002337 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002338else
2339 if test -n "$CC"; then
2340 ac_cv_prog_CC="$CC" # Let the user override the test.
2341else
Martin v. Löwis11437992002-04-12 09:54:03 +00002342as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2343for as_dir in $PATH
2344do
2345 IFS=$as_save_IFS
2346 test -z "$as_dir" && as_dir=.
2347 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002348 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 +00002349 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002350 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002351 break 2
2352 fi
2353done
2354done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002355IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002356
Jack Jansendd19cf82001-12-06 22:36:17 +00002357fi
2358fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002359CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002360if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002361 { echo "$as_me:$LINENO: result: $CC" >&5
2362echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002363else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002364 { echo "$as_me:$LINENO: result: no" >&5
2365echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002366fi
2367
Martin v. Löwiseba40652007-08-30 20:10:57 +00002368
Martin v. Löwis11437992002-04-12 09:54:03 +00002369fi
2370if test -z "$ac_cv_prog_CC"; then
2371 ac_ct_CC=$CC
2372 # Extract the first word of "gcc", so it can be a program name with args.
2373set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002374{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2375echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002376if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002377 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002378else
2379 if test -n "$ac_ct_CC"; then
2380 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2381else
2382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2383for as_dir in $PATH
2384do
2385 IFS=$as_save_IFS
2386 test -z "$as_dir" && as_dir=.
2387 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002388 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 +00002389 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002390 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002391 break 2
2392 fi
2393done
2394done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002395IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002396
2397fi
2398fi
2399ac_ct_CC=$ac_cv_prog_ac_ct_CC
2400if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002401 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2402echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002403else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002404 { echo "$as_me:$LINENO: result: no" >&5
2405echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002406fi
2407
Martin v. Löwiseba40652007-08-30 20:10:57 +00002408 if test "x$ac_ct_CC" = x; then
2409 CC=""
2410 else
2411 case $cross_compiling:$ac_tool_warned in
2412yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002413{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2414whose name does not start with the host triplet. If you think this
2415configuration is useful to you, please write to autoconf@gnu.org." >&5
2416echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2417whose name does not start with the host triplet. If you think this
2418configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002419ac_tool_warned=yes ;;
2420esac
2421 CC=$ac_ct_CC
2422 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002423else
2424 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002425fi
2426
Jack Jansendd19cf82001-12-06 22:36:17 +00002427if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002428 if test -n "$ac_tool_prefix"; then
2429 # 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 +00002430set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002431{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2432echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002433if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002434 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002435else
2436 if test -n "$CC"; then
2437 ac_cv_prog_CC="$CC" # Let the user override the test.
2438else
Martin v. Löwis11437992002-04-12 09:54:03 +00002439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2440for as_dir in $PATH
2441do
2442 IFS=$as_save_IFS
2443 test -z "$as_dir" && as_dir=.
2444 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002445 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 +00002446 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002447 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002448 break 2
2449 fi
2450done
2451done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002452IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002453
2454fi
2455fi
2456CC=$ac_cv_prog_CC
2457if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002458 { echo "$as_me:$LINENO: result: $CC" >&5
2459echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002460else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002461 { echo "$as_me:$LINENO: result: no" >&5
2462echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002463fi
2464
Martin v. Löwiseba40652007-08-30 20:10:57 +00002465
Martin v. Löwis11437992002-04-12 09:54:03 +00002466 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002467fi
2468if test -z "$CC"; then
2469 # Extract the first word of "cc", so it can be a program name with args.
2470set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002471{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2472echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002473if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002474 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002475else
2476 if test -n "$CC"; then
2477 ac_cv_prog_CC="$CC" # Let the user override the test.
2478else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002479 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002480as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2481for as_dir in $PATH
2482do
2483 IFS=$as_save_IFS
2484 test -z "$as_dir" && as_dir=.
2485 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002486 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 +00002487 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2488 ac_prog_rejected=yes
2489 continue
2490 fi
2491 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002492 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002493 break 2
2494 fi
2495done
2496done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002497IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002498
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002499if test $ac_prog_rejected = yes; then
2500 # We found a bogon in the path, so make sure we never use it.
2501 set dummy $ac_cv_prog_CC
2502 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002503 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002504 # We chose a different compiler from the bogus one.
2505 # However, it has the same basename, so the bogon will be chosen
2506 # first if we set CC to just the basename; use the full file name.
2507 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002509 fi
2510fi
2511fi
2512fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002513CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002514if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002515 { echo "$as_me:$LINENO: result: $CC" >&5
2516echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002517else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002518 { echo "$as_me:$LINENO: result: no" >&5
2519echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002520fi
2521
Martin v. Löwiseba40652007-08-30 20:10:57 +00002522
Martin v. Löwis11437992002-04-12 09:54:03 +00002523fi
2524if test -z "$CC"; then
2525 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002526 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 do
2528 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2529set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002530{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2531echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002532if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002533 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002534else
2535 if test -n "$CC"; then
2536 ac_cv_prog_CC="$CC" # Let the user override the test.
2537else
Martin v. Löwis11437992002-04-12 09:54:03 +00002538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2539for as_dir in $PATH
2540do
2541 IFS=$as_save_IFS
2542 test -z "$as_dir" && as_dir=.
2543 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002544 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 +00002545 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002546 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002547 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002548 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002549done
2550done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002551IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002552
2553fi
2554fi
2555CC=$ac_cv_prog_CC
2556if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002557 { echo "$as_me:$LINENO: result: $CC" >&5
2558echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002559else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002560 { echo "$as_me:$LINENO: result: no" >&5
2561echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002562fi
2563
Martin v. Löwiseba40652007-08-30 20:10:57 +00002564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 test -n "$CC" && break
2566 done
2567fi
2568if test -z "$CC"; then
2569 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002570 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002571do
2572 # Extract the first word of "$ac_prog", so it can be a program name with args.
2573set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002574{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2575echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002576if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002577 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002578else
2579 if test -n "$ac_ct_CC"; then
2580 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2581else
2582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2583for as_dir in $PATH
2584do
2585 IFS=$as_save_IFS
2586 test -z "$as_dir" && as_dir=.
2587 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002588 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 +00002589 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002590 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002591 break 2
2592 fi
2593done
2594done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002595IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002596
Martin v. Löwis11437992002-04-12 09:54:03 +00002597fi
2598fi
2599ac_ct_CC=$ac_cv_prog_ac_ct_CC
2600if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002601 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2602echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002603else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002604 { echo "$as_me:$LINENO: result: no" >&5
2605echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002606fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002607
Martin v. Löwiseba40652007-08-30 20:10:57 +00002608
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 test -n "$ac_ct_CC" && break
2610done
Michael W. Hudson54241132001-12-07 15:38:26 +00002611
Martin v. Löwiseba40652007-08-30 20:10:57 +00002612 if test "x$ac_ct_CC" = x; then
2613 CC=""
2614 else
2615 case $cross_compiling:$ac_tool_warned in
2616yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002617{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2618whose name does not start with the host triplet. If you think this
2619configuration is useful to you, please write to autoconf@gnu.org." >&5
2620echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2621whose name does not start with the host triplet. If you think this
2622configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002623ac_tool_warned=yes ;;
2624esac
2625 CC=$ac_ct_CC
2626 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002627fi
2628
2629fi
2630
2631
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002632test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002633See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002634echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002635See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002636 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002637
2638# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002639echo "$as_me:$LINENO: checking for C compiler version" >&5
2640ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002641{ (ac_try="$ac_compiler --version >&5"
2642case "(($ac_try" in
2643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2644 *) ac_try_echo=$ac_try;;
2645esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002647 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002650 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002651{ (ac_try="$ac_compiler -v >&5"
2652case "(($ac_try" in
2653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2654 *) ac_try_echo=$ac_try;;
2655esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002657 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002661{ (ac_try="$ac_compiler -V >&5"
2662case "(($ac_try" in
2663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2664 *) ac_try_echo=$ac_try;;
2665esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002667 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 (exit $ac_status); }
2671
2672cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002673/* confdefs.h. */
2674_ACEOF
2675cat confdefs.h >>conftest.$ac_ext
2676cat >>conftest.$ac_ext <<_ACEOF
2677/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002678
Martin v. Löwis11437992002-04-12 09:54:03 +00002679int
2680main ()
2681{
2682
2683 ;
2684 return 0;
2685}
2686_ACEOF
2687ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002688ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002689# Try to create an executable without -o first, disregard a.out.
2690# It will help us diagnose broken compilers, and finding out an intuition
2691# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002692{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2693echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2694ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2695#
2696# List of possible output files, starting from the most likely.
2697# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2698# only as a last resort. b.out is created by i960 compilers.
2699ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2700#
2701# The IRIX 6 linker writes into existing files which may not be
2702# executable, retaining their permissions. Remove them first so a
2703# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002704ac_rmfiles=
2705for ac_file in $ac_files
2706do
2707 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002708 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002709 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2710 esac
2711done
2712rm -f $ac_rmfiles
2713
2714if { (ac_try="$ac_link_default"
2715case "(($ac_try" in
2716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2717 *) ac_try_echo=$ac_try;;
2718esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002720 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002721 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002723 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002724 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2725# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2726# in a Makefile. We should not override ac_cv_exeext if it was cached,
2727# so that the user can short-circuit this test for compilers unknown to
2728# Autoconf.
2729for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002730do
2731 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002733 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002734 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002735 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002736 # We found the default executable, but exeext='' is most
2737 # certainly right.
2738 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002739 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002740 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2741 then :; else
2742 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2743 fi
2744 # We set ac_cv_exeext here because the later test for it is not
2745 # safe: cross compilers may not add the suffix if given an `-o'
2746 # argument, so we may need to know it at that point already.
2747 # Even if this section looks crufty: it has the advantage of
2748 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002749 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002750 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002751 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002752 esac
2753done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002754test "$ac_cv_exeext" = no && ac_cv_exeext=
2755
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002756else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002757 ac_file=''
2758fi
2759
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002760{ echo "$as_me:$LINENO: result: $ac_file" >&5
2761echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002762if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002764sed 's/^/| /' conftest.$ac_ext >&5
2765
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002766{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002767See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002768echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002769See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002770 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002771fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002772
Martin v. Löwis11437992002-04-12 09:54:03 +00002773ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002774
Martin v. Löwiseba40652007-08-30 20:10:57 +00002775# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002776# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002777{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2778echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002779# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2780# If not cross compiling, check that we can run a simple program.
2781if test "$cross_compiling" != yes; then
2782 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002783 { (case "(($ac_try" in
2784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2785 *) ac_try_echo=$ac_try;;
2786esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002788 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002789 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002791 (exit $ac_status); }; }; then
2792 cross_compiling=no
2793 else
2794 if test "$cross_compiling" = maybe; then
2795 cross_compiling=yes
2796 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002797 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002798If you meant to cross compile, use \`--host'.
2799See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002800echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002801If you meant to cross compile, use \`--host'.
2802See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002803 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002804 fi
2805 fi
2806fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002807{ echo "$as_me:$LINENO: result: yes" >&5
2808echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002809
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002810rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002811ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002812# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002813# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002814{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2815echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2816{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2817echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002818
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002819{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2820echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002821if { (ac_try="$ac_link"
2822case "(($ac_try" in
2823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2824 *) ac_try_echo=$ac_try;;
2825esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002827 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002828 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002830 (exit $ac_status); }; then
2831 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2832# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2833# work properly (i.e., refer to `conftest.exe'), while it won't with
2834# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002835for ac_file in conftest.exe conftest conftest.*; do
2836 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002837 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002838 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002839 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002840 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002841 * ) break;;
2842 esac
2843done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002844else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002845 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002846See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002847echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002848See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002849 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002850fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002851
Martin v. Löwis11437992002-04-12 09:54:03 +00002852rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002853{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2854echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002855
2856rm -f conftest.$ac_ext
2857EXEEXT=$ac_cv_exeext
2858ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002859{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2860echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002861if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002862 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002863else
Martin v. Löwis11437992002-04-12 09:54:03 +00002864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002865/* confdefs.h. */
2866_ACEOF
2867cat confdefs.h >>conftest.$ac_ext
2868cat >>conftest.$ac_ext <<_ACEOF
2869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002870
Martin v. Löwis11437992002-04-12 09:54:03 +00002871int
2872main ()
2873{
2874
2875 ;
2876 return 0;
2877}
2878_ACEOF
2879rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002880if { (ac_try="$ac_compile"
2881case "(($ac_try" in
2882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2883 *) ac_try_echo=$ac_try;;
2884esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002886 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002887 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002889 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002890 for ac_file in conftest.o conftest.obj conftest.*; do
2891 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002892 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002893 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002894 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2895 break;;
2896 esac
2897done
2898else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002900sed 's/^/| /' conftest.$ac_ext >&5
2901
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002902{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002903See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002904echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002905See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002906 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002907fi
2908
2909rm -f conftest.$ac_cv_objext conftest.$ac_ext
2910fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002911{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2912echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002913OBJEXT=$ac_cv_objext
2914ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002915{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2916echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002917if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002918 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002919else
2920 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002921/* confdefs.h. */
2922_ACEOF
2923cat confdefs.h >>conftest.$ac_ext
2924cat >>conftest.$ac_ext <<_ACEOF
2925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002926
Martin v. Löwis11437992002-04-12 09:54:03 +00002927int
2928main ()
2929{
2930#ifndef __GNUC__
2931 choke me
2932#endif
2933
2934 ;
2935 return 0;
2936}
2937_ACEOF
2938rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002939if { (ac_try="$ac_compile"
2940case "(($ac_try" in
2941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2942 *) ac_try_echo=$ac_try;;
2943esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002945 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002947 grep -v '^ *+' conftest.er1 >conftest.err
2948 rm -f conftest.er1
2949 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002951 (exit $ac_status); } && {
2952 test -z "$ac_c_werror_flag" ||
2953 test ! -s conftest.err
2954 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002955 ac_compiler_gnu=yes
2956else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002958sed 's/^/| /' conftest.$ac_ext >&5
2959
Martin v. Löwiseba40652007-08-30 20:10:57 +00002960 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002961fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002962
2963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002964ac_cv_c_compiler_gnu=$ac_compiler_gnu
2965
2966fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002967{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2968echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2969GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002970ac_test_CFLAGS=${CFLAGS+set}
2971ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002972{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2973echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002974if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002975 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002976else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002977 ac_save_c_werror_flag=$ac_c_werror_flag
2978 ac_c_werror_flag=yes
2979 ac_cv_prog_cc_g=no
2980 CFLAGS="-g"
2981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002982/* confdefs.h. */
2983_ACEOF
2984cat confdefs.h >>conftest.$ac_ext
2985cat >>conftest.$ac_ext <<_ACEOF
2986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002987
Martin v. Löwis11437992002-04-12 09:54:03 +00002988int
2989main ()
2990{
2991
2992 ;
2993 return 0;
2994}
2995_ACEOF
2996rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002997if { (ac_try="$ac_compile"
2998case "(($ac_try" in
2999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3000 *) ac_try_echo=$ac_try;;
3001esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003003 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003004 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003005 grep -v '^ *+' conftest.er1 >conftest.err
3006 rm -f conftest.er1
3007 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003009 (exit $ac_status); } && {
3010 test -z "$ac_c_werror_flag" ||
3011 test ! -s conftest.err
3012 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003013 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003014else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003015 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003016sed 's/^/| /' conftest.$ac_ext >&5
3017
Martin v. Löwiseba40652007-08-30 20:10:57 +00003018 CFLAGS=""
3019 cat >conftest.$ac_ext <<_ACEOF
3020/* confdefs.h. */
3021_ACEOF
3022cat confdefs.h >>conftest.$ac_ext
3023cat >>conftest.$ac_ext <<_ACEOF
3024/* end confdefs.h. */
3025
3026int
3027main ()
3028{
3029
3030 ;
3031 return 0;
3032}
3033_ACEOF
3034rm -f conftest.$ac_objext
3035if { (ac_try="$ac_compile"
3036case "(($ac_try" in
3037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3038 *) ac_try_echo=$ac_try;;
3039esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003041 (eval "$ac_compile") 2>conftest.er1
3042 ac_status=$?
3043 grep -v '^ *+' conftest.er1 >conftest.err
3044 rm -f conftest.er1
3045 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003047 (exit $ac_status); } && {
3048 test -z "$ac_c_werror_flag" ||
3049 test ! -s conftest.err
3050 } && test -s conftest.$ac_objext; then
3051 :
3052else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003053 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003054sed 's/^/| /' conftest.$ac_ext >&5
3055
3056 ac_c_werror_flag=$ac_save_c_werror_flag
3057 CFLAGS="-g"
3058 cat >conftest.$ac_ext <<_ACEOF
3059/* confdefs.h. */
3060_ACEOF
3061cat confdefs.h >>conftest.$ac_ext
3062cat >>conftest.$ac_ext <<_ACEOF
3063/* end confdefs.h. */
3064
3065int
3066main ()
3067{
3068
3069 ;
3070 return 0;
3071}
3072_ACEOF
3073rm -f conftest.$ac_objext
3074if { (ac_try="$ac_compile"
3075case "(($ac_try" in
3076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3077 *) ac_try_echo=$ac_try;;
3078esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003080 (eval "$ac_compile") 2>conftest.er1
3081 ac_status=$?
3082 grep -v '^ *+' conftest.er1 >conftest.err
3083 rm -f conftest.er1
3084 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003086 (exit $ac_status); } && {
3087 test -z "$ac_c_werror_flag" ||
3088 test ! -s conftest.err
3089 } && test -s conftest.$ac_objext; then
3090 ac_cv_prog_cc_g=yes
3091else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003092 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003093sed 's/^/| /' conftest.$ac_ext >&5
3094
3095
Guido van Rossum627b2d71993-12-24 10:39:16 +00003096fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003097
3098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003100
3101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3102fi
3103
3104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3105 ac_c_werror_flag=$ac_save_c_werror_flag
3106fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003107{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3108echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003109if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003110 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003111elif test $ac_cv_prog_cc_g = yes; then
3112 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003113 CFLAGS="-g -O2"
3114 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003115 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003116 fi
3117else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003118 if test "$GCC" = yes; then
3119 CFLAGS="-O2"
3120 else
3121 CFLAGS=
3122 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003123fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003124{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3125echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003126if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003127 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003128else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003129 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003130ac_save_CC=$CC
3131cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003132/* confdefs.h. */
3133_ACEOF
3134cat confdefs.h >>conftest.$ac_ext
3135cat >>conftest.$ac_ext <<_ACEOF
3136/* end confdefs.h. */
3137#include <stdarg.h>
3138#include <stdio.h>
3139#include <sys/types.h>
3140#include <sys/stat.h>
3141/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3142struct buf { int x; };
3143FILE * (*rcsopen) (struct buf *, struct stat *, int);
3144static char *e (p, i)
3145 char **p;
3146 int i;
3147{
3148 return p[i];
3149}
3150static char *f (char * (*g) (char **, int), char **p, ...)
3151{
3152 char *s;
3153 va_list v;
3154 va_start (v,p);
3155 s = g (p, va_arg (v,int));
3156 va_end (v);
3157 return s;
3158}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003159
3160/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3161 function prototypes and stuff, but not '\xHH' hex character constants.
3162 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003163 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003164 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3165 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003166 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003167int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3168
Martin v. Löwiseba40652007-08-30 20:10:57 +00003169/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3170 inside strings and character constants. */
3171#define FOO(x) 'x'
3172int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3173
Skip Montanaro6dead952003-09-25 14:50:04 +00003174int test (int i, double x);
3175struct s1 {int (*f) (int a);};
3176struct s2 {int (*f) (double a);};
3177int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3178int argc;
3179char **argv;
3180int
3181main ()
3182{
3183return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3184 ;
3185 return 0;
3186}
3187_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003188for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3189 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003190do
3191 CC="$ac_save_CC $ac_arg"
3192 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003193if { (ac_try="$ac_compile"
3194case "(($ac_try" in
3195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3196 *) ac_try_echo=$ac_try;;
3197esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003199 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003200 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003201 grep -v '^ *+' conftest.er1 >conftest.err
3202 rm -f conftest.er1
3203 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003205 (exit $ac_status); } && {
3206 test -z "$ac_c_werror_flag" ||
3207 test ! -s conftest.err
3208 } && test -s conftest.$ac_objext; then
3209 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003210else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003212sed 's/^/| /' conftest.$ac_ext >&5
3213
Martin v. Löwiseba40652007-08-30 20:10:57 +00003214
Skip Montanaro6dead952003-09-25 14:50:04 +00003215fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003216
3217rm -f core conftest.err conftest.$ac_objext
3218 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003219done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003220rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003221CC=$ac_save_CC
3222
3223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003224# AC_CACHE_VAL
3225case "x$ac_cv_prog_cc_c89" in
3226 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003227 { echo "$as_me:$LINENO: result: none needed" >&5
3228echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003229 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003230 { echo "$as_me:$LINENO: result: unsupported" >&5
3231echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003232 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003233 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003234 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3235echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003236esac
3237
Skip Montanaro6dead952003-09-25 14:50:04 +00003238
Martin v. Löwis11437992002-04-12 09:54:03 +00003239ac_ext=c
3240ac_cpp='$CPP $CPPFLAGS'
3241ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3242ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3243ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003244
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003245
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003246
3247
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003248{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3249echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003250
Martin v. Löwiseba40652007-08-30 20:10:57 +00003251# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003252if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003253 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003254
3255 case $withval in
3256 no) with_cxx_main=no
3257 MAINCC='$(CC)';;
3258 yes) with_cxx_main=yes
3259 MAINCC='$(CXX)';;
3260 *) with_cxx_main=yes
3261 MAINCC=$withval
3262 if test -z "$CXX"
3263 then
3264 CXX=$withval
3265 fi;;
3266 esac
3267else
3268
3269 with_cxx_main=no
3270 MAINCC='$(CC)'
3271
Martin v. Löwiseba40652007-08-30 20:10:57 +00003272fi
3273
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003274{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3275echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003276
3277preset_cxx="$CXX"
3278if test -z "$CXX"
3279then
3280 case "$CC" in
3281 gcc) # Extract the first word of "g++", so it can be a program name with args.
3282set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003283{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3284echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003285if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003286 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003287else
3288 case $CXX in
3289 [\\/]* | ?:[\\/]*)
3290 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3291 ;;
3292 *)
3293 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3294for as_dir in notfound
3295do
3296 IFS=$as_save_IFS
3297 test -z "$as_dir" && as_dir=.
3298 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003299 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 +00003300 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003301 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003302 break 2
3303 fi
3304done
3305done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003306IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003307
3308 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3309 ;;
3310esac
3311fi
3312CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003313if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003314 { echo "$as_me:$LINENO: result: $CXX" >&5
3315echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003316else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003317 { echo "$as_me:$LINENO: result: no" >&5
3318echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003320
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003321 ;;
3322 cc) # Extract the first word of "c++", so it can be a program name with args.
3323set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003324{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3325echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003326if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003327 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003328else
3329 case $CXX in
3330 [\\/]* | ?:[\\/]*)
3331 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3332 ;;
3333 *)
3334 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3335for as_dir in notfound
3336do
3337 IFS=$as_save_IFS
3338 test -z "$as_dir" && as_dir=.
3339 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003340 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 +00003341 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003342 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003343 break 2
3344 fi
3345done
3346done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003347IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003348
3349 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3350 ;;
3351esac
3352fi
3353CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003354if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003355 { echo "$as_me:$LINENO: result: $CXX" >&5
3356echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003357else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003358 { echo "$as_me:$LINENO: result: no" >&5
3359echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003360fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003361
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003362 ;;
3363 esac
3364 if test "$CXX" = "notfound"
3365 then
3366 CXX=""
3367 fi
3368fi
3369if test -z "$CXX"
3370then
3371 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3372do
3373 # Extract the first word of "$ac_prog", so it can be a program name with args.
3374set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003375{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3376echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003377if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003378 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003379else
3380 if test -n "$CXX"; then
3381 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3382else
3383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3384for as_dir in $PATH
3385do
3386 IFS=$as_save_IFS
3387 test -z "$as_dir" && as_dir=.
3388 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003389 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 +00003390 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003391 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003392 break 2
3393 fi
3394done
3395done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003396IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003397
3398fi
3399fi
3400CXX=$ac_cv_prog_CXX
3401if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003402 { echo "$as_me:$LINENO: result: $CXX" >&5
3403echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003404else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003405 { echo "$as_me:$LINENO: result: no" >&5
3406echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003407fi
3408
Martin v. Löwiseba40652007-08-30 20:10:57 +00003409
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003410 test -n "$CXX" && break
3411done
3412test -n "$CXX" || CXX="notfound"
3413
3414 if test "$CXX" = "notfound"
3415 then
3416 CXX=""
3417 fi
3418fi
3419if test "$preset_cxx" != "$CXX"
3420then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003421 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003422
3423 By default, distutils will build C++ extension modules with \"$CXX\".
3424 If this is not intended, then set CXX on the configure command line.
3425 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003426echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003427
3428 By default, distutils will build C++ extension modules with \"$CXX\".
3429 If this is not intended, then set CXX on the configure command line.
3430 " >&2;}
3431fi
3432
3433
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003434# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003435
3436ac_ext=c
3437ac_cpp='$CPP $CPPFLAGS'
3438ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3439ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3440ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003441{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3442echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003443# On Suns, sometimes $CPP names a directory.
3444if test -n "$CPP" && test -d "$CPP"; then
3445 CPP=
3446fi
3447if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003448 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003449 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003450else
Martin v. Löwis11437992002-04-12 09:54:03 +00003451 # Double quotes because CPP needs to be expanded
3452 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3453 do
3454 ac_preproc_ok=false
3455for ac_c_preproc_warn_flag in '' yes
3456do
3457 # Use a header file that comes with gcc, so configuring glibc
3458 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003459 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3460 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003461 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003462 # not just through cpp. "Syntax error" is here to catch this case.
3463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003464/* confdefs.h. */
3465_ACEOF
3466cat confdefs.h >>conftest.$ac_ext
3467cat >>conftest.$ac_ext <<_ACEOF
3468/* end confdefs.h. */
3469#ifdef __STDC__
3470# include <limits.h>
3471#else
3472# include <assert.h>
3473#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003474 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003475_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003476if { (ac_try="$ac_cpp conftest.$ac_ext"
3477case "(($ac_try" in
3478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3479 *) ac_try_echo=$ac_try;;
3480esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003482 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003483 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003484 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 rm -f conftest.er1
3486 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003488 (exit $ac_status); } >/dev/null && {
3489 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3490 test ! -s conftest.err
3491 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003492 :
3493else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003494 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003495sed 's/^/| /' conftest.$ac_ext >&5
3496
Martin v. Löwis11437992002-04-12 09:54:03 +00003497 # Broken: fails on valid input.
3498continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003499fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003500
Martin v. Löwis11437992002-04-12 09:54:03 +00003501rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003502
Martin v. Löwiseba40652007-08-30 20:10:57 +00003503 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003504 # can be detected and how.
3505 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003506/* confdefs.h. */
3507_ACEOF
3508cat confdefs.h >>conftest.$ac_ext
3509cat >>conftest.$ac_ext <<_ACEOF
3510/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003511#include <ac_nonexistent.h>
3512_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003513if { (ac_try="$ac_cpp conftest.$ac_ext"
3514case "(($ac_try" in
3515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3516 *) ac_try_echo=$ac_try;;
3517esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003519 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003520 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003521 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003522 rm -f conftest.er1
3523 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003525 (exit $ac_status); } >/dev/null && {
3526 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3527 test ! -s conftest.err
3528 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 # Broken: success on invalid input.
3530continue
3531else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003532 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003533sed 's/^/| /' conftest.$ac_ext >&5
3534
Martin v. Löwis11437992002-04-12 09:54:03 +00003535 # Passes both tests.
3536ac_preproc_ok=:
3537break
3538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003539
Martin v. Löwis11437992002-04-12 09:54:03 +00003540rm -f conftest.err conftest.$ac_ext
3541
3542done
3543# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3544rm -f conftest.err conftest.$ac_ext
3545if $ac_preproc_ok; then
3546 break
3547fi
3548
3549 done
3550 ac_cv_prog_CPP=$CPP
3551
3552fi
3553 CPP=$ac_cv_prog_CPP
3554else
3555 ac_cv_prog_CPP=$CPP
3556fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003557{ echo "$as_me:$LINENO: result: $CPP" >&5
3558echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003559ac_preproc_ok=false
3560for ac_c_preproc_warn_flag in '' yes
3561do
3562 # Use a header file that comes with gcc, so configuring glibc
3563 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003564 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3565 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003566 # On the NeXT, cc -E runs the code through the compiler's parser,
3567 # not just through cpp. "Syntax error" is here to catch this case.
3568 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003569/* confdefs.h. */
3570_ACEOF
3571cat confdefs.h >>conftest.$ac_ext
3572cat >>conftest.$ac_ext <<_ACEOF
3573/* end confdefs.h. */
3574#ifdef __STDC__
3575# include <limits.h>
3576#else
3577# include <assert.h>
3578#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003579 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003580_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003581if { (ac_try="$ac_cpp conftest.$ac_ext"
3582case "(($ac_try" in
3583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3584 *) ac_try_echo=$ac_try;;
3585esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003587 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003588 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003589 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003590 rm -f conftest.er1
3591 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003593 (exit $ac_status); } >/dev/null && {
3594 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3595 test ! -s conftest.err
3596 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003597 :
3598else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003600sed 's/^/| /' conftest.$ac_ext >&5
3601
Martin v. Löwis11437992002-04-12 09:54:03 +00003602 # Broken: fails on valid input.
3603continue
3604fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003605
Martin v. Löwis11437992002-04-12 09:54:03 +00003606rm -f conftest.err conftest.$ac_ext
3607
Martin v. Löwiseba40652007-08-30 20:10:57 +00003608 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 # can be detected and how.
3610 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003611/* confdefs.h. */
3612_ACEOF
3613cat confdefs.h >>conftest.$ac_ext
3614cat >>conftest.$ac_ext <<_ACEOF
3615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003616#include <ac_nonexistent.h>
3617_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003618if { (ac_try="$ac_cpp conftest.$ac_ext"
3619case "(($ac_try" in
3620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3621 *) ac_try_echo=$ac_try;;
3622esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003624 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003625 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003626 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003627 rm -f conftest.er1
3628 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003630 (exit $ac_status); } >/dev/null && {
3631 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3632 test ! -s conftest.err
3633 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003634 # Broken: success on invalid input.
3635continue
3636else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003638sed 's/^/| /' conftest.$ac_ext >&5
3639
Martin v. Löwis11437992002-04-12 09:54:03 +00003640 # Passes both tests.
3641ac_preproc_ok=:
3642break
3643fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003644
Martin v. Löwis11437992002-04-12 09:54:03 +00003645rm -f conftest.err conftest.$ac_ext
3646
3647done
3648# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3649rm -f conftest.err conftest.$ac_ext
3650if $ac_preproc_ok; then
3651 :
3652else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003653 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003654See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003655echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003656See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003657 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003658fi
3659
3660ac_ext=c
3661ac_cpp='$CPP $CPPFLAGS'
3662ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3663ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3664ac_compiler_gnu=$ac_cv_c_compiler_gnu
3665
3666
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003667{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3668echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003669if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003670 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003671else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003672 # Extract the first word of "grep ggrep" to use in msg output
3673if test -z "$GREP"; then
3674set dummy grep ggrep; ac_prog_name=$2
3675if test "${ac_cv_path_GREP+set}" = set; then
3676 echo $ECHO_N "(cached) $ECHO_C" >&6
3677else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003678 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003679# Loop through the user's path and test for each of PROGNAME-LIST
3680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003681for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3682do
3683 IFS=$as_save_IFS
3684 test -z "$as_dir" && as_dir=.
3685 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003686 for ac_exec_ext in '' $ac_executable_extensions; do
3687 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3688 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3689 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003690 # Check for GNU $ac_path_GREP
3691case `"$ac_path_GREP" --version 2>&1` in
3692*GNU*)
3693 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3694*)
3695 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003696 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003697 while :
3698 do
3699 cat "conftest.in" "conftest.in" >"conftest.tmp"
3700 mv "conftest.tmp" "conftest.in"
3701 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003702 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003703 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3704 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3705 ac_count=`expr $ac_count + 1`
3706 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3707 # Best one so far, save it but keep looking for a better one
3708 ac_cv_path_GREP="$ac_path_GREP"
3709 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003710 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003711 # 10*(2^10) chars as input seems more than enough
3712 test $ac_count -gt 10 && break
3713 done
3714 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3715esac
3716
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003717
3718 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003719 done
3720done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003721
3722done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003723IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003724
3725
3726fi
3727
3728GREP="$ac_cv_path_GREP"
3729if test -z "$GREP"; then
3730 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3731echo "$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 +00003732 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003733fi
3734
Martin v. Löwiseba40652007-08-30 20:10:57 +00003735else
3736 ac_cv_path_GREP=$GREP
3737fi
3738
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003739
Martin v. Löwiseba40652007-08-30 20:10:57 +00003740fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003741{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3742echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003743 GREP="$ac_cv_path_GREP"
3744
3745
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003746{ echo "$as_me:$LINENO: checking for egrep" >&5
3747echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003748if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003749 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003750else
3751 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3752 then ac_cv_path_EGREP="$GREP -E"
3753 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003754 # Extract the first word of "egrep" to use in msg output
3755if test -z "$EGREP"; then
3756set dummy egrep; ac_prog_name=$2
3757if test "${ac_cv_path_EGREP+set}" = set; then
3758 echo $ECHO_N "(cached) $ECHO_C" >&6
3759else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003760 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003761# Loop through the user's path and test for each of PROGNAME-LIST
3762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003763for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3764do
3765 IFS=$as_save_IFS
3766 test -z "$as_dir" && as_dir=.
3767 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003768 for ac_exec_ext in '' $ac_executable_extensions; do
3769 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3770 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3771 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003772 # Check for GNU $ac_path_EGREP
3773case `"$ac_path_EGREP" --version 2>&1` in
3774*GNU*)
3775 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3776*)
3777 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003778 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003779 while :
3780 do
3781 cat "conftest.in" "conftest.in" >"conftest.tmp"
3782 mv "conftest.tmp" "conftest.in"
3783 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003784 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003785 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3786 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3787 ac_count=`expr $ac_count + 1`
3788 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3789 # Best one so far, save it but keep looking for a better one
3790 ac_cv_path_EGREP="$ac_path_EGREP"
3791 ac_path_EGREP_max=$ac_count
3792 fi
3793 # 10*(2^10) chars as input seems more than enough
3794 test $ac_count -gt 10 && break
3795 done
3796 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3797esac
3798
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003799
3800 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003801 done
3802done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003803
3804done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003805IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003806
3807
3808fi
3809
3810EGREP="$ac_cv_path_EGREP"
3811if test -z "$EGREP"; then
3812 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3813echo "$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 +00003814 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003815fi
3816
Martin v. Löwiseba40652007-08-30 20:10:57 +00003817else
3818 ac_cv_path_EGREP=$EGREP
3819fi
3820
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003821
Martin v. Löwiseba40652007-08-30 20:10:57 +00003822 fi
3823fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003824{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3825echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003826 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003827
3828
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003829
3830{ echo "$as_me:$LINENO: checking for AIX" >&5
3831echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3832cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003833/* confdefs.h. */
3834_ACEOF
3835cat confdefs.h >>conftest.$ac_ext
3836cat >>conftest.$ac_ext <<_ACEOF
3837/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003838#ifdef _AIX
3839 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003840#endif
3841
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003842_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003843if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3844 $EGREP "yes" >/dev/null 2>&1; then
3845 { echo "$as_me:$LINENO: result: yes" >&5
3846echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003847cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003848#define _ALL_SOURCE 1
3849_ACEOF
3850
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003851else
3852 { echo "$as_me:$LINENO: result: no" >&5
3853echo "${ECHO_T}no" >&6; }
3854fi
3855rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003856
3857
3858
3859# Check for unsupported systems
3860case $ac_sys_system/$ac_sys_release in
3861atheos*|Linux*/1*)
3862 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3863 echo See README for details.
3864 exit 1;;
3865esac
3866
3867
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003868{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3869echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003870
3871# Check whether --with-suffix was given.
3872if test "${with_suffix+set}" = set; then
3873 withval=$with_suffix;
3874 case $withval in
3875 no) EXEEXT=;;
3876 yes) EXEEXT=.exe;;
3877 *) EXEEXT=$withval;;
3878 esac
3879fi
3880
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003881{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3882echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003883
3884# Test whether we're running on a non-case-sensitive system, in which
3885# case we give a warning if no ext is given
3886
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003887{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3888echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003889if test ! -d CaseSensitiveTestDir; then
3890mkdir CaseSensitiveTestDir
3891fi
3892
3893if test -d casesensitivetestdir
3894then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003895 { echo "$as_me:$LINENO: result: yes" >&5
3896echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003897 BUILDEXEEXT=.exe
3898else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003899 { echo "$as_me:$LINENO: result: no" >&5
3900echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003901 BUILDEXEEXT=$EXEEXT
3902fi
3903rmdir CaseSensitiveTestDir
3904
3905case $MACHDEP in
3906bsdos*)
3907 case $CC in
3908 gcc) CC="$CC -D_HAVE_BSDI";;
3909 esac;;
3910esac
3911
3912case $ac_sys_system in
3913hp*|HP*)
3914 case $CC in
3915 cc|*/cc) CC="$CC -Ae";;
3916 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003917SunOS*)
3918 # Some functions have a prototype only with that define, e.g. confstr
3919
3920cat >>confdefs.h <<\_ACEOF
3921#define __EXTENSIONS__ 1
3922_ACEOF
3923
3924 ;;
3925esac
3926
3927
3928
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003929{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3930echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003931if test -z "$LIBRARY"
3932then
3933 LIBRARY='libpython$(VERSION).a'
3934fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003935{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3936echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003937
3938# LDLIBRARY is the name of the library to link against (as opposed to the
3939# name of the library into which to insert object files). BLDLIBRARY is also
3940# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3941# is blank as the main program is not linked directly against LDLIBRARY.
3942# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3943# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3944# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3945# DLLLIBRARY is the shared (i.e., DLL) library.
3946#
3947# RUNSHARED is used to run shared python without installed libraries
3948#
3949# INSTSONAME is the name of the shared library that will be use to install
3950# on the system - some systems like version suffix, others don't
3951
3952
3953
3954
3955
3956
3957LDLIBRARY="$LIBRARY"
3958BLDLIBRARY='$(LDLIBRARY)'
3959INSTSONAME='$(LDLIBRARY)'
3960DLLLIBRARY=''
3961LDLIBRARYDIR=''
3962RUNSHARED=''
3963
3964# LINKCC is the command that links the python executable -- default is $(CC).
3965# If CXX is set, and if it is needed to link a main function that was
3966# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3967# python might then depend on the C++ runtime
3968# This is altered for AIX in order to build the export list before
3969# linking.
3970
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003971{ echo "$as_me:$LINENO: checking LINKCC" >&5
3972echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003973if test -z "$LINKCC"
3974then
3975 LINKCC='$(PURIFY) $(MAINCC)'
3976 case $ac_sys_system in
3977 AIX*)
3978 exp_extra="\"\""
3979 if test $ac_sys_release -ge 5 -o \
3980 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3981 exp_extra="."
3982 fi
3983 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003984 QNX*)
3985 # qcc must be used because the other compilers do not
3986 # support -N.
3987 LINKCC=qcc;;
3988 esac
3989fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003990{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3991echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003992
3993# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3994# make sure we default having it set to "no": this is used by
3995# distutils.unixccompiler to know if it should add --enable-new-dtags
3996# to linker command lines, and failing to detect GNU ld simply results
3997# in the same bahaviour as before.
3998
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003999{ echo "$as_me:$LINENO: checking for GNU ld" >&5
4000echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004001ac_prog=ld
4002if test "$GCC" = yes; then
4003 ac_prog=`$CC -print-prog-name=ld`
4004fi
4005case `"$ac_prog" -V 2>&1 < /dev/null` in
4006 *GNU*)
4007 GNULD=yes;;
4008 *)
4009 GNULD=no;;
4010esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004011{ echo "$as_me:$LINENO: result: $GNULD" >&5
4012echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004013
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004014{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4015echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004016# Check whether --enable-shared was given.
4017if test "${enable_shared+set}" = set; then
4018 enableval=$enable_shared;
4019fi
4020
4021
4022if test -z "$enable_shared"
4023then
4024 case $ac_sys_system in
4025 CYGWIN* | atheos*)
4026 enable_shared="yes";;
4027 *)
4028 enable_shared="no";;
4029 esac
4030fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004031{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4032echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004033
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004034{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4035echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004036# Check whether --enable-profiling was given.
4037if test "${enable_profiling+set}" = set; then
4038 enableval=$enable_profiling; ac_save_cc="$CC"
4039 CC="$CC -pg"
4040 if test "$cross_compiling" = yes; then
4041 ac_enable_profiling="no"
4042else
4043 cat >conftest.$ac_ext <<_ACEOF
4044/* confdefs.h. */
4045_ACEOF
4046cat confdefs.h >>conftest.$ac_ext
4047cat >>conftest.$ac_ext <<_ACEOF
4048/* end confdefs.h. */
4049int main() { return 0; }
4050_ACEOF
4051rm -f conftest$ac_exeext
4052if { (ac_try="$ac_link"
4053case "(($ac_try" in
4054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4055 *) ac_try_echo=$ac_try;;
4056esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004058 (eval "$ac_link") 2>&5
4059 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004061 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4062 { (case "(($ac_try" in
4063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4064 *) ac_try_echo=$ac_try;;
4065esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004067 (eval "$ac_try") 2>&5
4068 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004070 (exit $ac_status); }; }; then
4071 ac_enable_profiling="yes"
4072else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004073 echo "$as_me: program exited with status $ac_status" >&5
4074echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004075sed 's/^/| /' conftest.$ac_ext >&5
4076
4077( exit $ac_status )
4078ac_enable_profiling="no"
4079fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004080rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4081fi
4082
4083
4084 CC="$ac_save_cc"
4085fi
4086
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004087{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4088echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004089
4090case "$ac_enable_profiling" in
4091 "yes")
4092 BASECFLAGS="-pg $BASECFLAGS"
4093 LDFLAGS="-pg $LDFLAGS"
4094 ;;
4095esac
4096
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004097{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4098echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004099
4100# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4101# library that we build, but we do not want to link against it (we
4102# will find it with a -framework option). For this reason there is an
4103# extra variable BLDLIBRARY against which Python and the extension
4104# modules are linked, BLDLIBRARY. This is normally the same as
4105# LDLIBRARY, but empty for MacOSX framework builds.
4106if test "$enable_framework"
4107then
4108 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4109 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4110 BLDLIBRARY=''
4111else
4112 BLDLIBRARY='$(LDLIBRARY)'
4113fi
4114
4115# Other platforms follow
4116if test $enable_shared = "yes"; then
4117
4118cat >>confdefs.h <<\_ACEOF
4119#define Py_ENABLE_SHARED 1
4120_ACEOF
4121
4122 case $ac_sys_system in
4123 BeOS*)
4124 LDLIBRARY='libpython$(VERSION).so'
4125 ;;
4126 CYGWIN*)
4127 LDLIBRARY='libpython$(VERSION).dll.a'
4128 DLLLIBRARY='libpython$(VERSION).dll'
4129 ;;
4130 SunOS*)
4131 LDLIBRARY='libpython$(VERSION).so'
4132 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4133 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4134 INSTSONAME="$LDLIBRARY".$SOVERSION
4135 ;;
4136 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4137 LDLIBRARY='libpython$(VERSION).so'
4138 BLDLIBRARY='-L. -lpython$(VERSION)'
4139 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4140 case $ac_sys_system in
4141 FreeBSD*)
4142 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4143 ;;
4144 esac
4145 INSTSONAME="$LDLIBRARY".$SOVERSION
4146 ;;
4147 hp*|HP*)
4148 case `uname -m` in
4149 ia64)
4150 LDLIBRARY='libpython$(VERSION).so'
4151 ;;
4152 *)
4153 LDLIBRARY='libpython$(VERSION).sl'
4154 ;;
4155 esac
4156 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4157 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4158 ;;
4159 OSF*)
4160 LDLIBRARY='libpython$(VERSION).so'
4161 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4162 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4163 ;;
4164 atheos*)
4165 LDLIBRARY='libpython$(VERSION).so'
4166 BLDLIBRARY='-L. -lpython$(VERSION)'
4167 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4168 ;;
4169 Darwin*)
4170 LDLIBRARY='libpython$(VERSION).dylib'
4171 BLDLIBRARY='-L. -lpython$(VERSION)'
4172 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4173 ;;
4174
4175 esac
4176else # shared is disabled
4177 case $ac_sys_system in
4178 CYGWIN*)
4179 BLDLIBRARY='$(LIBRARY)'
4180 LDLIBRARY='libpython$(VERSION).dll.a'
4181 ;;
4182 esac
4183fi
4184
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004185{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4186echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004187
4188if test -n "$ac_tool_prefix"; then
4189 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4190set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004191{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4192echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004193if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004194 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004195else
4196 if test -n "$RANLIB"; then
4197 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4198else
4199as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4200for as_dir in $PATH
4201do
4202 IFS=$as_save_IFS
4203 test -z "$as_dir" && as_dir=.
4204 for ac_exec_ext in '' $ac_executable_extensions; do
4205 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4206 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004207 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004208 break 2
4209 fi
4210done
4211done
4212IFS=$as_save_IFS
4213
4214fi
4215fi
4216RANLIB=$ac_cv_prog_RANLIB
4217if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004218 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4219echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004220else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004221 { echo "$as_me:$LINENO: result: no" >&5
4222echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004223fi
4224
4225
4226fi
4227if test -z "$ac_cv_prog_RANLIB"; then
4228 ac_ct_RANLIB=$RANLIB
4229 # Extract the first word of "ranlib", so it can be a program name with args.
4230set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004231{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4232echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004233if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004234 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004235else
4236 if test -n "$ac_ct_RANLIB"; then
4237 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4238else
4239as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4240for as_dir in $PATH
4241do
4242 IFS=$as_save_IFS
4243 test -z "$as_dir" && as_dir=.
4244 for ac_exec_ext in '' $ac_executable_extensions; do
4245 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4246 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004247 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004248 break 2
4249 fi
4250done
4251done
4252IFS=$as_save_IFS
4253
4254fi
4255fi
4256ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4257if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004258 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4259echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004260else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004261 { echo "$as_me:$LINENO: result: no" >&5
4262echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004263fi
4264
4265 if test "x$ac_ct_RANLIB" = x; then
4266 RANLIB=":"
4267 else
4268 case $cross_compiling:$ac_tool_warned in
4269yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004270{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4271whose name does not start with the host triplet. If you think this
4272configuration is useful to you, please write to autoconf@gnu.org." >&5
4273echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4274whose name does not start with the host triplet. If you think this
4275configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004276ac_tool_warned=yes ;;
4277esac
4278 RANLIB=$ac_ct_RANLIB
4279 fi
4280else
4281 RANLIB="$ac_cv_prog_RANLIB"
4282fi
4283
4284
4285for ac_prog in ar aal
4286do
4287 # Extract the first word of "$ac_prog", so it can be a program name with args.
4288set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004289{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4290echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004291if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004292 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004293else
4294 if test -n "$AR"; then
4295 ac_cv_prog_AR="$AR" # Let the user override the test.
4296else
4297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4298for as_dir in $PATH
4299do
4300 IFS=$as_save_IFS
4301 test -z "$as_dir" && as_dir=.
4302 for ac_exec_ext in '' $ac_executable_extensions; do
4303 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4304 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004305 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004306 break 2
4307 fi
4308done
4309done
4310IFS=$as_save_IFS
4311
4312fi
4313fi
4314AR=$ac_cv_prog_AR
4315if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004316 { echo "$as_me:$LINENO: result: $AR" >&5
4317echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004318else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004319 { echo "$as_me:$LINENO: result: no" >&5
4320echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004321fi
4322
4323
4324 test -n "$AR" && break
4325done
4326test -n "$AR" || AR="ar"
4327
4328
4329# tweak ARFLAGS only if the user didn't set it on the command line
4330
4331if test -z "$ARFLAGS"
4332then
4333 ARFLAGS="rc"
4334fi
4335
4336
4337# Extract the first word of "svnversion", so it can be a program name with args.
4338set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004339{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4340echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004341if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004342 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004343else
4344 if test -n "$SVNVERSION"; then
4345 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4346else
4347as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4348for as_dir in $PATH
4349do
4350 IFS=$as_save_IFS
4351 test -z "$as_dir" && as_dir=.
4352 for ac_exec_ext in '' $ac_executable_extensions; do
4353 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4354 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004355 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004356 break 2
4357 fi
4358done
4359done
4360IFS=$as_save_IFS
4361
4362 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4363fi
4364fi
4365SVNVERSION=$ac_cv_prog_SVNVERSION
4366if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004367 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4368echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004369else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004370 { echo "$as_me:$LINENO: result: no" >&5
4371echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004372fi
4373
4374
4375if test $SVNVERSION = found
4376then
4377 SVNVERSION="svnversion \$(srcdir)"
4378else
4379 SVNVERSION="echo Unversioned directory"
4380fi
4381
4382case $MACHDEP in
4383bsdos*|hp*|HP*)
4384 # install -d does not work on BSDI or HP-UX
4385 if test -z "$INSTALL"
4386 then
4387 INSTALL="${srcdir}/install-sh -c"
4388 fi
4389esac
4390ac_aux_dir=
4391for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4392 if test -f "$ac_dir/install-sh"; then
4393 ac_aux_dir=$ac_dir
4394 ac_install_sh="$ac_aux_dir/install-sh -c"
4395 break
4396 elif test -f "$ac_dir/install.sh"; then
4397 ac_aux_dir=$ac_dir
4398 ac_install_sh="$ac_aux_dir/install.sh -c"
4399 break
4400 elif test -f "$ac_dir/shtool"; then
4401 ac_aux_dir=$ac_dir
4402 ac_install_sh="$ac_aux_dir/shtool install -c"
4403 break
4404 fi
4405done
4406if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004407 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4408echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004409 { (exit 1); exit 1; }; }
4410fi
4411
4412# These three variables are undocumented and unsupported,
4413# and are intended to be withdrawn in a future Autoconf release.
4414# They can cause serious problems if a builder's source tree is in a directory
4415# whose full name contains unusual characters.
4416ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4417ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4418ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4419
4420
4421# Find a good install program. We prefer a C program (faster),
4422# so one script is as good as another. But avoid the broken or
4423# incompatible versions:
4424# SysV /etc/install, /usr/sbin/install
4425# SunOS /usr/etc/install
4426# IRIX /sbin/install
4427# AIX /bin/install
4428# AmigaOS /C/install, which installs bootblocks on floppy discs
4429# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4430# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4431# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4432# OS/2's system install, which has a completely different semantic
4433# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004434{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4435echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004436if test -z "$INSTALL"; then
4437if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004438 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004439else
4440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4441for as_dir in $PATH
4442do
4443 IFS=$as_save_IFS
4444 test -z "$as_dir" && as_dir=.
4445 # Account for people who put trailing slashes in PATH elements.
4446case $as_dir/ in
4447 ./ | .// | /cC/* | \
4448 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4449 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4450 /usr/ucb/* ) ;;
4451 *)
4452 # OSF1 and SCO ODT 3.0 have their own names for install.
4453 # Don't use installbsd from OSF since it installs stuff as root
4454 # by default.
4455 for ac_prog in ginstall scoinst install; do
4456 for ac_exec_ext in '' $ac_executable_extensions; do
4457 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4458 if test $ac_prog = install &&
4459 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4460 # AIX install. It has an incompatible calling convention.
4461 :
4462 elif test $ac_prog = install &&
4463 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4464 # program-specific install script used by HP pwplus--don't use.
4465 :
4466 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004467 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4468 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004469 fi
4470 fi
4471 done
4472 done
4473 ;;
4474esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004475done
4476IFS=$as_save_IFS
4477
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004478
4479fi
4480 if test "${ac_cv_path_install+set}" = set; then
4481 INSTALL=$ac_cv_path_install
4482 else
4483 # As a last resort, use the slow shell script. Don't cache a
4484 # value for INSTALL within a source directory, because that will
4485 # break other packages using the cache if that directory is
4486 # removed, or if the value is a relative name.
4487 INSTALL=$ac_install_sh
4488 fi
4489fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004490{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4491echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004492
4493# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4494# It thinks the first close brace ends the variable substitution.
4495test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4496
4497test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4498
4499test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4500
4501
4502# Not every filesystem supports hard links
4503
4504if test -z "$LN" ; then
4505 case $ac_sys_system in
4506 BeOS*) LN="ln -s";;
4507 CYGWIN*) LN="ln -s";;
4508 atheos*) LN="ln -s";;
4509 *) LN=ln;;
4510 esac
4511fi
4512
4513# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004514{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4515echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004516
4517# Check whether --with-pydebug was given.
4518if test "${with_pydebug+set}" = set; then
4519 withval=$with_pydebug;
4520if test "$withval" != no
4521then
4522
4523cat >>confdefs.h <<\_ACEOF
4524#define Py_DEBUG 1
4525_ACEOF
4526
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004527 { echo "$as_me:$LINENO: result: yes" >&5
4528echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004529 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004530else { echo "$as_me:$LINENO: result: no" >&5
4531echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004532fi
4533else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004534 { echo "$as_me:$LINENO: result: no" >&5
4535echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004536fi
4537
4538
4539# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4540# merged with this chunk of code?
4541
4542# Optimizer/debugger flags
4543# ------------------------
4544# (The following bit of code is complicated enough - please keep things
4545# indented properly. Just pretend you're editing Python code. ;-)
4546
4547# There are two parallel sets of case statements below, one that checks to
4548# see if OPT was set and one that does BASECFLAGS setting based upon
4549# compiler and platform. BASECFLAGS tweaks need to be made even if the
4550# user set OPT.
4551
4552# tweak OPT based on compiler and platform, only if the user didn't set
4553# it on the command line
4554
4555if test -z "$OPT"
4556then
4557 case $GCC in
4558 yes)
4559 if test "$CC" != 'g++' ; then
4560 STRICT_PROTO="-Wstrict-prototypes"
4561 fi
4562 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4563 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4564 WRAP="-fwrapv"
4565 fi
4566 case $ac_cv_prog_cc_g in
4567 yes)
4568 if test "$Py_DEBUG" = 'true' ; then
4569 # Optimization messes up debuggers, so turn it off for
4570 # debug builds.
4571 OPT="-g -Wall $STRICT_PROTO"
4572 else
4573 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4574 fi
4575 ;;
4576 *)
4577 OPT="-O3 -Wall $STRICT_PROTO"
4578 ;;
4579 esac
4580 case $ac_sys_system in
4581 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4582 ;;
4583 esac
4584 ;;
4585
4586 *)
4587 OPT="-O"
4588 ;;
4589 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004590fi
4591
4592
4593
4594# The -arch flags for universal builds on OSX
4595UNIVERSAL_ARCH_FLAGS=
4596
4597
4598# tweak BASECFLAGS based on compiler and platform
4599case $GCC in
4600yes)
4601 # Python violates C99 rules, by casting between incompatible
4602 # pointer types. GCC may generate bad code as a result of that,
4603 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004604 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4605echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004606 ac_save_cc="$CC"
4607 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004608 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4609 echo $ECHO_N "(cached) $ECHO_C" >&6
4610else
4611 if test "$cross_compiling" = yes; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004612 ac_cv_no_strict_aliasing_ok=no
4613else
4614 cat >conftest.$ac_ext <<_ACEOF
4615/* confdefs.h. */
4616_ACEOF
4617cat confdefs.h >>conftest.$ac_ext
4618cat >>conftest.$ac_ext <<_ACEOF
4619/* end confdefs.h. */
4620int main() { return 0; }
4621_ACEOF
4622rm -f conftest$ac_exeext
4623if { (ac_try="$ac_link"
4624case "(($ac_try" in
4625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4626 *) ac_try_echo=$ac_try;;
4627esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004629 (eval "$ac_link") 2>&5
4630 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004632 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4633 { (case "(($ac_try" in
4634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4635 *) ac_try_echo=$ac_try;;
4636esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004638 (eval "$ac_try") 2>&5
4639 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004641 (exit $ac_status); }; }; then
4642 ac_cv_no_strict_aliasing_ok=yes
4643else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004644 echo "$as_me: program exited with status $ac_status" >&5
4645echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004646sed 's/^/| /' conftest.$ac_ext >&5
4647
4648( exit $ac_status )
4649ac_cv_no_strict_aliasing_ok=no
4650fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004651rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4652fi
4653
4654
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004655fi
4656
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004657 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004658 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4659echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004660 if test $ac_cv_no_strict_aliasing_ok = yes
4661 then
4662 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4663 fi
4664
4665 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4666 # support. Without this, treatment of subnormals doesn't follow
4667 # the standard.
4668 case $ac_sys_machine in
4669 alpha*)
4670 BASECFLAGS="$BASECFLAGS -mieee"
4671 ;;
4672 esac
4673
4674 case $ac_sys_system in
4675 SCO_SV*)
4676 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4677 ;;
4678 # is there any other compiler on Darwin besides gcc?
4679 Darwin*)
4680 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4681 # used to be here, but non-Apple gcc doesn't accept them.
4682
4683
4684 if test "${enable_universalsdk}"; then
4685 UNIVERSAL_ARCH_FLAGS=""
4686 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4687 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4688 ARCH_RUN_32BIT=""
4689
4690 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4691 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4692
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
4697 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004698 { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
4699echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004700 { (exit 1); exit 1; }; }
4701
4702 fi
4703
4704
4705 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4706 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4707 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4708 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4709 fi
4710 fi
4711
4712 # Calculate the right deployment target for this build.
4713 #
4714 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4715 if test ${cur_target} '>' 10.2; then
4716 cur_target=10.3
4717 fi
4718 if test "${UNIVERSAL_ARCHS}" = "all"; then
4719 # Ensure that the default platform for a 4-way
4720 # universal build is OSX 10.5, that's the first
4721 # OS release where 4-way builds make sense.
4722 cur_target='10.5'
4723 fi
4724 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4725
4726 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4727 # environment with a value that is the same as what we'll use
4728 # in the Makefile to ensure that we'll get the same compiler
4729 # environment during configure and build time.
4730 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4731 export MACOSX_DEPLOYMENT_TARGET
4732 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4733
4734 ;;
4735 OSF*)
4736 BASECFLAGS="$BASECFLAGS -mieee"
4737 ;;
4738 esac
4739 ;;
4740
4741*)
4742 case $ac_sys_system in
4743 OpenUNIX*|UnixWare*)
4744 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4745 ;;
4746 OSF*)
4747 BASECFLAGS="$BASECFLAGS -ieee -std"
4748 ;;
4749 SCO_SV*)
4750 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4751 ;;
4752 esac
4753 ;;
4754esac
4755
4756if test "$Py_DEBUG" = 'true'; then
4757 :
4758else
4759 OPT="-DNDEBUG $OPT"
4760fi
4761
4762if test "$ac_arch_flags"
4763then
4764 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4765fi
4766
4767# disable check for icc since it seems to pass, but generates a warning
4768if test "$CC" = icc
4769then
4770 ac_cv_opt_olimit_ok=no
4771fi
4772
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004773{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4774echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004775if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004776 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004777else
4778 ac_save_cc="$CC"
4779CC="$CC -OPT:Olimit=0"
4780if test "$cross_compiling" = yes; then
4781 ac_cv_opt_olimit_ok=no
4782else
4783 cat >conftest.$ac_ext <<_ACEOF
4784/* confdefs.h. */
4785_ACEOF
4786cat confdefs.h >>conftest.$ac_ext
4787cat >>conftest.$ac_ext <<_ACEOF
4788/* end confdefs.h. */
4789int main() { return 0; }
4790_ACEOF
4791rm -f conftest$ac_exeext
4792if { (ac_try="$ac_link"
4793case "(($ac_try" in
4794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4795 *) ac_try_echo=$ac_try;;
4796esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004798 (eval "$ac_link") 2>&5
4799 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004801 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4802 { (case "(($ac_try" in
4803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4804 *) ac_try_echo=$ac_try;;
4805esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004807 (eval "$ac_try") 2>&5
4808 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004810 (exit $ac_status); }; }; then
4811 ac_cv_opt_olimit_ok=yes
4812else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004813 echo "$as_me: program exited with status $ac_status" >&5
4814echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004815sed 's/^/| /' conftest.$ac_ext >&5
4816
4817( exit $ac_status )
4818ac_cv_opt_olimit_ok=no
4819fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004820rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4821fi
4822
4823
4824CC="$ac_save_cc"
4825fi
4826
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004827{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4828echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004829if test $ac_cv_opt_olimit_ok = yes; then
4830 case $ac_sys_system in
4831 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4832 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4833 # environment?
4834 Darwin*)
4835 ;;
4836 *)
4837 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4838 ;;
4839 esac
4840else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004841 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4842echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004843 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004844 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004845else
4846 ac_save_cc="$CC"
4847 CC="$CC -Olimit 1500"
4848 if test "$cross_compiling" = yes; then
4849 ac_cv_olimit_ok=no
4850else
4851 cat >conftest.$ac_ext <<_ACEOF
4852/* confdefs.h. */
4853_ACEOF
4854cat confdefs.h >>conftest.$ac_ext
4855cat >>conftest.$ac_ext <<_ACEOF
4856/* end confdefs.h. */
4857int main() { return 0; }
4858_ACEOF
4859rm -f conftest$ac_exeext
4860if { (ac_try="$ac_link"
4861case "(($ac_try" in
4862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4863 *) ac_try_echo=$ac_try;;
4864esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004866 (eval "$ac_link") 2>&5
4867 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004869 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4870 { (case "(($ac_try" in
4871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4872 *) ac_try_echo=$ac_try;;
4873esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004875 (eval "$ac_try") 2>&5
4876 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004878 (exit $ac_status); }; }; then
4879 ac_cv_olimit_ok=yes
4880else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004881 echo "$as_me: program exited with status $ac_status" >&5
4882echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004883sed 's/^/| /' conftest.$ac_ext >&5
4884
4885( exit $ac_status )
4886ac_cv_olimit_ok=no
4887fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4889fi
4890
4891
4892 CC="$ac_save_cc"
4893fi
4894
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004895 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4896echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004897 if test $ac_cv_olimit_ok = yes; then
4898 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4899 fi
4900fi
4901
4902# Check whether GCC supports PyArg_ParseTuple format
4903if test "$GCC" = "yes"
4904then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004905 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4906echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004907 save_CFLAGS=$CFLAGS
4908 CFLAGS="$CFLAGS -Werror"
4909 cat >conftest.$ac_ext <<_ACEOF
4910/* confdefs.h. */
4911_ACEOF
4912cat confdefs.h >>conftest.$ac_ext
4913cat >>conftest.$ac_ext <<_ACEOF
4914/* end confdefs.h. */
4915
4916 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4917
4918int
4919main ()
4920{
4921
4922 ;
4923 return 0;
4924}
4925_ACEOF
4926rm -f conftest.$ac_objext
4927if { (ac_try="$ac_compile"
4928case "(($ac_try" in
4929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4930 *) ac_try_echo=$ac_try;;
4931esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004933 (eval "$ac_compile") 2>conftest.er1
4934 ac_status=$?
4935 grep -v '^ *+' conftest.er1 >conftest.err
4936 rm -f conftest.er1
4937 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004939 (exit $ac_status); } && {
4940 test -z "$ac_c_werror_flag" ||
4941 test ! -s conftest.err
4942 } && test -s conftest.$ac_objext; then
4943
4944cat >>confdefs.h <<\_ACEOF
4945#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4946_ACEOF
4947
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004948 { echo "$as_me:$LINENO: result: yes" >&5
4949echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004950else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004951 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004952sed 's/^/| /' conftest.$ac_ext >&5
4953
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004954 { echo "$as_me:$LINENO: result: no" >&5
4955echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004956
4957fi
4958
4959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4960 CFLAGS=$save_CFLAGS
4961fi
4962
4963# On some compilers, pthreads are available without further options
4964# (e.g. MacOS X). On some of these systems, the compiler will not
4965# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4966# So we have to see first whether pthreads are available without
4967# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004968{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4969echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004970if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004971 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004972else
4973 if test "$cross_compiling" = yes; then
4974 ac_cv_pthread_is_default=no
4975else
4976 cat >conftest.$ac_ext <<_ACEOF
4977/* confdefs.h. */
4978_ACEOF
4979cat confdefs.h >>conftest.$ac_ext
4980cat >>conftest.$ac_ext <<_ACEOF
4981/* end confdefs.h. */
4982
4983#include <pthread.h>
4984
4985void* routine(void* p){return NULL;}
4986
4987int main(){
4988 pthread_t p;
4989 if(pthread_create(&p,NULL,routine,NULL)!=0)
4990 return 1;
4991 (void)pthread_detach(p);
4992 return 0;
4993}
4994
4995_ACEOF
4996rm -f conftest$ac_exeext
4997if { (ac_try="$ac_link"
4998case "(($ac_try" in
4999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5000 *) ac_try_echo=$ac_try;;
5001esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005003 (eval "$ac_link") 2>&5
5004 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005006 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5007 { (case "(($ac_try" in
5008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5009 *) ac_try_echo=$ac_try;;
5010esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005012 (eval "$ac_try") 2>&5
5013 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005015 (exit $ac_status); }; }; then
5016
5017 ac_cv_pthread_is_default=yes
5018 ac_cv_kthread=no
5019 ac_cv_pthread=no
5020
5021else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005022 echo "$as_me: program exited with status $ac_status" >&5
5023echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005024sed 's/^/| /' conftest.$ac_ext >&5
5025
5026( exit $ac_status )
5027ac_cv_pthread_is_default=no
5028fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005029rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5030fi
5031
5032
5033
5034fi
5035
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005036{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5037echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005038
5039
5040if test $ac_cv_pthread_is_default = yes
5041then
5042 ac_cv_kpthread=no
5043else
5044# -Kpthread, if available, provides the right #defines
5045# and linker options to make pthread_create available
5046# Some compilers won't report that they do not support -Kpthread,
5047# so we need to run a program to see whether it really made the
5048# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005049{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5050echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005051if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005052 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005053else
5054 ac_save_cc="$CC"
5055CC="$CC -Kpthread"
5056if test "$cross_compiling" = yes; then
5057 ac_cv_kpthread=no
5058else
5059 cat >conftest.$ac_ext <<_ACEOF
5060/* confdefs.h. */
5061_ACEOF
5062cat confdefs.h >>conftest.$ac_ext
5063cat >>conftest.$ac_ext <<_ACEOF
5064/* end confdefs.h. */
5065
5066#include <pthread.h>
5067
5068void* routine(void* p){return NULL;}
5069
5070int main(){
5071 pthread_t p;
5072 if(pthread_create(&p,NULL,routine,NULL)!=0)
5073 return 1;
5074 (void)pthread_detach(p);
5075 return 0;
5076}
5077
5078_ACEOF
5079rm -f conftest$ac_exeext
5080if { (ac_try="$ac_link"
5081case "(($ac_try" in
5082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5083 *) ac_try_echo=$ac_try;;
5084esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005086 (eval "$ac_link") 2>&5
5087 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005089 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5090 { (case "(($ac_try" in
5091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5092 *) ac_try_echo=$ac_try;;
5093esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005095 (eval "$ac_try") 2>&5
5096 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005098 (exit $ac_status); }; }; then
5099 ac_cv_kpthread=yes
5100else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005101 echo "$as_me: program exited with status $ac_status" >&5
5102echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005103sed 's/^/| /' conftest.$ac_ext >&5
5104
5105( exit $ac_status )
5106ac_cv_kpthread=no
5107fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005108rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5109fi
5110
5111
5112CC="$ac_save_cc"
5113fi
5114
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005115{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5116echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005117fi
5118
5119if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5120then
5121# -Kthread, if available, provides the right #defines
5122# and linker options to make pthread_create available
5123# Some compilers won't report that they do not support -Kthread,
5124# so we need to run a program to see whether it really made the
5125# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005126{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5127echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005128if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005129 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005130else
5131 ac_save_cc="$CC"
5132CC="$CC -Kthread"
5133if test "$cross_compiling" = yes; then
5134 ac_cv_kthread=no
5135else
5136 cat >conftest.$ac_ext <<_ACEOF
5137/* confdefs.h. */
5138_ACEOF
5139cat confdefs.h >>conftest.$ac_ext
5140cat >>conftest.$ac_ext <<_ACEOF
5141/* end confdefs.h. */
5142
5143#include <pthread.h>
5144
5145void* routine(void* p){return NULL;}
5146
5147int main(){
5148 pthread_t p;
5149 if(pthread_create(&p,NULL,routine,NULL)!=0)
5150 return 1;
5151 (void)pthread_detach(p);
5152 return 0;
5153}
5154
5155_ACEOF
5156rm -f conftest$ac_exeext
5157if { (ac_try="$ac_link"
5158case "(($ac_try" in
5159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5160 *) ac_try_echo=$ac_try;;
5161esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005163 (eval "$ac_link") 2>&5
5164 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005166 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5167 { (case "(($ac_try" in
5168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5169 *) ac_try_echo=$ac_try;;
5170esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005172 (eval "$ac_try") 2>&5
5173 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005175 (exit $ac_status); }; }; then
5176 ac_cv_kthread=yes
5177else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005178 echo "$as_me: program exited with status $ac_status" >&5
5179echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005180sed 's/^/| /' conftest.$ac_ext >&5
5181
5182( exit $ac_status )
5183ac_cv_kthread=no
5184fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005185rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5186fi
5187
5188
5189CC="$ac_save_cc"
5190fi
5191
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005192{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5193echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005194fi
5195
5196if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5197then
5198# -pthread, if available, provides the right #defines
5199# and linker options to make pthread_create available
5200# Some compilers won't report that they do not support -pthread,
5201# so we need to run a program to see whether it really made the
5202# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005203{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5204echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005205if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005206 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005207else
5208 ac_save_cc="$CC"
5209CC="$CC -pthread"
5210if test "$cross_compiling" = yes; then
5211 ac_cv_pthread=no
5212else
5213 cat >conftest.$ac_ext <<_ACEOF
5214/* confdefs.h. */
5215_ACEOF
5216cat confdefs.h >>conftest.$ac_ext
5217cat >>conftest.$ac_ext <<_ACEOF
5218/* end confdefs.h. */
5219
5220#include <pthread.h>
5221
5222void* routine(void* p){return NULL;}
5223
5224int main(){
5225 pthread_t p;
5226 if(pthread_create(&p,NULL,routine,NULL)!=0)
5227 return 1;
5228 (void)pthread_detach(p);
5229 return 0;
5230}
5231
5232_ACEOF
5233rm -f conftest$ac_exeext
5234if { (ac_try="$ac_link"
5235case "(($ac_try" in
5236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5237 *) ac_try_echo=$ac_try;;
5238esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005240 (eval "$ac_link") 2>&5
5241 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005243 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5244 { (case "(($ac_try" in
5245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5246 *) ac_try_echo=$ac_try;;
5247esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005249 (eval "$ac_try") 2>&5
5250 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005252 (exit $ac_status); }; }; then
5253 ac_cv_pthread=yes
5254else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005255 echo "$as_me: program exited with status $ac_status" >&5
5256echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005257sed 's/^/| /' conftest.$ac_ext >&5
5258
5259( exit $ac_status )
5260ac_cv_pthread=no
5261fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5263fi
5264
5265
5266CC="$ac_save_cc"
5267fi
5268
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005269{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5270echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005271fi
5272
5273# If we have set a CC compiler flag for thread support then
5274# check if it works for CXX, too.
5275ac_cv_cxx_thread=no
5276if test ! -z "$CXX"
5277then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005278{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5279echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005280ac_save_cxx="$CXX"
5281
5282if test "$ac_cv_kpthread" = "yes"
5283then
5284 CXX="$CXX -Kpthread"
5285 ac_cv_cxx_thread=yes
5286elif test "$ac_cv_kthread" = "yes"
5287then
5288 CXX="$CXX -Kthread"
5289 ac_cv_cxx_thread=yes
5290elif test "$ac_cv_pthread" = "yes"
5291then
5292 CXX="$CXX -pthread"
5293 ac_cv_cxx_thread=yes
5294fi
5295
5296if test $ac_cv_cxx_thread = yes
5297then
5298 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5299 $CXX -c conftest.$ac_ext 2>&5
5300 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5301 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5302 then
5303 ac_cv_cxx_thread=yes
5304 else
5305 ac_cv_cxx_thread=no
5306 fi
5307 rm -fr conftest*
5308fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005309{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5310echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005311fi
5312CXX="$ac_save_cxx"
5313
5314
5315# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005316{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5317echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005318if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005319 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005320else
5321 cat >conftest.$ac_ext <<_ACEOF
5322/* confdefs.h. */
5323_ACEOF
5324cat confdefs.h >>conftest.$ac_ext
5325cat >>conftest.$ac_ext <<_ACEOF
5326/* end confdefs.h. */
5327#include <stdlib.h>
5328#include <stdarg.h>
5329#include <string.h>
5330#include <float.h>
5331
5332int
5333main ()
5334{
5335
5336 ;
5337 return 0;
5338}
5339_ACEOF
5340rm -f conftest.$ac_objext
5341if { (ac_try="$ac_compile"
5342case "(($ac_try" in
5343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5344 *) ac_try_echo=$ac_try;;
5345esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005347 (eval "$ac_compile") 2>conftest.er1
5348 ac_status=$?
5349 grep -v '^ *+' conftest.er1 >conftest.err
5350 rm -f conftest.er1
5351 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005353 (exit $ac_status); } && {
5354 test -z "$ac_c_werror_flag" ||
5355 test ! -s conftest.err
5356 } && test -s conftest.$ac_objext; then
5357 ac_cv_header_stdc=yes
5358else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005359 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005360sed 's/^/| /' conftest.$ac_ext >&5
5361
5362 ac_cv_header_stdc=no
5363fi
5364
5365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5366
5367if test $ac_cv_header_stdc = yes; then
5368 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5369 cat >conftest.$ac_ext <<_ACEOF
5370/* confdefs.h. */
5371_ACEOF
5372cat confdefs.h >>conftest.$ac_ext
5373cat >>conftest.$ac_ext <<_ACEOF
5374/* end confdefs.h. */
5375#include <string.h>
5376
5377_ACEOF
5378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5379 $EGREP "memchr" >/dev/null 2>&1; then
5380 :
5381else
5382 ac_cv_header_stdc=no
5383fi
5384rm -f conftest*
5385
5386fi
5387
5388if test $ac_cv_header_stdc = yes; then
5389 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5390 cat >conftest.$ac_ext <<_ACEOF
5391/* confdefs.h. */
5392_ACEOF
5393cat confdefs.h >>conftest.$ac_ext
5394cat >>conftest.$ac_ext <<_ACEOF
5395/* end confdefs.h. */
5396#include <stdlib.h>
5397
5398_ACEOF
5399if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5400 $EGREP "free" >/dev/null 2>&1; then
5401 :
5402else
5403 ac_cv_header_stdc=no
5404fi
5405rm -f conftest*
5406
5407fi
5408
5409if test $ac_cv_header_stdc = yes; then
5410 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5411 if test "$cross_compiling" = yes; then
5412 :
5413else
5414 cat >conftest.$ac_ext <<_ACEOF
5415/* confdefs.h. */
5416_ACEOF
5417cat confdefs.h >>conftest.$ac_ext
5418cat >>conftest.$ac_ext <<_ACEOF
5419/* end confdefs.h. */
5420#include <ctype.h>
5421#include <stdlib.h>
5422#if ((' ' & 0x0FF) == 0x020)
5423# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5424# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5425#else
5426# define ISLOWER(c) \
5427 (('a' <= (c) && (c) <= 'i') \
5428 || ('j' <= (c) && (c) <= 'r') \
5429 || ('s' <= (c) && (c) <= 'z'))
5430# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5431#endif
5432
5433#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5434int
5435main ()
5436{
5437 int i;
5438 for (i = 0; i < 256; i++)
5439 if (XOR (islower (i), ISLOWER (i))
5440 || toupper (i) != TOUPPER (i))
5441 return 2;
5442 return 0;
5443}
5444_ACEOF
5445rm -f conftest$ac_exeext
5446if { (ac_try="$ac_link"
5447case "(($ac_try" in
5448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5449 *) ac_try_echo=$ac_try;;
5450esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005452 (eval "$ac_link") 2>&5
5453 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005455 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5456 { (case "(($ac_try" in
5457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5458 *) ac_try_echo=$ac_try;;
5459esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005461 (eval "$ac_try") 2>&5
5462 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005464 (exit $ac_status); }; }; then
5465 :
5466else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005467 echo "$as_me: program exited with status $ac_status" >&5
5468echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005469sed 's/^/| /' conftest.$ac_ext >&5
5470
5471( exit $ac_status )
5472ac_cv_header_stdc=no
5473fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005474rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5475fi
5476
5477
5478fi
5479fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005480{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5481echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005482if test $ac_cv_header_stdc = yes; then
5483
5484cat >>confdefs.h <<\_ACEOF
5485#define STDC_HEADERS 1
5486_ACEOF
5487
5488fi
5489
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005490# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5501 inttypes.h stdint.h unistd.h
5502do
5503as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5504{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5505echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5506if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5507 echo $ECHO_N "(cached) $ECHO_C" >&6
5508else
5509 cat >conftest.$ac_ext <<_ACEOF
5510/* confdefs.h. */
5511_ACEOF
5512cat confdefs.h >>conftest.$ac_ext
5513cat >>conftest.$ac_ext <<_ACEOF
5514/* end confdefs.h. */
5515$ac_includes_default
5516
5517#include <$ac_header>
5518_ACEOF
5519rm -f conftest.$ac_objext
5520if { (ac_try="$ac_compile"
5521case "(($ac_try" in
5522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5523 *) ac_try_echo=$ac_try;;
5524esac
5525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5526 (eval "$ac_compile") 2>conftest.er1
5527 ac_status=$?
5528 grep -v '^ *+' conftest.er1 >conftest.err
5529 rm -f conftest.er1
5530 cat conftest.err >&5
5531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5532 (exit $ac_status); } && {
5533 test -z "$ac_c_werror_flag" ||
5534 test ! -s conftest.err
5535 } && test -s conftest.$ac_objext; then
5536 eval "$as_ac_Header=yes"
5537else
5538 echo "$as_me: failed program was:" >&5
5539sed 's/^/| /' conftest.$ac_ext >&5
5540
5541 eval "$as_ac_Header=no"
5542fi
5543
5544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5545fi
5546ac_res=`eval echo '${'$as_ac_Header'}'`
5547 { echo "$as_me:$LINENO: result: $ac_res" >&5
5548echo "${ECHO_T}$ac_res" >&6; }
5549if test `eval echo '${'$as_ac_Header'}'` = yes; then
5550 cat >>confdefs.h <<_ACEOF
5551#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5552_ACEOF
5553
5554fi
5555
5556done
5557
5558
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005559
Martin v. Löwis11437992002-04-12 09:54:03 +00005560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
Anthony Baxter8a560de2004-10-13 15:30:56 +00005595
Martin v. Löwisc3001752005-01-23 09:27:24 +00005596
Martin v. Löwis11017b12006-01-14 18:12:57 +00005597
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005598
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005599
5600
5601
5602
5603
5604
5605
5606
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005607
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005608
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005609
5610
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005611
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005612
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005613for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5614fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005615ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005616shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005617unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005618sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5619sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005620sys/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 +00005621sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005622sys/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 +00005623sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005624bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005625do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005626as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005627if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005628 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5629echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005630if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005631 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005632fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005633ac_res=`eval echo '${'$as_ac_Header'}'`
5634 { echo "$as_me:$LINENO: result: $ac_res" >&5
5635echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005636else
Martin v. Löwis11437992002-04-12 09:54:03 +00005637 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005638{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5639echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005640cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005641/* confdefs.h. */
5642_ACEOF
5643cat confdefs.h >>conftest.$ac_ext
5644cat >>conftest.$ac_ext <<_ACEOF
5645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005646$ac_includes_default
5647#include <$ac_header>
5648_ACEOF
5649rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005650if { (ac_try="$ac_compile"
5651case "(($ac_try" in
5652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5653 *) ac_try_echo=$ac_try;;
5654esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005656 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005657 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005658 grep -v '^ *+' conftest.er1 >conftest.err
5659 rm -f conftest.er1
5660 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005662 (exit $ac_status); } && {
5663 test -z "$ac_c_werror_flag" ||
5664 test ! -s conftest.err
5665 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005666 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005667else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005669sed 's/^/| /' conftest.$ac_ext >&5
5670
Martin v. Löwiseba40652007-08-30 20:10:57 +00005671 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005672fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005673
5674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005675{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5676echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005677
5678# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005679{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5680echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005681cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005682/* confdefs.h. */
5683_ACEOF
5684cat confdefs.h >>conftest.$ac_ext
5685cat >>conftest.$ac_ext <<_ACEOF
5686/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005687#include <$ac_header>
5688_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005689if { (ac_try="$ac_cpp conftest.$ac_ext"
5690case "(($ac_try" in
5691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5692 *) ac_try_echo=$ac_try;;
5693esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005695 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005696 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005697 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005698 rm -f conftest.er1
5699 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005701 (exit $ac_status); } >/dev/null && {
5702 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5703 test ! -s conftest.err
5704 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005705 ac_header_preproc=yes
5706else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005708sed 's/^/| /' conftest.$ac_ext >&5
5709
Martin v. Löwis11437992002-04-12 09:54:03 +00005710 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005711fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005712
Martin v. Löwis11437992002-04-12 09:54:03 +00005713rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005714{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5715echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005716
5717# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005718case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5719 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005720 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5721echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5722 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5723echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005724 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005725 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005726 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005727 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5728echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5729 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5730echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5731 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5732echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5733 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5734echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5735 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5736echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5737 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5738echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005739 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005740## -------------------------------------- ##
5741## Report this to http://bugs.python.org/ ##
5742## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005743_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005744 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005745 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005746esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005747{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5748echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005749if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005750 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005751else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005752 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005753fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005754ac_res=`eval echo '${'$as_ac_Header'}'`
5755 { echo "$as_me:$LINENO: result: $ac_res" >&5
5756echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005757
5758fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005759if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005760 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005761#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005762_ACEOF
5763
5764fi
5765
Guido van Rossum627b2d71993-12-24 10:39:16 +00005766done
5767
Martin v. Löwis11437992002-04-12 09:54:03 +00005768
5769
5770
5771
5772
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005773ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005774for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005775 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5776{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5777echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005778if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005779 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005780else
Martin v. Löwis11437992002-04-12 09:54:03 +00005781 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005782/* confdefs.h. */
5783_ACEOF
5784cat confdefs.h >>conftest.$ac_ext
5785cat >>conftest.$ac_ext <<_ACEOF
5786/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005787#include <sys/types.h>
5788#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005789
Martin v. Löwis11437992002-04-12 09:54:03 +00005790int
5791main ()
5792{
5793if ((DIR *) 0)
5794return 0;
5795 ;
5796 return 0;
5797}
5798_ACEOF
5799rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005800if { (ac_try="$ac_compile"
5801case "(($ac_try" in
5802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5803 *) ac_try_echo=$ac_try;;
5804esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005806 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005808 grep -v '^ *+' conftest.er1 >conftest.err
5809 rm -f conftest.er1
5810 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005812 (exit $ac_status); } && {
5813 test -z "$ac_c_werror_flag" ||
5814 test ! -s conftest.err
5815 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005816 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005817else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005819sed 's/^/| /' conftest.$ac_ext >&5
5820
Martin v. Löwiseba40652007-08-30 20:10:57 +00005821 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005822fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005823
5824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005825fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005826ac_res=`eval echo '${'$as_ac_Header'}'`
5827 { echo "$as_me:$LINENO: result: $ac_res" >&5
5828echo "${ECHO_T}$ac_res" >&6; }
5829if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005830 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005831#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005832_ACEOF
5833
5834ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005835fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005836
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005837done
5838# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5839if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005840 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5841echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005842if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005843 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005844else
Martin v. Löwis11437992002-04-12 09:54:03 +00005845 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005846cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005847/* confdefs.h. */
5848_ACEOF
5849cat confdefs.h >>conftest.$ac_ext
5850cat >>conftest.$ac_ext <<_ACEOF
5851/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005852
Martin v. Löwiseba40652007-08-30 20:10:57 +00005853/* Override any GCC internal prototype to avoid an error.
5854 Use char because int might match the return type of a GCC
5855 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005856#ifdef __cplusplus
5857extern "C"
5858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005859char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005860int
5861main ()
5862{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005863return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005864 ;
5865 return 0;
5866}
5867_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005868for ac_lib in '' dir; do
5869 if test -z "$ac_lib"; then
5870 ac_res="none required"
5871 else
5872 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005873 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005874 fi
5875 rm -f conftest.$ac_objext conftest$ac_exeext
5876if { (ac_try="$ac_link"
5877case "(($ac_try" in
5878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5879 *) ac_try_echo=$ac_try;;
5880esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005882 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005883 ac_status=$?
5884 grep -v '^ *+' conftest.er1 >conftest.err
5885 rm -f conftest.er1
5886 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005888 (exit $ac_status); } && {
5889 test -z "$ac_c_werror_flag" ||
5890 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005891 } && test -s conftest$ac_exeext &&
5892 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005893 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005894else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005895 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005896sed 's/^/| /' conftest.$ac_ext >&5
5897
Martin v. Löwiseba40652007-08-30 20:10:57 +00005898
Brett Cannon19fab762007-06-02 03:02:29 +00005899fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005900
5901rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5902 conftest$ac_exeext
5903 if test "${ac_cv_search_opendir+set}" = set; then
5904 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005906done
5907if test "${ac_cv_search_opendir+set}" = set; then
5908 :
5909else
5910 ac_cv_search_opendir=no
5911fi
5912rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005913LIBS=$ac_func_search_save_LIBS
5914fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005915{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5916echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005917ac_res=$ac_cv_search_opendir
5918if test "$ac_res" != no; then
5919 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005920
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005921fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005922
Michael W. Hudson54241132001-12-07 15:38:26 +00005923else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005924 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5925echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005926if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005927 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005928else
5929 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005930cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005931/* confdefs.h. */
5932_ACEOF
5933cat confdefs.h >>conftest.$ac_ext
5934cat >>conftest.$ac_ext <<_ACEOF
5935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005936
Martin v. Löwiseba40652007-08-30 20:10:57 +00005937/* Override any GCC internal prototype to avoid an error.
5938 Use char because int might match the return type of a GCC
5939 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005940#ifdef __cplusplus
5941extern "C"
5942#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005943char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005944int
5945main ()
5946{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005947return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005948 ;
5949 return 0;
5950}
5951_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005952for ac_lib in '' x; do
5953 if test -z "$ac_lib"; then
5954 ac_res="none required"
5955 else
5956 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005957 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005958 fi
5959 rm -f conftest.$ac_objext conftest$ac_exeext
5960if { (ac_try="$ac_link"
5961case "(($ac_try" in
5962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5963 *) ac_try_echo=$ac_try;;
5964esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005966 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005967 ac_status=$?
5968 grep -v '^ *+' conftest.er1 >conftest.err
5969 rm -f conftest.er1
5970 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005972 (exit $ac_status); } && {
5973 test -z "$ac_c_werror_flag" ||
5974 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005975 } && test -s conftest$ac_exeext &&
5976 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005977 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005978else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005979 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005980sed 's/^/| /' conftest.$ac_ext >&5
5981
Martin v. Löwiseba40652007-08-30 20:10:57 +00005982
Brett Cannon19fab762007-06-02 03:02:29 +00005983fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005984
5985rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5986 conftest$ac_exeext
5987 if test "${ac_cv_search_opendir+set}" = set; then
5988 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005990done
5991if test "${ac_cv_search_opendir+set}" = set; then
5992 :
5993else
5994 ac_cv_search_opendir=no
5995fi
5996rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005997LIBS=$ac_func_search_save_LIBS
5998fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005999{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6000echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006001ac_res=$ac_cv_search_opendir
6002if test "$ac_res" != no; then
6003 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006004
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006005fi
6006
6007fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006008
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006009{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6010echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006011if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006012 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006013else
6014 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006015/* confdefs.h. */
6016_ACEOF
6017cat confdefs.h >>conftest.$ac_ext
6018cat >>conftest.$ac_ext <<_ACEOF
6019/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006020#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006021int
6022main ()
6023{
6024return makedev(0, 0);
6025 ;
6026 return 0;
6027}
6028_ACEOF
6029rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006030if { (ac_try="$ac_link"
6031case "(($ac_try" in
6032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6033 *) ac_try_echo=$ac_try;;
6034esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006036 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006037 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006038 grep -v '^ *+' conftest.er1 >conftest.err
6039 rm -f conftest.er1
6040 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006042 (exit $ac_status); } && {
6043 test -z "$ac_c_werror_flag" ||
6044 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006045 } && test -s conftest$ac_exeext &&
6046 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006047 ac_cv_header_sys_types_h_makedev=yes
6048else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006050sed 's/^/| /' conftest.$ac_ext >&5
6051
Martin v. Löwiseba40652007-08-30 20:10:57 +00006052 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006053fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006054
6055rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006056 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006057
6058fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006059{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6060echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006061
6062if test $ac_cv_header_sys_types_h_makedev = no; then
6063if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006064 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6065echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006066if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006067 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006068fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006069{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6070echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006071else
6072 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006073{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6074echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006075cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006076/* confdefs.h. */
6077_ACEOF
6078cat confdefs.h >>conftest.$ac_ext
6079cat >>conftest.$ac_ext <<_ACEOF
6080/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006081$ac_includes_default
6082#include <sys/mkdev.h>
6083_ACEOF
6084rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006085if { (ac_try="$ac_compile"
6086case "(($ac_try" in
6087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6088 *) ac_try_echo=$ac_try;;
6089esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006091 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006092 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006093 grep -v '^ *+' conftest.er1 >conftest.err
6094 rm -f conftest.er1
6095 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006097 (exit $ac_status); } && {
6098 test -z "$ac_c_werror_flag" ||
6099 test ! -s conftest.err
6100 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006101 ac_header_compiler=yes
6102else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006104sed 's/^/| /' conftest.$ac_ext >&5
6105
Martin v. Löwiseba40652007-08-30 20:10:57 +00006106 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006108
6109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006110{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6111echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006112
6113# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006114{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6115echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006116cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006117/* confdefs.h. */
6118_ACEOF
6119cat confdefs.h >>conftest.$ac_ext
6120cat >>conftest.$ac_ext <<_ACEOF
6121/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006122#include <sys/mkdev.h>
6123_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006124if { (ac_try="$ac_cpp conftest.$ac_ext"
6125case "(($ac_try" in
6126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6127 *) ac_try_echo=$ac_try;;
6128esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006130 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006131 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006132 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006133 rm -f conftest.er1
6134 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006136 (exit $ac_status); } >/dev/null && {
6137 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6138 test ! -s conftest.err
6139 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006140 ac_header_preproc=yes
6141else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006142 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006143sed 's/^/| /' conftest.$ac_ext >&5
6144
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006145 ac_header_preproc=no
6146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006147
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006148rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006149{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6150echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006151
6152# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006153case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6154 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006155 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6156echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6157 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6158echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006159 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006160 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006161 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006162 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6163echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6164 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6165echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6166 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6167echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6168 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6169echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6170 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6171echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6172 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6173echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006174 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006175## -------------------------------------- ##
6176## Report this to http://bugs.python.org/ ##
6177## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006178_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006179 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006180 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006181esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006182{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6183echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006184if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006185 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006186else
6187 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6188fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006189{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6190echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006191
6192fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006193if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006194
6195cat >>confdefs.h <<\_ACEOF
6196#define MAJOR_IN_MKDEV 1
6197_ACEOF
6198
6199fi
6200
6201
6202
6203 if test $ac_cv_header_sys_mkdev_h = no; then
6204 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006205 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6206echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006207if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006208 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006209fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006210{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6211echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006212else
6213 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006214{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6215echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006216cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006217/* confdefs.h. */
6218_ACEOF
6219cat confdefs.h >>conftest.$ac_ext
6220cat >>conftest.$ac_ext <<_ACEOF
6221/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222$ac_includes_default
6223#include <sys/sysmacros.h>
6224_ACEOF
6225rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006226if { (ac_try="$ac_compile"
6227case "(($ac_try" in
6228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6229 *) ac_try_echo=$ac_try;;
6230esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006232 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006233 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006234 grep -v '^ *+' conftest.er1 >conftest.err
6235 rm -f conftest.er1
6236 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006238 (exit $ac_status); } && {
6239 test -z "$ac_c_werror_flag" ||
6240 test ! -s conftest.err
6241 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006242 ac_header_compiler=yes
6243else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006244 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006245sed 's/^/| /' conftest.$ac_ext >&5
6246
Martin v. Löwiseba40652007-08-30 20:10:57 +00006247 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006248fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006249
6250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006251{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6252echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253
6254# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006255{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6256echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006257cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006258/* confdefs.h. */
6259_ACEOF
6260cat confdefs.h >>conftest.$ac_ext
6261cat >>conftest.$ac_ext <<_ACEOF
6262/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006263#include <sys/sysmacros.h>
6264_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006265if { (ac_try="$ac_cpp conftest.$ac_ext"
6266case "(($ac_try" in
6267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6268 *) ac_try_echo=$ac_try;;
6269esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006271 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006272 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006273 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006274 rm -f conftest.er1
6275 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006277 (exit $ac_status); } >/dev/null && {
6278 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6279 test ! -s conftest.err
6280 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006281 ac_header_preproc=yes
6282else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006283 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006284sed 's/^/| /' conftest.$ac_ext >&5
6285
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006286 ac_header_preproc=no
6287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006288
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006289rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006290{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6291echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006292
6293# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006294case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6295 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006296 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6297echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6298 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6299echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006300 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006301 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006302 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006303 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6304echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6305 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6306echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6307 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6308echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6309 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6310echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6311 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6312echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6313 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6314echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006315 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006316## -------------------------------------- ##
6317## Report this to http://bugs.python.org/ ##
6318## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006319_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006320 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006321 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006322esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006323{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6324echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006325if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006326 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006327else
6328 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6329fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006330{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6331echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006332
6333fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006334if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006335
6336cat >>confdefs.h <<\_ACEOF
6337#define MAJOR_IN_SYSMACROS 1
6338_ACEOF
6339
6340fi
6341
6342
6343 fi
6344fi
6345
Michael W. Hudson54241132001-12-07 15:38:26 +00006346
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006347# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006348
6349for ac_header in term.h
6350do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006351as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6352{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6353echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006354if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006355 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006356else
6357 cat >conftest.$ac_ext <<_ACEOF
6358/* confdefs.h. */
6359_ACEOF
6360cat confdefs.h >>conftest.$ac_ext
6361cat >>conftest.$ac_ext <<_ACEOF
6362/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006363
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006364#ifdef HAVE_CURSES_H
6365#include <curses.h>
6366#endif
6367
6368
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006369#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006370_ACEOF
6371rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006372if { (ac_try="$ac_compile"
6373case "(($ac_try" in
6374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6375 *) ac_try_echo=$ac_try;;
6376esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006378 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006379 ac_status=$?
6380 grep -v '^ *+' conftest.er1 >conftest.err
6381 rm -f conftest.er1
6382 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006384 (exit $ac_status); } && {
6385 test -z "$ac_c_werror_flag" ||
6386 test ! -s conftest.err
6387 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006388 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006389else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006390 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006391sed 's/^/| /' conftest.$ac_ext >&5
6392
Martin v. Löwiseba40652007-08-30 20:10:57 +00006393 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006394fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006395
6396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006397fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006398ac_res=`eval echo '${'$as_ac_Header'}'`
6399 { echo "$as_me:$LINENO: result: $ac_res" >&5
6400echo "${ECHO_T}$ac_res" >&6; }
6401if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006402 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006403#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006404_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006405
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006406fi
6407
6408done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006409
6410
Martin v. Löwis11017b12006-01-14 18:12:57 +00006411# On Linux, netlink.h requires asm/types.h
6412
6413for ac_header in linux/netlink.h
6414do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006415as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6416{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6417echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006418if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006419 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006420else
6421 cat >conftest.$ac_ext <<_ACEOF
6422/* confdefs.h. */
6423_ACEOF
6424cat confdefs.h >>conftest.$ac_ext
6425cat >>conftest.$ac_ext <<_ACEOF
6426/* end confdefs.h. */
6427
6428#ifdef HAVE_ASM_TYPES_H
6429#include <asm/types.h>
6430#endif
6431#ifdef HAVE_SYS_SOCKET_H
6432#include <sys/socket.h>
6433#endif
6434
6435
6436#include <$ac_header>
6437_ACEOF
6438rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006439if { (ac_try="$ac_compile"
6440case "(($ac_try" in
6441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6442 *) ac_try_echo=$ac_try;;
6443esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006445 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006446 ac_status=$?
6447 grep -v '^ *+' conftest.er1 >conftest.err
6448 rm -f conftest.er1
6449 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006451 (exit $ac_status); } && {
6452 test -z "$ac_c_werror_flag" ||
6453 test ! -s conftest.err
6454 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006455 eval "$as_ac_Header=yes"
6456else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006457 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006458sed 's/^/| /' conftest.$ac_ext >&5
6459
Martin v. Löwiseba40652007-08-30 20:10:57 +00006460 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006461fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006462
6463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006464fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006465ac_res=`eval echo '${'$as_ac_Header'}'`
6466 { echo "$as_me:$LINENO: result: $ac_res" >&5
6467echo "${ECHO_T}$ac_res" >&6; }
6468if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006469 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006470#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006471_ACEOF
6472
6473fi
6474
6475done
6476
6477
Guido van Rossum627b2d71993-12-24 10:39:16 +00006478# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006479was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006480{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6481echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006482cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006483/* confdefs.h. */
6484_ACEOF
6485cat confdefs.h >>conftest.$ac_ext
6486cat >>conftest.$ac_ext <<_ACEOF
6487/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006488#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006489
6490_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006491if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006492 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006493 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006494else
Martin v. Löwis11437992002-04-12 09:54:03 +00006495
6496
6497cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006498#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006499_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006500
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006501
Guido van Rossum627b2d71993-12-24 10:39:16 +00006502fi
6503rm -f conftest*
6504
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006505{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6506echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006507
Neal Norwitz11690112002-07-30 01:08:28 +00006508# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006509{ echo "$as_me:$LINENO: checking for makedev" >&5
6510echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006511cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006512/* confdefs.h. */
6513_ACEOF
6514cat confdefs.h >>conftest.$ac_ext
6515cat >>conftest.$ac_ext <<_ACEOF
6516/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006517#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006518int
6519main ()
6520{
6521 makedev(0, 0)
6522 ;
6523 return 0;
6524}
6525_ACEOF
6526rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006527if { (ac_try="$ac_link"
6528case "(($ac_try" in
6529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6530 *) ac_try_echo=$ac_try;;
6531esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006533 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006535 grep -v '^ *+' conftest.er1 >conftest.err
6536 rm -f conftest.er1
6537 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006539 (exit $ac_status); } && {
6540 test -z "$ac_c_werror_flag" ||
6541 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006542 } && test -s conftest$ac_exeext &&
6543 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006544 ac_cv_has_makedev=yes
6545else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006547sed 's/^/| /' conftest.$ac_ext >&5
6548
Martin v. Löwiseba40652007-08-30 20:10:57 +00006549 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006550fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006551
6552rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006553 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006554if test "$ac_cv_has_makedev" = "no"; then
6555 # we didn't link, try if _OSF_SOURCE will allow us to link
6556 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006557/* confdefs.h. */
6558_ACEOF
6559cat confdefs.h >>conftest.$ac_ext
6560cat >>conftest.$ac_ext <<_ACEOF
6561/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006562
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006563#define _OSF_SOURCE 1
6564#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006565
Neal Norwitz11690112002-07-30 01:08:28 +00006566int
6567main ()
6568{
6569 makedev(0, 0)
6570 ;
6571 return 0;
6572}
6573_ACEOF
6574rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006575if { (ac_try="$ac_link"
6576case "(($ac_try" in
6577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6578 *) ac_try_echo=$ac_try;;
6579esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006581 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006582 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006583 grep -v '^ *+' conftest.er1 >conftest.err
6584 rm -f conftest.er1
6585 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006587 (exit $ac_status); } && {
6588 test -z "$ac_c_werror_flag" ||
6589 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006590 } && test -s conftest$ac_exeext &&
6591 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006592 ac_cv_has_makedev=yes
6593else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006594 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006595sed 's/^/| /' conftest.$ac_ext >&5
6596
Martin v. Löwiseba40652007-08-30 20:10:57 +00006597 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006598fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006599
6600rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006601 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006602 if test "$ac_cv_has_makedev" = "yes"; then
6603
6604cat >>confdefs.h <<\_ACEOF
6605#define _OSF_SOURCE 1
6606_ACEOF
6607
6608 fi
6609fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006610{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6611echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006612if test "$ac_cv_has_makedev" = "yes"; then
6613
6614cat >>confdefs.h <<\_ACEOF
6615#define HAVE_MAKEDEV 1
6616_ACEOF
6617
6618fi
6619
Martin v. Löwis399a6892002-10-04 10:22:02 +00006620# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6621# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6622# defined, but the compiler does not support pragma redefine_extname,
6623# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6624# structures (such as rlimit64) without declaring them. As a
6625# work-around, disable LFS on such configurations
6626
6627use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006628{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6629echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006630cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006631/* confdefs.h. */
6632_ACEOF
6633cat confdefs.h >>conftest.$ac_ext
6634cat >>conftest.$ac_ext <<_ACEOF
6635/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006636
6637#define _LARGEFILE_SOURCE 1
6638#define _FILE_OFFSET_BITS 64
6639#include <sys/resource.h>
6640
Martin v. Löwis399a6892002-10-04 10:22:02 +00006641int
6642main ()
6643{
6644struct rlimit foo;
6645 ;
6646 return 0;
6647}
6648_ACEOF
6649rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006650if { (ac_try="$ac_compile"
6651case "(($ac_try" in
6652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6653 *) ac_try_echo=$ac_try;;
6654esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006656 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006657 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006658 grep -v '^ *+' conftest.er1 >conftest.err
6659 rm -f conftest.er1
6660 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006662 (exit $ac_status); } && {
6663 test -z "$ac_c_werror_flag" ||
6664 test ! -s conftest.err
6665 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006666 sol_lfs_bug=no
6667else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006669sed 's/^/| /' conftest.$ac_ext >&5
6670
Martin v. Löwiseba40652007-08-30 20:10:57 +00006671 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006672fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006673
6674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006675{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6676echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006677if test "$sol_lfs_bug" = "yes"; then
6678 use_lfs=no
6679fi
6680
6681if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006682# Two defines needed to enable largefile support on various platforms
6683# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006684
Martin v. Löwis11437992002-04-12 09:54:03 +00006685cat >>confdefs.h <<\_ACEOF
6686#define _LARGEFILE_SOURCE 1
6687_ACEOF
6688
6689
6690cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006691#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006692_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006693
Martin v. Löwis399a6892002-10-04 10:22:02 +00006694fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006695
Guido van Rossum84e7b241996-08-19 21:59:00 +00006696# Add some code to confdefs.h so that the test for off_t works on SCO
6697cat >> confdefs.h <<\EOF
6698#if defined(SCO_DS)
6699#undef _OFF_T
6700#endif
6701EOF
6702
Guido van Rossumef2255b2000-03-10 22:30:29 +00006703# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006704{ echo "$as_me:$LINENO: checking for mode_t" >&5
6705echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006706if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006707 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006708else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006709 cat >conftest.$ac_ext <<_ACEOF
6710/* confdefs.h. */
6711_ACEOF
6712cat confdefs.h >>conftest.$ac_ext
6713cat >>conftest.$ac_ext <<_ACEOF
6714/* end confdefs.h. */
6715$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006716typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006717int
6718main ()
6719{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006720if ((ac__type_new_ *) 0)
6721 return 0;
6722if (sizeof (ac__type_new_))
6723 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006724 ;
6725 return 0;
6726}
6727_ACEOF
6728rm -f conftest.$ac_objext
6729if { (ac_try="$ac_compile"
6730case "(($ac_try" in
6731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6732 *) ac_try_echo=$ac_try;;
6733esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006735 (eval "$ac_compile") 2>conftest.er1
6736 ac_status=$?
6737 grep -v '^ *+' conftest.er1 >conftest.err
6738 rm -f conftest.er1
6739 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006741 (exit $ac_status); } && {
6742 test -z "$ac_c_werror_flag" ||
6743 test ! -s conftest.err
6744 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006745 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006746else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006748sed 's/^/| /' conftest.$ac_ext >&5
6749
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006750 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006752
6753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006754fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006755{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6756echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6757if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006758 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006759else
Martin v. Löwis11437992002-04-12 09:54:03 +00006760
6761cat >>confdefs.h <<_ACEOF
6762#define mode_t int
6763_ACEOF
6764
6765fi
6766
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006767{ echo "$as_me:$LINENO: checking for off_t" >&5
6768echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006769if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006770 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006771else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006772 cat >conftest.$ac_ext <<_ACEOF
6773/* confdefs.h. */
6774_ACEOF
6775cat confdefs.h >>conftest.$ac_ext
6776cat >>conftest.$ac_ext <<_ACEOF
6777/* end confdefs.h. */
6778$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006779typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006780int
6781main ()
6782{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006783if ((ac__type_new_ *) 0)
6784 return 0;
6785if (sizeof (ac__type_new_))
6786 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006787 ;
6788 return 0;
6789}
6790_ACEOF
6791rm -f conftest.$ac_objext
6792if { (ac_try="$ac_compile"
6793case "(($ac_try" in
6794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6795 *) ac_try_echo=$ac_try;;
6796esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006798 (eval "$ac_compile") 2>conftest.er1
6799 ac_status=$?
6800 grep -v '^ *+' conftest.er1 >conftest.err
6801 rm -f conftest.er1
6802 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006804 (exit $ac_status); } && {
6805 test -z "$ac_c_werror_flag" ||
6806 test ! -s conftest.err
6807 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006808 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006809else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006811sed 's/^/| /' conftest.$ac_ext >&5
6812
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006813 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006815
6816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006817fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006818{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6819echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6820if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006821 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006822else
Martin v. Löwis11437992002-04-12 09:54:03 +00006823
6824cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006825#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006826_ACEOF
6827
6828fi
6829
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006830{ echo "$as_me:$LINENO: checking for pid_t" >&5
6831echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006832if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006833 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006834else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006835 cat >conftest.$ac_ext <<_ACEOF
6836/* confdefs.h. */
6837_ACEOF
6838cat confdefs.h >>conftest.$ac_ext
6839cat >>conftest.$ac_ext <<_ACEOF
6840/* end confdefs.h. */
6841$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006842typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006843int
6844main ()
6845{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006846if ((ac__type_new_ *) 0)
6847 return 0;
6848if (sizeof (ac__type_new_))
6849 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006850 ;
6851 return 0;
6852}
6853_ACEOF
6854rm -f conftest.$ac_objext
6855if { (ac_try="$ac_compile"
6856case "(($ac_try" in
6857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6858 *) ac_try_echo=$ac_try;;
6859esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006861 (eval "$ac_compile") 2>conftest.er1
6862 ac_status=$?
6863 grep -v '^ *+' conftest.er1 >conftest.err
6864 rm -f conftest.er1
6865 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006867 (exit $ac_status); } && {
6868 test -z "$ac_c_werror_flag" ||
6869 test ! -s conftest.err
6870 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006871 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006872else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006874sed 's/^/| /' conftest.$ac_ext >&5
6875
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006876 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006877fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006878
6879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006880fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006881{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6882echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6883if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006884 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006885else
Martin v. Löwis11437992002-04-12 09:54:03 +00006886
6887cat >>confdefs.h <<_ACEOF
6888#define pid_t int
6889_ACEOF
6890
6891fi
6892
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006893{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6894echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006895if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006896 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006897else
6898 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006899/* confdefs.h. */
6900_ACEOF
6901cat confdefs.h >>conftest.$ac_ext
6902cat >>conftest.$ac_ext <<_ACEOF
6903/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006904#include <sys/types.h>
6905#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006906
Martin v. Löwis11437992002-04-12 09:54:03 +00006907int
6908main ()
6909{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006910return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006911 ;
6912 return 0;
6913}
6914_ACEOF
6915rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006916if { (ac_try="$ac_compile"
6917case "(($ac_try" in
6918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6919 *) ac_try_echo=$ac_try;;
6920esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006922 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006923 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006924 grep -v '^ *+' conftest.er1 >conftest.err
6925 rm -f conftest.er1
6926 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006928 (exit $ac_status); } && {
6929 test -z "$ac_c_werror_flag" ||
6930 test ! -s conftest.err
6931 } && test -s conftest.$ac_objext; then
6932 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006933else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006935sed 's/^/| /' conftest.$ac_ext >&5
6936
Martin v. Löwiseba40652007-08-30 20:10:57 +00006937 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006938fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006939
6940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006941fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006942{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6943echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006944
Martin v. Löwis11437992002-04-12 09:54:03 +00006945cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006946#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006947_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006948
Michael W. Hudson54241132001-12-07 15:38:26 +00006949
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006950{ echo "$as_me:$LINENO: checking for size_t" >&5
6951echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006952if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006953 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006954else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006955 cat >conftest.$ac_ext <<_ACEOF
6956/* confdefs.h. */
6957_ACEOF
6958cat confdefs.h >>conftest.$ac_ext
6959cat >>conftest.$ac_ext <<_ACEOF
6960/* end confdefs.h. */
6961$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006962typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006963int
6964main ()
6965{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006966if ((ac__type_new_ *) 0)
6967 return 0;
6968if (sizeof (ac__type_new_))
6969 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006970 ;
6971 return 0;
6972}
6973_ACEOF
6974rm -f conftest.$ac_objext
6975if { (ac_try="$ac_compile"
6976case "(($ac_try" in
6977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6978 *) ac_try_echo=$ac_try;;
6979esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006981 (eval "$ac_compile") 2>conftest.er1
6982 ac_status=$?
6983 grep -v '^ *+' conftest.er1 >conftest.err
6984 rm -f conftest.er1
6985 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006987 (exit $ac_status); } && {
6988 test -z "$ac_c_werror_flag" ||
6989 test ! -s conftest.err
6990 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006991 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006992else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006994sed 's/^/| /' conftest.$ac_ext >&5
6995
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006996 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006998
6999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007000fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007001{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7002echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7003if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007004 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007005else
Martin v. Löwis11437992002-04-12 09:54:03 +00007006
7007cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007008#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007009_ACEOF
7010
7011fi
7012
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007013{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7014echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007015if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007016 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007017else
7018 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007019/* confdefs.h. */
7020_ACEOF
7021cat confdefs.h >>conftest.$ac_ext
7022cat >>conftest.$ac_ext <<_ACEOF
7023/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007024#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007025
7026_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007027if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007028 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007029 ac_cv_type_uid_t=yes
7030else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007031 ac_cv_type_uid_t=no
7032fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007033rm -f conftest*
7034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007035fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007036{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7037echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007038if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007039
Martin v. Löwis11437992002-04-12 09:54:03 +00007040cat >>confdefs.h <<\_ACEOF
7041#define uid_t int
7042_ACEOF
7043
7044
7045cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007046#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007047_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007048
7049fi
7050
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007051
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007052 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7053echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007054if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007055 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007056else
7057 ac_cv_c_uint32_t=no
7058 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7059 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7060 cat >conftest.$ac_ext <<_ACEOF
7061/* confdefs.h. */
7062_ACEOF
7063cat confdefs.h >>conftest.$ac_ext
7064cat >>conftest.$ac_ext <<_ACEOF
7065/* end confdefs.h. */
7066$ac_includes_default
7067int
7068main ()
7069{
7070static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7071test_array [0] = 0
7072
7073 ;
7074 return 0;
7075}
7076_ACEOF
7077rm -f conftest.$ac_objext
7078if { (ac_try="$ac_compile"
7079case "(($ac_try" in
7080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7081 *) ac_try_echo=$ac_try;;
7082esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007084 (eval "$ac_compile") 2>conftest.er1
7085 ac_status=$?
7086 grep -v '^ *+' conftest.er1 >conftest.err
7087 rm -f conftest.er1
7088 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007090 (exit $ac_status); } && {
7091 test -z "$ac_c_werror_flag" ||
7092 test ! -s conftest.err
7093 } && test -s conftest.$ac_objext; then
7094 case $ac_type in
7095 uint32_t) ac_cv_c_uint32_t=yes ;;
7096 *) ac_cv_c_uint32_t=$ac_type ;;
7097esac
7098
7099else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007100 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007101sed 's/^/| /' conftest.$ac_ext >&5
7102
7103
7104fi
7105
7106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7107 test "$ac_cv_c_uint32_t" != no && break
7108 done
7109fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007110{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7111echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007112 case $ac_cv_c_uint32_t in #(
7113 no|yes) ;; #(
7114 *)
7115
7116cat >>confdefs.h <<\_ACEOF
7117#define _UINT32_T 1
7118_ACEOF
7119
7120
7121cat >>confdefs.h <<_ACEOF
7122#define uint32_t $ac_cv_c_uint32_t
7123_ACEOF
7124;;
7125 esac
7126
7127
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007128 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7129echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007130if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007131 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007132else
7133 ac_cv_c_uint64_t=no
7134 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7135 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7136 cat >conftest.$ac_ext <<_ACEOF
7137/* confdefs.h. */
7138_ACEOF
7139cat confdefs.h >>conftest.$ac_ext
7140cat >>conftest.$ac_ext <<_ACEOF
7141/* end confdefs.h. */
7142$ac_includes_default
7143int
7144main ()
7145{
7146static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7147test_array [0] = 0
7148
7149 ;
7150 return 0;
7151}
7152_ACEOF
7153rm -f conftest.$ac_objext
7154if { (ac_try="$ac_compile"
7155case "(($ac_try" in
7156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7157 *) ac_try_echo=$ac_try;;
7158esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007160 (eval "$ac_compile") 2>conftest.er1
7161 ac_status=$?
7162 grep -v '^ *+' conftest.er1 >conftest.err
7163 rm -f conftest.er1
7164 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007166 (exit $ac_status); } && {
7167 test -z "$ac_c_werror_flag" ||
7168 test ! -s conftest.err
7169 } && test -s conftest.$ac_objext; then
7170 case $ac_type in
7171 uint64_t) ac_cv_c_uint64_t=yes ;;
7172 *) ac_cv_c_uint64_t=$ac_type ;;
7173esac
7174
7175else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007176 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007177sed 's/^/| /' conftest.$ac_ext >&5
7178
7179
7180fi
7181
7182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7183 test "$ac_cv_c_uint64_t" != no && break
7184 done
7185fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007186{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7187echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007188 case $ac_cv_c_uint64_t in #(
7189 no|yes) ;; #(
7190 *)
7191
7192cat >>confdefs.h <<\_ACEOF
7193#define _UINT64_T 1
7194_ACEOF
7195
7196
7197cat >>confdefs.h <<_ACEOF
7198#define uint64_t $ac_cv_c_uint64_t
7199_ACEOF
7200;;
7201 esac
7202
7203
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007204 { echo "$as_me:$LINENO: checking for int32_t" >&5
7205echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007206if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007207 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007208else
7209 ac_cv_c_int32_t=no
7210 for ac_type in 'int32_t' 'int' 'long int' \
7211 'long long int' 'short int' 'signed char'; do
7212 cat >conftest.$ac_ext <<_ACEOF
7213/* confdefs.h. */
7214_ACEOF
7215cat confdefs.h >>conftest.$ac_ext
7216cat >>conftest.$ac_ext <<_ACEOF
7217/* end confdefs.h. */
7218$ac_includes_default
7219int
7220main ()
7221{
7222static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7223test_array [0] = 0
7224
7225 ;
7226 return 0;
7227}
7228_ACEOF
7229rm -f conftest.$ac_objext
7230if { (ac_try="$ac_compile"
7231case "(($ac_try" in
7232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7233 *) ac_try_echo=$ac_try;;
7234esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007236 (eval "$ac_compile") 2>conftest.er1
7237 ac_status=$?
7238 grep -v '^ *+' conftest.er1 >conftest.err
7239 rm -f conftest.er1
7240 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007242 (exit $ac_status); } && {
7243 test -z "$ac_c_werror_flag" ||
7244 test ! -s conftest.err
7245 } && test -s conftest.$ac_objext; then
7246 cat >conftest.$ac_ext <<_ACEOF
7247/* confdefs.h. */
7248_ACEOF
7249cat confdefs.h >>conftest.$ac_ext
7250cat >>conftest.$ac_ext <<_ACEOF
7251/* end confdefs.h. */
7252$ac_includes_default
7253int
7254main ()
7255{
7256static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007257 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007258test_array [0] = 0
7259
7260 ;
7261 return 0;
7262}
7263_ACEOF
7264rm -f conftest.$ac_objext
7265if { (ac_try="$ac_compile"
7266case "(($ac_try" in
7267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7268 *) ac_try_echo=$ac_try;;
7269esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007271 (eval "$ac_compile") 2>conftest.er1
7272 ac_status=$?
7273 grep -v '^ *+' conftest.er1 >conftest.err
7274 rm -f conftest.er1
7275 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007277 (exit $ac_status); } && {
7278 test -z "$ac_c_werror_flag" ||
7279 test ! -s conftest.err
7280 } && test -s conftest.$ac_objext; then
7281 :
7282else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007283 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007284sed 's/^/| /' conftest.$ac_ext >&5
7285
7286 case $ac_type in
7287 int32_t) ac_cv_c_int32_t=yes ;;
7288 *) ac_cv_c_int32_t=$ac_type ;;
7289esac
7290
7291fi
7292
7293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7294else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007295 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007296sed 's/^/| /' conftest.$ac_ext >&5
7297
7298
7299fi
7300
7301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7302 test "$ac_cv_c_int32_t" != no && break
7303 done
7304fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007305{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7306echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007307 case $ac_cv_c_int32_t in #(
7308 no|yes) ;; #(
7309 *)
7310
7311cat >>confdefs.h <<_ACEOF
7312#define int32_t $ac_cv_c_int32_t
7313_ACEOF
7314;;
7315 esac
7316
7317
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007318 { echo "$as_me:$LINENO: checking for int64_t" >&5
7319echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007320if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007321 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007322else
7323 ac_cv_c_int64_t=no
7324 for ac_type in 'int64_t' 'int' 'long int' \
7325 'long long int' 'short int' 'signed char'; do
7326 cat >conftest.$ac_ext <<_ACEOF
7327/* confdefs.h. */
7328_ACEOF
7329cat confdefs.h >>conftest.$ac_ext
7330cat >>conftest.$ac_ext <<_ACEOF
7331/* end confdefs.h. */
7332$ac_includes_default
7333int
7334main ()
7335{
7336static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7337test_array [0] = 0
7338
7339 ;
7340 return 0;
7341}
7342_ACEOF
7343rm -f conftest.$ac_objext
7344if { (ac_try="$ac_compile"
7345case "(($ac_try" in
7346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7347 *) ac_try_echo=$ac_try;;
7348esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007350 (eval "$ac_compile") 2>conftest.er1
7351 ac_status=$?
7352 grep -v '^ *+' conftest.er1 >conftest.err
7353 rm -f conftest.er1
7354 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007356 (exit $ac_status); } && {
7357 test -z "$ac_c_werror_flag" ||
7358 test ! -s conftest.err
7359 } && test -s conftest.$ac_objext; then
7360 cat >conftest.$ac_ext <<_ACEOF
7361/* confdefs.h. */
7362_ACEOF
7363cat confdefs.h >>conftest.$ac_ext
7364cat >>conftest.$ac_ext <<_ACEOF
7365/* end confdefs.h. */
7366$ac_includes_default
7367int
7368main ()
7369{
7370static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007371 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007372test_array [0] = 0
7373
7374 ;
7375 return 0;
7376}
7377_ACEOF
7378rm -f conftest.$ac_objext
7379if { (ac_try="$ac_compile"
7380case "(($ac_try" in
7381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7382 *) ac_try_echo=$ac_try;;
7383esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007385 (eval "$ac_compile") 2>conftest.er1
7386 ac_status=$?
7387 grep -v '^ *+' conftest.er1 >conftest.err
7388 rm -f conftest.er1
7389 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007391 (exit $ac_status); } && {
7392 test -z "$ac_c_werror_flag" ||
7393 test ! -s conftest.err
7394 } && test -s conftest.$ac_objext; then
7395 :
7396else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007397 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007398sed 's/^/| /' conftest.$ac_ext >&5
7399
7400 case $ac_type in
7401 int64_t) ac_cv_c_int64_t=yes ;;
7402 *) ac_cv_c_int64_t=$ac_type ;;
7403esac
7404
7405fi
7406
7407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7408else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007409 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007410sed 's/^/| /' conftest.$ac_ext >&5
7411
7412
7413fi
7414
7415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7416 test "$ac_cv_c_int64_t" != no && break
7417 done
7418fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007419{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7420echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007421 case $ac_cv_c_int64_t in #(
7422 no|yes) ;; #(
7423 *)
7424
7425cat >>confdefs.h <<_ACEOF
7426#define int64_t $ac_cv_c_int64_t
7427_ACEOF
7428;;
7429 esac
7430
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007431{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7432echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007433if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007434 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007435else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007436 cat >conftest.$ac_ext <<_ACEOF
7437/* confdefs.h. */
7438_ACEOF
7439cat confdefs.h >>conftest.$ac_ext
7440cat >>conftest.$ac_ext <<_ACEOF
7441/* end confdefs.h. */
7442$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007443typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007444int
7445main ()
7446{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007447if ((ac__type_new_ *) 0)
7448 return 0;
7449if (sizeof (ac__type_new_))
7450 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007451 ;
7452 return 0;
7453}
7454_ACEOF
7455rm -f conftest.$ac_objext
7456if { (ac_try="$ac_compile"
7457case "(($ac_try" in
7458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7459 *) ac_try_echo=$ac_try;;
7460esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007462 (eval "$ac_compile") 2>conftest.er1
7463 ac_status=$?
7464 grep -v '^ *+' conftest.er1 >conftest.err
7465 rm -f conftest.er1
7466 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007468 (exit $ac_status); } && {
7469 test -z "$ac_c_werror_flag" ||
7470 test ! -s conftest.err
7471 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007472 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007473else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007474 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007475sed 's/^/| /' conftest.$ac_ext >&5
7476
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007477 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007478fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007479
7480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007481fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007482{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7483echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7484if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007485
7486cat >>confdefs.h <<\_ACEOF
7487#define HAVE_SSIZE_T 1
7488_ACEOF
7489
7490fi
7491
Jack Jansendd19cf82001-12-06 22:36:17 +00007492
Michael W. Hudson54241132001-12-07 15:38:26 +00007493# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007494# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007495{ echo "$as_me:$LINENO: checking for int" >&5
7496echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7497if test "${ac_cv_type_int+set}" = set; then
7498 echo $ECHO_N "(cached) $ECHO_C" >&6
7499else
7500 cat >conftest.$ac_ext <<_ACEOF
7501/* confdefs.h. */
7502_ACEOF
7503cat confdefs.h >>conftest.$ac_ext
7504cat >>conftest.$ac_ext <<_ACEOF
7505/* end confdefs.h. */
7506$ac_includes_default
7507typedef int ac__type_new_;
7508int
7509main ()
7510{
7511if ((ac__type_new_ *) 0)
7512 return 0;
7513if (sizeof (ac__type_new_))
7514 return 0;
7515 ;
7516 return 0;
7517}
7518_ACEOF
7519rm -f conftest.$ac_objext
7520if { (ac_try="$ac_compile"
7521case "(($ac_try" in
7522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7523 *) ac_try_echo=$ac_try;;
7524esac
7525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7526 (eval "$ac_compile") 2>conftest.er1
7527 ac_status=$?
7528 grep -v '^ *+' conftest.er1 >conftest.err
7529 rm -f conftest.er1
7530 cat conftest.err >&5
7531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7532 (exit $ac_status); } && {
7533 test -z "$ac_c_werror_flag" ||
7534 test ! -s conftest.err
7535 } && test -s conftest.$ac_objext; then
7536 ac_cv_type_int=yes
7537else
7538 echo "$as_me: failed program was:" >&5
7539sed 's/^/| /' conftest.$ac_ext >&5
7540
7541 ac_cv_type_int=no
7542fi
7543
7544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7545fi
7546{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7547echo "${ECHO_T}$ac_cv_type_int" >&6; }
7548
Martin v. Löwiseba40652007-08-30 20:10:57 +00007549# The cast to long int works around a bug in the HP C Compiler
7550# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7551# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7552# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007553{ echo "$as_me:$LINENO: checking size of int" >&5
7554echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007555if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007556 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007557else
Martin v. Löwis11437992002-04-12 09:54:03 +00007558 if test "$cross_compiling" = yes; then
7559 # Depending upon the size, compute the lo and hi bounds.
7560cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007561/* confdefs.h. */
7562_ACEOF
7563cat confdefs.h >>conftest.$ac_ext
7564cat >>conftest.$ac_ext <<_ACEOF
7565/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007566$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007567 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007568int
7569main ()
7570{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007571static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007572test_array [0] = 0
7573
7574 ;
7575 return 0;
7576}
7577_ACEOF
7578rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007579if { (ac_try="$ac_compile"
7580case "(($ac_try" in
7581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7582 *) ac_try_echo=$ac_try;;
7583esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007585 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007586 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007587 grep -v '^ *+' conftest.er1 >conftest.err
7588 rm -f conftest.er1
7589 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007591 (exit $ac_status); } && {
7592 test -z "$ac_c_werror_flag" ||
7593 test ! -s conftest.err
7594 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007595 ac_lo=0 ac_mid=0
7596 while :; do
7597 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007598/* confdefs.h. */
7599_ACEOF
7600cat confdefs.h >>conftest.$ac_ext
7601cat >>conftest.$ac_ext <<_ACEOF
7602/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007603$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007604 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007605int
7606main ()
7607{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007608static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007609test_array [0] = 0
7610
7611 ;
7612 return 0;
7613}
7614_ACEOF
7615rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007616if { (ac_try="$ac_compile"
7617case "(($ac_try" in
7618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7619 *) ac_try_echo=$ac_try;;
7620esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007622 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007624 grep -v '^ *+' conftest.er1 >conftest.err
7625 rm -f conftest.er1
7626 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007628 (exit $ac_status); } && {
7629 test -z "$ac_c_werror_flag" ||
7630 test ! -s conftest.err
7631 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007632 ac_hi=$ac_mid; break
7633else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007635sed 's/^/| /' conftest.$ac_ext >&5
7636
Martin v. Löwiseba40652007-08-30 20:10:57 +00007637 ac_lo=`expr $ac_mid + 1`
7638 if test $ac_lo -le $ac_mid; then
7639 ac_lo= ac_hi=
7640 break
7641 fi
7642 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007643fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007644
7645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007646 done
7647else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007649sed 's/^/| /' conftest.$ac_ext >&5
7650
Martin v. Löwiseba40652007-08-30 20:10:57 +00007651 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007652/* confdefs.h. */
7653_ACEOF
7654cat confdefs.h >>conftest.$ac_ext
7655cat >>conftest.$ac_ext <<_ACEOF
7656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007657$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007658 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007659int
7660main ()
7661{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007662static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007663test_array [0] = 0
7664
7665 ;
7666 return 0;
7667}
7668_ACEOF
7669rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007670if { (ac_try="$ac_compile"
7671case "(($ac_try" in
7672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7673 *) ac_try_echo=$ac_try;;
7674esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007676 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007678 grep -v '^ *+' conftest.er1 >conftest.err
7679 rm -f conftest.er1
7680 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007682 (exit $ac_status); } && {
7683 test -z "$ac_c_werror_flag" ||
7684 test ! -s conftest.err
7685 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007686 ac_hi=-1 ac_mid=-1
7687 while :; do
7688 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007689/* confdefs.h. */
7690_ACEOF
7691cat confdefs.h >>conftest.$ac_ext
7692cat >>conftest.$ac_ext <<_ACEOF
7693/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007694$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007695 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007696int
7697main ()
7698{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007699static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007700test_array [0] = 0
7701
7702 ;
7703 return 0;
7704}
7705_ACEOF
7706rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007707if { (ac_try="$ac_compile"
7708case "(($ac_try" in
7709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7710 *) ac_try_echo=$ac_try;;
7711esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007713 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007714 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007715 grep -v '^ *+' conftest.er1 >conftest.err
7716 rm -f conftest.er1
7717 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007719 (exit $ac_status); } && {
7720 test -z "$ac_c_werror_flag" ||
7721 test ! -s conftest.err
7722 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007723 ac_lo=$ac_mid; break
7724else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007726sed 's/^/| /' conftest.$ac_ext >&5
7727
Martin v. Löwiseba40652007-08-30 20:10:57 +00007728 ac_hi=`expr '(' $ac_mid ')' - 1`
7729 if test $ac_mid -le $ac_hi; then
7730 ac_lo= ac_hi=
7731 break
7732 fi
7733 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007735
7736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007737 done
7738else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007740sed 's/^/| /' conftest.$ac_ext >&5
7741
Martin v. Löwiseba40652007-08-30 20:10:57 +00007742 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007743fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007744
7745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007747
7748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007749# Binary search between lo and hi bounds.
7750while test "x$ac_lo" != "x$ac_hi"; do
7751 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007753/* confdefs.h. */
7754_ACEOF
7755cat confdefs.h >>conftest.$ac_ext
7756cat >>conftest.$ac_ext <<_ACEOF
7757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007758$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007759 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007760int
7761main ()
7762{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007763static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007764test_array [0] = 0
7765
7766 ;
7767 return 0;
7768}
7769_ACEOF
7770rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007771if { (ac_try="$ac_compile"
7772case "(($ac_try" in
7773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7774 *) ac_try_echo=$ac_try;;
7775esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007779 grep -v '^ *+' conftest.er1 >conftest.err
7780 rm -f conftest.er1
7781 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007783 (exit $ac_status); } && {
7784 test -z "$ac_c_werror_flag" ||
7785 test ! -s conftest.err
7786 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007787 ac_hi=$ac_mid
7788else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007790sed 's/^/| /' conftest.$ac_ext >&5
7791
Martin v. Löwiseba40652007-08-30 20:10:57 +00007792 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007794
7795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007796done
7797case $ac_lo in
7798?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007799'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007800 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007801See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007802echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007803See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007804 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007805 else
7806 ac_cv_sizeof_int=0
7807 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007808esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007809else
Martin v. Löwis11437992002-04-12 09:54:03 +00007810 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007811/* confdefs.h. */
7812_ACEOF
7813cat confdefs.h >>conftest.$ac_ext
7814cat >>conftest.$ac_ext <<_ACEOF
7815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007816$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007817 typedef int ac__type_sizeof_;
7818static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7819static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007820#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007821#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007822int
7823main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007824{
Martin v. Löwis11437992002-04-12 09:54:03 +00007825
7826 FILE *f = fopen ("conftest.val", "w");
7827 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007828 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007829 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007830 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007831 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007832 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007833 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007834 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007835 }
7836 else
7837 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007838 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007839 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007840 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007841 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007842 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007843 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007844
7845 ;
7846 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007847}
Martin v. Löwis11437992002-04-12 09:54:03 +00007848_ACEOF
7849rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007850if { (ac_try="$ac_link"
7851case "(($ac_try" in
7852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7853 *) ac_try_echo=$ac_try;;
7854esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007856 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007857 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007859 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007860 { (case "(($ac_try" in
7861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7862 *) ac_try_echo=$ac_try;;
7863esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007865 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007866 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007868 (exit $ac_status); }; }; then
7869 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007870else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007871 echo "$as_me: program exited with status $ac_status" >&5
7872echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007873sed 's/^/| /' conftest.$ac_ext >&5
7874
Martin v. Löwis11437992002-04-12 09:54:03 +00007875( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007876if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007877 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007878See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007879echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007880See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007881 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007882 else
7883 ac_cv_sizeof_int=0
7884 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007885fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007886rm -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 +00007887fi
7888rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007889fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007890{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7891echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007892
7893
7894
Martin v. Löwis11437992002-04-12 09:54:03 +00007895cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007896#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007897_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007898
7899
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007900{ echo "$as_me:$LINENO: checking for long" >&5
7901echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7902if test "${ac_cv_type_long+set}" = set; then
7903 echo $ECHO_N "(cached) $ECHO_C" >&6
7904else
7905 cat >conftest.$ac_ext <<_ACEOF
7906/* confdefs.h. */
7907_ACEOF
7908cat confdefs.h >>conftest.$ac_ext
7909cat >>conftest.$ac_ext <<_ACEOF
7910/* end confdefs.h. */
7911$ac_includes_default
7912typedef long ac__type_new_;
7913int
7914main ()
7915{
7916if ((ac__type_new_ *) 0)
7917 return 0;
7918if (sizeof (ac__type_new_))
7919 return 0;
7920 ;
7921 return 0;
7922}
7923_ACEOF
7924rm -f conftest.$ac_objext
7925if { (ac_try="$ac_compile"
7926case "(($ac_try" in
7927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7928 *) ac_try_echo=$ac_try;;
7929esac
7930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7931 (eval "$ac_compile") 2>conftest.er1
7932 ac_status=$?
7933 grep -v '^ *+' conftest.er1 >conftest.err
7934 rm -f conftest.er1
7935 cat conftest.err >&5
7936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7937 (exit $ac_status); } && {
7938 test -z "$ac_c_werror_flag" ||
7939 test ! -s conftest.err
7940 } && test -s conftest.$ac_objext; then
7941 ac_cv_type_long=yes
7942else
7943 echo "$as_me: failed program was:" >&5
7944sed 's/^/| /' conftest.$ac_ext >&5
7945
7946 ac_cv_type_long=no
7947fi
7948
7949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7950fi
7951{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7952echo "${ECHO_T}$ac_cv_type_long" >&6; }
7953
Martin v. Löwiseba40652007-08-30 20:10:57 +00007954# The cast to long int works around a bug in the HP C Compiler
7955# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7956# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7957# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007958{ echo "$as_me:$LINENO: checking size of long" >&5
7959echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007960if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007961 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007962else
Martin v. Löwis11437992002-04-12 09:54:03 +00007963 if test "$cross_compiling" = yes; then
7964 # Depending upon the size, compute the lo and hi bounds.
7965cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007966/* confdefs.h. */
7967_ACEOF
7968cat confdefs.h >>conftest.$ac_ext
7969cat >>conftest.$ac_ext <<_ACEOF
7970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007971$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007972 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007973int
7974main ()
7975{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007976static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007977test_array [0] = 0
7978
7979 ;
7980 return 0;
7981}
7982_ACEOF
7983rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007984if { (ac_try="$ac_compile"
7985case "(($ac_try" in
7986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7987 *) ac_try_echo=$ac_try;;
7988esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007990 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007991 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007992 grep -v '^ *+' conftest.er1 >conftest.err
7993 rm -f conftest.er1
7994 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007996 (exit $ac_status); } && {
7997 test -z "$ac_c_werror_flag" ||
7998 test ! -s conftest.err
7999 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008000 ac_lo=0 ac_mid=0
8001 while :; do
8002 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008003/* confdefs.h. */
8004_ACEOF
8005cat confdefs.h >>conftest.$ac_ext
8006cat >>conftest.$ac_ext <<_ACEOF
8007/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008008$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008009 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008010int
8011main ()
8012{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008013static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008014test_array [0] = 0
8015
8016 ;
8017 return 0;
8018}
8019_ACEOF
8020rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008021if { (ac_try="$ac_compile"
8022case "(($ac_try" in
8023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8024 *) ac_try_echo=$ac_try;;
8025esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008027 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008028 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008029 grep -v '^ *+' conftest.er1 >conftest.err
8030 rm -f conftest.er1
8031 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008033 (exit $ac_status); } && {
8034 test -z "$ac_c_werror_flag" ||
8035 test ! -s conftest.err
8036 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008037 ac_hi=$ac_mid; break
8038else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008040sed 's/^/| /' conftest.$ac_ext >&5
8041
Martin v. Löwiseba40652007-08-30 20:10:57 +00008042 ac_lo=`expr $ac_mid + 1`
8043 if test $ac_lo -le $ac_mid; then
8044 ac_lo= ac_hi=
8045 break
8046 fi
8047 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008048fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008049
8050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008051 done
8052else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008054sed 's/^/| /' conftest.$ac_ext >&5
8055
Martin v. Löwiseba40652007-08-30 20:10:57 +00008056 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008057/* confdefs.h. */
8058_ACEOF
8059cat confdefs.h >>conftest.$ac_ext
8060cat >>conftest.$ac_ext <<_ACEOF
8061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008062$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008063 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008064int
8065main ()
8066{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008067static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008068test_array [0] = 0
8069
8070 ;
8071 return 0;
8072}
8073_ACEOF
8074rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008075if { (ac_try="$ac_compile"
8076case "(($ac_try" in
8077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8078 *) ac_try_echo=$ac_try;;
8079esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008081 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008082 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008083 grep -v '^ *+' conftest.er1 >conftest.err
8084 rm -f conftest.er1
8085 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008087 (exit $ac_status); } && {
8088 test -z "$ac_c_werror_flag" ||
8089 test ! -s conftest.err
8090 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008091 ac_hi=-1 ac_mid=-1
8092 while :; do
8093 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008094/* confdefs.h. */
8095_ACEOF
8096cat confdefs.h >>conftest.$ac_ext
8097cat >>conftest.$ac_ext <<_ACEOF
8098/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008099$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008100 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008101int
8102main ()
8103{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008104static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008105test_array [0] = 0
8106
8107 ;
8108 return 0;
8109}
8110_ACEOF
8111rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008112if { (ac_try="$ac_compile"
8113case "(($ac_try" in
8114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8115 *) ac_try_echo=$ac_try;;
8116esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008120 grep -v '^ *+' conftest.er1 >conftest.err
8121 rm -f conftest.er1
8122 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008124 (exit $ac_status); } && {
8125 test -z "$ac_c_werror_flag" ||
8126 test ! -s conftest.err
8127 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008128 ac_lo=$ac_mid; break
8129else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008131sed 's/^/| /' conftest.$ac_ext >&5
8132
Martin v. Löwiseba40652007-08-30 20:10:57 +00008133 ac_hi=`expr '(' $ac_mid ')' - 1`
8134 if test $ac_mid -le $ac_hi; then
8135 ac_lo= ac_hi=
8136 break
8137 fi
8138 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008140
8141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008142 done
8143else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008145sed 's/^/| /' conftest.$ac_ext >&5
8146
Martin v. Löwiseba40652007-08-30 20:10:57 +00008147 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008149
8150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008151fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008152
8153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008154# Binary search between lo and hi bounds.
8155while test "x$ac_lo" != "x$ac_hi"; do
8156 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8157 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008158/* confdefs.h. */
8159_ACEOF
8160cat confdefs.h >>conftest.$ac_ext
8161cat >>conftest.$ac_ext <<_ACEOF
8162/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008163$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008164 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008165int
8166main ()
8167{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008168static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008169test_array [0] = 0
8170
8171 ;
8172 return 0;
8173}
8174_ACEOF
8175rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008176if { (ac_try="$ac_compile"
8177case "(($ac_try" in
8178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8179 *) ac_try_echo=$ac_try;;
8180esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008182 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008183 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008184 grep -v '^ *+' conftest.er1 >conftest.err
8185 rm -f conftest.er1
8186 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008188 (exit $ac_status); } && {
8189 test -z "$ac_c_werror_flag" ||
8190 test ! -s conftest.err
8191 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008192 ac_hi=$ac_mid
8193else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008195sed 's/^/| /' conftest.$ac_ext >&5
8196
Martin v. Löwiseba40652007-08-30 20:10:57 +00008197 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008199
8200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008201done
8202case $ac_lo in
8203?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008204'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008205 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008206See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008207echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008208See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008209 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008210 else
8211 ac_cv_sizeof_long=0
8212 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008213esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008214else
Martin v. Löwis11437992002-04-12 09:54:03 +00008215 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008216/* confdefs.h. */
8217_ACEOF
8218cat confdefs.h >>conftest.$ac_ext
8219cat >>conftest.$ac_ext <<_ACEOF
8220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008221$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008222 typedef long ac__type_sizeof_;
8223static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8224static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008225#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008226#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008227int
8228main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008229{
Martin v. Löwis11437992002-04-12 09:54:03 +00008230
8231 FILE *f = fopen ("conftest.val", "w");
8232 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008233 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008234 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008235 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008236 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008237 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008238 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008239 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008240 }
8241 else
8242 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008243 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008244 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008245 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008246 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008247 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008248 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008249
8250 ;
8251 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008252}
Martin v. Löwis11437992002-04-12 09:54:03 +00008253_ACEOF
8254rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008255if { (ac_try="$ac_link"
8256case "(($ac_try" in
8257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8258 *) ac_try_echo=$ac_try;;
8259esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008261 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008262 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008264 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008265 { (case "(($ac_try" in
8266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8267 *) ac_try_echo=$ac_try;;
8268esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008270 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008271 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008273 (exit $ac_status); }; }; then
8274 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008275else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008276 echo "$as_me: program exited with status $ac_status" >&5
8277echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008278sed 's/^/| /' conftest.$ac_ext >&5
8279
Martin v. Löwis11437992002-04-12 09:54:03 +00008280( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008281if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008282 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008283See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008284echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008285See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008286 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008287 else
8288 ac_cv_sizeof_long=0
8289 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008291rm -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 +00008292fi
8293rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008294fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008295{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8296echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008297
8298
8299
Martin v. Löwis11437992002-04-12 09:54:03 +00008300cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008301#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008302_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008303
8304
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008305{ echo "$as_me:$LINENO: checking for void *" >&5
8306echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8307if test "${ac_cv_type_void_p+set}" = set; then
8308 echo $ECHO_N "(cached) $ECHO_C" >&6
8309else
8310 cat >conftest.$ac_ext <<_ACEOF
8311/* confdefs.h. */
8312_ACEOF
8313cat confdefs.h >>conftest.$ac_ext
8314cat >>conftest.$ac_ext <<_ACEOF
8315/* end confdefs.h. */
8316$ac_includes_default
8317typedef void * ac__type_new_;
8318int
8319main ()
8320{
8321if ((ac__type_new_ *) 0)
8322 return 0;
8323if (sizeof (ac__type_new_))
8324 return 0;
8325 ;
8326 return 0;
8327}
8328_ACEOF
8329rm -f conftest.$ac_objext
8330if { (ac_try="$ac_compile"
8331case "(($ac_try" in
8332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8333 *) ac_try_echo=$ac_try;;
8334esac
8335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8336 (eval "$ac_compile") 2>conftest.er1
8337 ac_status=$?
8338 grep -v '^ *+' conftest.er1 >conftest.err
8339 rm -f conftest.er1
8340 cat conftest.err >&5
8341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8342 (exit $ac_status); } && {
8343 test -z "$ac_c_werror_flag" ||
8344 test ! -s conftest.err
8345 } && test -s conftest.$ac_objext; then
8346 ac_cv_type_void_p=yes
8347else
8348 echo "$as_me: failed program was:" >&5
8349sed 's/^/| /' conftest.$ac_ext >&5
8350
8351 ac_cv_type_void_p=no
8352fi
8353
8354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8355fi
8356{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8357echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8358
Martin v. Löwiseba40652007-08-30 20:10:57 +00008359# The cast to long int works around a bug in the HP C Compiler
8360# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8361# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8362# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008363{ echo "$as_me:$LINENO: checking size of void *" >&5
8364echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008365if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008366 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008367else
Martin v. Löwis11437992002-04-12 09:54:03 +00008368 if test "$cross_compiling" = yes; then
8369 # Depending upon the size, compute the lo and hi bounds.
8370cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008371/* confdefs.h. */
8372_ACEOF
8373cat confdefs.h >>conftest.$ac_ext
8374cat >>conftest.$ac_ext <<_ACEOF
8375/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008376$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008377 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008378int
8379main ()
8380{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008381static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008382test_array [0] = 0
8383
8384 ;
8385 return 0;
8386}
8387_ACEOF
8388rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008389if { (ac_try="$ac_compile"
8390case "(($ac_try" in
8391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8392 *) ac_try_echo=$ac_try;;
8393esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008395 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008396 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008397 grep -v '^ *+' conftest.er1 >conftest.err
8398 rm -f conftest.er1
8399 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008401 (exit $ac_status); } && {
8402 test -z "$ac_c_werror_flag" ||
8403 test ! -s conftest.err
8404 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008405 ac_lo=0 ac_mid=0
8406 while :; do
8407 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008408/* confdefs.h. */
8409_ACEOF
8410cat confdefs.h >>conftest.$ac_ext
8411cat >>conftest.$ac_ext <<_ACEOF
8412/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008413$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008414 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008415int
8416main ()
8417{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008418static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008419test_array [0] = 0
8420
8421 ;
8422 return 0;
8423}
8424_ACEOF
8425rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008426if { (ac_try="$ac_compile"
8427case "(($ac_try" in
8428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8429 *) ac_try_echo=$ac_try;;
8430esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008432 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008433 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008434 grep -v '^ *+' conftest.er1 >conftest.err
8435 rm -f conftest.er1
8436 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008438 (exit $ac_status); } && {
8439 test -z "$ac_c_werror_flag" ||
8440 test ! -s conftest.err
8441 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008442 ac_hi=$ac_mid; break
8443else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008445sed 's/^/| /' conftest.$ac_ext >&5
8446
Martin v. Löwiseba40652007-08-30 20:10:57 +00008447 ac_lo=`expr $ac_mid + 1`
8448 if test $ac_lo -le $ac_mid; then
8449 ac_lo= ac_hi=
8450 break
8451 fi
8452 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008454
8455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008456 done
8457else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008459sed 's/^/| /' conftest.$ac_ext >&5
8460
Martin v. Löwiseba40652007-08-30 20:10:57 +00008461 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008462/* confdefs.h. */
8463_ACEOF
8464cat confdefs.h >>conftest.$ac_ext
8465cat >>conftest.$ac_ext <<_ACEOF
8466/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008467$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008468 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008469int
8470main ()
8471{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008472static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008473test_array [0] = 0
8474
8475 ;
8476 return 0;
8477}
8478_ACEOF
8479rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008480if { (ac_try="$ac_compile"
8481case "(($ac_try" in
8482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8483 *) ac_try_echo=$ac_try;;
8484esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008486 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008487 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008488 grep -v '^ *+' conftest.er1 >conftest.err
8489 rm -f conftest.er1
8490 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008492 (exit $ac_status); } && {
8493 test -z "$ac_c_werror_flag" ||
8494 test ! -s conftest.err
8495 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008496 ac_hi=-1 ac_mid=-1
8497 while :; do
8498 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008499/* confdefs.h. */
8500_ACEOF
8501cat confdefs.h >>conftest.$ac_ext
8502cat >>conftest.$ac_ext <<_ACEOF
8503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008504$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008505 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008506int
8507main ()
8508{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008509static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008510test_array [0] = 0
8511
8512 ;
8513 return 0;
8514}
8515_ACEOF
8516rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008517if { (ac_try="$ac_compile"
8518case "(($ac_try" in
8519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8520 *) ac_try_echo=$ac_try;;
8521esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008523 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008524 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008525 grep -v '^ *+' conftest.er1 >conftest.err
8526 rm -f conftest.er1
8527 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008529 (exit $ac_status); } && {
8530 test -z "$ac_c_werror_flag" ||
8531 test ! -s conftest.err
8532 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008533 ac_lo=$ac_mid; break
8534else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008536sed 's/^/| /' conftest.$ac_ext >&5
8537
Martin v. Löwiseba40652007-08-30 20:10:57 +00008538 ac_hi=`expr '(' $ac_mid ')' - 1`
8539 if test $ac_mid -le $ac_hi; then
8540 ac_lo= ac_hi=
8541 break
8542 fi
8543 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008545
8546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008547 done
8548else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008550sed 's/^/| /' conftest.$ac_ext >&5
8551
Martin v. Löwiseba40652007-08-30 20:10:57 +00008552 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008554
8555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008556fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008557
8558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008559# Binary search between lo and hi bounds.
8560while test "x$ac_lo" != "x$ac_hi"; do
8561 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8562 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008563/* confdefs.h. */
8564_ACEOF
8565cat confdefs.h >>conftest.$ac_ext
8566cat >>conftest.$ac_ext <<_ACEOF
8567/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008568$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008569 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008570int
8571main ()
8572{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008573static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008574test_array [0] = 0
8575
8576 ;
8577 return 0;
8578}
8579_ACEOF
8580rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008581if { (ac_try="$ac_compile"
8582case "(($ac_try" in
8583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8584 *) ac_try_echo=$ac_try;;
8585esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008587 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008588 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008589 grep -v '^ *+' conftest.er1 >conftest.err
8590 rm -f conftest.er1
8591 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008593 (exit $ac_status); } && {
8594 test -z "$ac_c_werror_flag" ||
8595 test ! -s conftest.err
8596 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008597 ac_hi=$ac_mid
8598else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008600sed 's/^/| /' conftest.$ac_ext >&5
8601
Martin v. Löwiseba40652007-08-30 20:10:57 +00008602 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008604
8605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008606done
8607case $ac_lo in
8608?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008609'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008610 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008611See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008612echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008613See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008614 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008615 else
8616 ac_cv_sizeof_void_p=0
8617 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008618esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008619else
Martin v. Löwis11437992002-04-12 09:54:03 +00008620 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008621/* confdefs.h. */
8622_ACEOF
8623cat confdefs.h >>conftest.$ac_ext
8624cat >>conftest.$ac_ext <<_ACEOF
8625/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008626$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008627 typedef void * ac__type_sizeof_;
8628static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8629static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008630#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008631#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008632int
8633main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008634{
Martin v. Löwis11437992002-04-12 09:54:03 +00008635
8636 FILE *f = fopen ("conftest.val", "w");
8637 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008638 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008639 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008640 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008641 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008642 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008643 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008644 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008645 }
8646 else
8647 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008648 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008649 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008650 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008651 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008652 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008653 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008654
8655 ;
8656 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008657}
Martin v. Löwis11437992002-04-12 09:54:03 +00008658_ACEOF
8659rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008660if { (ac_try="$ac_link"
8661case "(($ac_try" in
8662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8663 *) ac_try_echo=$ac_try;;
8664esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008666 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008667 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008669 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008670 { (case "(($ac_try" in
8671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8672 *) ac_try_echo=$ac_try;;
8673esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008675 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008676 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008678 (exit $ac_status); }; }; then
8679 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008680else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008681 echo "$as_me: program exited with status $ac_status" >&5
8682echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008683sed 's/^/| /' conftest.$ac_ext >&5
8684
Martin v. Löwis11437992002-04-12 09:54:03 +00008685( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008686if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008687 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008688See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008689echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008690See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008691 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008692 else
8693 ac_cv_sizeof_void_p=0
8694 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008696rm -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 +00008697fi
8698rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008699fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008700{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8701echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008702
8703
8704
Martin v. Löwis11437992002-04-12 09:54:03 +00008705cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008706#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008707_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008708
8709
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008710{ echo "$as_me:$LINENO: checking for short" >&5
8711echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8712if test "${ac_cv_type_short+set}" = set; then
8713 echo $ECHO_N "(cached) $ECHO_C" >&6
8714else
8715 cat >conftest.$ac_ext <<_ACEOF
8716/* confdefs.h. */
8717_ACEOF
8718cat confdefs.h >>conftest.$ac_ext
8719cat >>conftest.$ac_ext <<_ACEOF
8720/* end confdefs.h. */
8721$ac_includes_default
8722typedef short ac__type_new_;
8723int
8724main ()
8725{
8726if ((ac__type_new_ *) 0)
8727 return 0;
8728if (sizeof (ac__type_new_))
8729 return 0;
8730 ;
8731 return 0;
8732}
8733_ACEOF
8734rm -f conftest.$ac_objext
8735if { (ac_try="$ac_compile"
8736case "(($ac_try" in
8737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8738 *) ac_try_echo=$ac_try;;
8739esac
8740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8741 (eval "$ac_compile") 2>conftest.er1
8742 ac_status=$?
8743 grep -v '^ *+' conftest.er1 >conftest.err
8744 rm -f conftest.er1
8745 cat conftest.err >&5
8746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8747 (exit $ac_status); } && {
8748 test -z "$ac_c_werror_flag" ||
8749 test ! -s conftest.err
8750 } && test -s conftest.$ac_objext; then
8751 ac_cv_type_short=yes
8752else
8753 echo "$as_me: failed program was:" >&5
8754sed 's/^/| /' conftest.$ac_ext >&5
8755
8756 ac_cv_type_short=no
8757fi
8758
8759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8760fi
8761{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8762echo "${ECHO_T}$ac_cv_type_short" >&6; }
8763
Martin v. Löwiseba40652007-08-30 20:10:57 +00008764# The cast to long int works around a bug in the HP C Compiler
8765# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8766# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8767# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008768{ echo "$as_me:$LINENO: checking size of short" >&5
8769echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008770if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008771 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008772else
Martin v. Löwis11437992002-04-12 09:54:03 +00008773 if test "$cross_compiling" = yes; then
8774 # Depending upon the size, compute the lo and hi bounds.
8775cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008776/* confdefs.h. */
8777_ACEOF
8778cat confdefs.h >>conftest.$ac_ext
8779cat >>conftest.$ac_ext <<_ACEOF
8780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008781$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008782 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008783int
8784main ()
8785{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008786static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008787test_array [0] = 0
8788
8789 ;
8790 return 0;
8791}
8792_ACEOF
8793rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008794if { (ac_try="$ac_compile"
8795case "(($ac_try" in
8796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8797 *) ac_try_echo=$ac_try;;
8798esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008800 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008801 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008802 grep -v '^ *+' conftest.er1 >conftest.err
8803 rm -f conftest.er1
8804 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008806 (exit $ac_status); } && {
8807 test -z "$ac_c_werror_flag" ||
8808 test ! -s conftest.err
8809 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008810 ac_lo=0 ac_mid=0
8811 while :; do
8812 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008813/* confdefs.h. */
8814_ACEOF
8815cat confdefs.h >>conftest.$ac_ext
8816cat >>conftest.$ac_ext <<_ACEOF
8817/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008818$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008819 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008820int
8821main ()
8822{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008823static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008824test_array [0] = 0
8825
8826 ;
8827 return 0;
8828}
8829_ACEOF
8830rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008831if { (ac_try="$ac_compile"
8832case "(($ac_try" in
8833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8834 *) ac_try_echo=$ac_try;;
8835esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008837 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008839 grep -v '^ *+' conftest.er1 >conftest.err
8840 rm -f conftest.er1
8841 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008843 (exit $ac_status); } && {
8844 test -z "$ac_c_werror_flag" ||
8845 test ! -s conftest.err
8846 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008847 ac_hi=$ac_mid; break
8848else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008850sed 's/^/| /' conftest.$ac_ext >&5
8851
Martin v. Löwiseba40652007-08-30 20:10:57 +00008852 ac_lo=`expr $ac_mid + 1`
8853 if test $ac_lo -le $ac_mid; then
8854 ac_lo= ac_hi=
8855 break
8856 fi
8857 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008859
8860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008861 done
8862else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008864sed 's/^/| /' conftest.$ac_ext >&5
8865
Martin v. Löwiseba40652007-08-30 20:10:57 +00008866 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008867/* confdefs.h. */
8868_ACEOF
8869cat confdefs.h >>conftest.$ac_ext
8870cat >>conftest.$ac_ext <<_ACEOF
8871/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008872$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008873 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008874int
8875main ()
8876{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008877static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008878test_array [0] = 0
8879
8880 ;
8881 return 0;
8882}
8883_ACEOF
8884rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008885if { (ac_try="$ac_compile"
8886case "(($ac_try" in
8887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8888 *) ac_try_echo=$ac_try;;
8889esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008891 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008893 grep -v '^ *+' conftest.er1 >conftest.err
8894 rm -f conftest.er1
8895 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008897 (exit $ac_status); } && {
8898 test -z "$ac_c_werror_flag" ||
8899 test ! -s conftest.err
8900 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008901 ac_hi=-1 ac_mid=-1
8902 while :; do
8903 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008904/* confdefs.h. */
8905_ACEOF
8906cat confdefs.h >>conftest.$ac_ext
8907cat >>conftest.$ac_ext <<_ACEOF
8908/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008909$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008910 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008911int
8912main ()
8913{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008914static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008915test_array [0] = 0
8916
8917 ;
8918 return 0;
8919}
8920_ACEOF
8921rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008922if { (ac_try="$ac_compile"
8923case "(($ac_try" in
8924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8925 *) ac_try_echo=$ac_try;;
8926esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008928 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008929 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008930 grep -v '^ *+' conftest.er1 >conftest.err
8931 rm -f conftest.er1
8932 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008934 (exit $ac_status); } && {
8935 test -z "$ac_c_werror_flag" ||
8936 test ! -s conftest.err
8937 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008938 ac_lo=$ac_mid; break
8939else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008941sed 's/^/| /' conftest.$ac_ext >&5
8942
Martin v. Löwiseba40652007-08-30 20:10:57 +00008943 ac_hi=`expr '(' $ac_mid ')' - 1`
8944 if test $ac_mid -le $ac_hi; then
8945 ac_lo= ac_hi=
8946 break
8947 fi
8948 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008950
8951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008952 done
8953else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008955sed 's/^/| /' conftest.$ac_ext >&5
8956
Martin v. Löwiseba40652007-08-30 20:10:57 +00008957 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008959
8960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008961fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008962
8963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008964# Binary search between lo and hi bounds.
8965while test "x$ac_lo" != "x$ac_hi"; do
8966 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8967 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008968/* confdefs.h. */
8969_ACEOF
8970cat confdefs.h >>conftest.$ac_ext
8971cat >>conftest.$ac_ext <<_ACEOF
8972/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008973$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008974 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008975int
8976main ()
8977{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008978static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008979test_array [0] = 0
8980
8981 ;
8982 return 0;
8983}
8984_ACEOF
8985rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008986if { (ac_try="$ac_compile"
8987case "(($ac_try" in
8988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8989 *) ac_try_echo=$ac_try;;
8990esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008992 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008994 grep -v '^ *+' conftest.er1 >conftest.err
8995 rm -f conftest.er1
8996 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008998 (exit $ac_status); } && {
8999 test -z "$ac_c_werror_flag" ||
9000 test ! -s conftest.err
9001 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009002 ac_hi=$ac_mid
9003else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009005sed 's/^/| /' conftest.$ac_ext >&5
9006
Martin v. Löwiseba40652007-08-30 20:10:57 +00009007 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009009
9010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009011done
9012case $ac_lo in
9013?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009014'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009015 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009016See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009017echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009018See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009019 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009020 else
9021 ac_cv_sizeof_short=0
9022 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009023esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009024else
Martin v. Löwis11437992002-04-12 09:54:03 +00009025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009026/* confdefs.h. */
9027_ACEOF
9028cat confdefs.h >>conftest.$ac_ext
9029cat >>conftest.$ac_ext <<_ACEOF
9030/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009031$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009032 typedef short ac__type_sizeof_;
9033static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9034static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009035#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009036#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009037int
9038main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009039{
Martin v. Löwis11437992002-04-12 09:54:03 +00009040
9041 FILE *f = fopen ("conftest.val", "w");
9042 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009043 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009044 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009045 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009046 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009047 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009048 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009049 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009050 }
9051 else
9052 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009053 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009054 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009055 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009056 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009058 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009059
9060 ;
9061 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009062}
Martin v. Löwis11437992002-04-12 09:54:03 +00009063_ACEOF
9064rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009065if { (ac_try="$ac_link"
9066case "(($ac_try" in
9067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9068 *) ac_try_echo=$ac_try;;
9069esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009071 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009072 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009074 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009075 { (case "(($ac_try" in
9076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9077 *) ac_try_echo=$ac_try;;
9078esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009080 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009081 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009083 (exit $ac_status); }; }; then
9084 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009085else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009086 echo "$as_me: program exited with status $ac_status" >&5
9087echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009088sed 's/^/| /' conftest.$ac_ext >&5
9089
Martin v. Löwis11437992002-04-12 09:54:03 +00009090( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009091if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009092 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009093See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009094echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009095See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009096 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009097 else
9098 ac_cv_sizeof_short=0
9099 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009100fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009101rm -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 +00009102fi
9103rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009104fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009105{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9106echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009107
9108
9109
Martin v. Löwis11437992002-04-12 09:54:03 +00009110cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009111#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009112_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009113
9114
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009115{ echo "$as_me:$LINENO: checking for float" >&5
9116echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9117if test "${ac_cv_type_float+set}" = set; then
9118 echo $ECHO_N "(cached) $ECHO_C" >&6
9119else
9120 cat >conftest.$ac_ext <<_ACEOF
9121/* confdefs.h. */
9122_ACEOF
9123cat confdefs.h >>conftest.$ac_ext
9124cat >>conftest.$ac_ext <<_ACEOF
9125/* end confdefs.h. */
9126$ac_includes_default
9127typedef float ac__type_new_;
9128int
9129main ()
9130{
9131if ((ac__type_new_ *) 0)
9132 return 0;
9133if (sizeof (ac__type_new_))
9134 return 0;
9135 ;
9136 return 0;
9137}
9138_ACEOF
9139rm -f conftest.$ac_objext
9140if { (ac_try="$ac_compile"
9141case "(($ac_try" in
9142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9143 *) ac_try_echo=$ac_try;;
9144esac
9145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9146 (eval "$ac_compile") 2>conftest.er1
9147 ac_status=$?
9148 grep -v '^ *+' conftest.er1 >conftest.err
9149 rm -f conftest.er1
9150 cat conftest.err >&5
9151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9152 (exit $ac_status); } && {
9153 test -z "$ac_c_werror_flag" ||
9154 test ! -s conftest.err
9155 } && test -s conftest.$ac_objext; then
9156 ac_cv_type_float=yes
9157else
9158 echo "$as_me: failed program was:" >&5
9159sed 's/^/| /' conftest.$ac_ext >&5
9160
9161 ac_cv_type_float=no
9162fi
9163
9164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9165fi
9166{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9167echo "${ECHO_T}$ac_cv_type_float" >&6; }
9168
Martin v. Löwiseba40652007-08-30 20:10:57 +00009169# The cast to long int works around a bug in the HP C Compiler
9170# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9171# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9172# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009173{ echo "$as_me:$LINENO: checking size of float" >&5
9174echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009175if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009176 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009177else
Martin v. Löwis11437992002-04-12 09:54:03 +00009178 if test "$cross_compiling" = yes; then
9179 # Depending upon the size, compute the lo and hi bounds.
9180cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009181/* confdefs.h. */
9182_ACEOF
9183cat confdefs.h >>conftest.$ac_ext
9184cat >>conftest.$ac_ext <<_ACEOF
9185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009186$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009187 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009188int
9189main ()
9190{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009191static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009192test_array [0] = 0
9193
9194 ;
9195 return 0;
9196}
9197_ACEOF
9198rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009199if { (ac_try="$ac_compile"
9200case "(($ac_try" in
9201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9202 *) ac_try_echo=$ac_try;;
9203esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009205 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009207 grep -v '^ *+' conftest.er1 >conftest.err
9208 rm -f conftest.er1
9209 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009211 (exit $ac_status); } && {
9212 test -z "$ac_c_werror_flag" ||
9213 test ! -s conftest.err
9214 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009215 ac_lo=0 ac_mid=0
9216 while :; do
9217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009218/* confdefs.h. */
9219_ACEOF
9220cat confdefs.h >>conftest.$ac_ext
9221cat >>conftest.$ac_ext <<_ACEOF
9222/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009223$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009224 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009225int
9226main ()
9227{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009228static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009229test_array [0] = 0
9230
9231 ;
9232 return 0;
9233}
9234_ACEOF
9235rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009236if { (ac_try="$ac_compile"
9237case "(($ac_try" in
9238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9239 *) ac_try_echo=$ac_try;;
9240esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009242 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009244 grep -v '^ *+' conftest.er1 >conftest.err
9245 rm -f conftest.er1
9246 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009248 (exit $ac_status); } && {
9249 test -z "$ac_c_werror_flag" ||
9250 test ! -s conftest.err
9251 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009252 ac_hi=$ac_mid; break
9253else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009254 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009255sed 's/^/| /' conftest.$ac_ext >&5
9256
Martin v. Löwiseba40652007-08-30 20:10:57 +00009257 ac_lo=`expr $ac_mid + 1`
9258 if test $ac_lo -le $ac_mid; then
9259 ac_lo= ac_hi=
9260 break
9261 fi
9262 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009263fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009264
9265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009266 done
9267else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009269sed 's/^/| /' conftest.$ac_ext >&5
9270
Martin v. Löwiseba40652007-08-30 20:10:57 +00009271 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009272/* confdefs.h. */
9273_ACEOF
9274cat confdefs.h >>conftest.$ac_ext
9275cat >>conftest.$ac_ext <<_ACEOF
9276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009277$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009278 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009279int
9280main ()
9281{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009282static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009283test_array [0] = 0
9284
9285 ;
9286 return 0;
9287}
9288_ACEOF
9289rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009290if { (ac_try="$ac_compile"
9291case "(($ac_try" in
9292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9293 *) ac_try_echo=$ac_try;;
9294esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009296 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009297 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009298 grep -v '^ *+' conftest.er1 >conftest.err
9299 rm -f conftest.er1
9300 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009302 (exit $ac_status); } && {
9303 test -z "$ac_c_werror_flag" ||
9304 test ! -s conftest.err
9305 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009306 ac_hi=-1 ac_mid=-1
9307 while :; do
9308 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009309/* confdefs.h. */
9310_ACEOF
9311cat confdefs.h >>conftest.$ac_ext
9312cat >>conftest.$ac_ext <<_ACEOF
9313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009314$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009315 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009316int
9317main ()
9318{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009319static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009320test_array [0] = 0
9321
9322 ;
9323 return 0;
9324}
9325_ACEOF
9326rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009327if { (ac_try="$ac_compile"
9328case "(($ac_try" in
9329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9330 *) ac_try_echo=$ac_try;;
9331esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009333 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009334 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009335 grep -v '^ *+' conftest.er1 >conftest.err
9336 rm -f conftest.er1
9337 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009339 (exit $ac_status); } && {
9340 test -z "$ac_c_werror_flag" ||
9341 test ! -s conftest.err
9342 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009343 ac_lo=$ac_mid; break
9344else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009345 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009346sed 's/^/| /' conftest.$ac_ext >&5
9347
Martin v. Löwiseba40652007-08-30 20:10:57 +00009348 ac_hi=`expr '(' $ac_mid ')' - 1`
9349 if test $ac_mid -le $ac_hi; then
9350 ac_lo= ac_hi=
9351 break
9352 fi
9353 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009355
9356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009357 done
9358else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009360sed 's/^/| /' conftest.$ac_ext >&5
9361
Martin v. Löwiseba40652007-08-30 20:10:57 +00009362 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009364
9365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009367
9368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009369# Binary search between lo and hi bounds.
9370while test "x$ac_lo" != "x$ac_hi"; do
9371 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9372 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009373/* confdefs.h. */
9374_ACEOF
9375cat confdefs.h >>conftest.$ac_ext
9376cat >>conftest.$ac_ext <<_ACEOF
9377/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009378$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009379 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009380int
9381main ()
9382{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009383static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009384test_array [0] = 0
9385
9386 ;
9387 return 0;
9388}
9389_ACEOF
9390rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009391if { (ac_try="$ac_compile"
9392case "(($ac_try" in
9393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9394 *) ac_try_echo=$ac_try;;
9395esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009397 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009398 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009399 grep -v '^ *+' conftest.er1 >conftest.err
9400 rm -f conftest.er1
9401 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009403 (exit $ac_status); } && {
9404 test -z "$ac_c_werror_flag" ||
9405 test ! -s conftest.err
9406 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009407 ac_hi=$ac_mid
9408else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009409 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009410sed 's/^/| /' conftest.$ac_ext >&5
9411
Martin v. Löwiseba40652007-08-30 20:10:57 +00009412 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009413fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009414
9415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009416done
9417case $ac_lo in
9418?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009419'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009420 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009421See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009422echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009423See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009424 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009425 else
9426 ac_cv_sizeof_float=0
9427 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009428esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009429else
Martin v. Löwis11437992002-04-12 09:54:03 +00009430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009431/* confdefs.h. */
9432_ACEOF
9433cat confdefs.h >>conftest.$ac_ext
9434cat >>conftest.$ac_ext <<_ACEOF
9435/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009436$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009437 typedef float ac__type_sizeof_;
9438static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9439static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009440#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009441#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009442int
9443main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009444{
Martin v. Löwis11437992002-04-12 09:54:03 +00009445
9446 FILE *f = fopen ("conftest.val", "w");
9447 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009448 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009449 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009450 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009451 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009452 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009453 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009454 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009455 }
9456 else
9457 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009458 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009459 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009460 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009461 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009462 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009463 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009464
9465 ;
9466 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009467}
Martin v. Löwis11437992002-04-12 09:54:03 +00009468_ACEOF
9469rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009470if { (ac_try="$ac_link"
9471case "(($ac_try" in
9472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9473 *) ac_try_echo=$ac_try;;
9474esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009476 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009479 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009480 { (case "(($ac_try" in
9481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9482 *) ac_try_echo=$ac_try;;
9483esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009485 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009486 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009488 (exit $ac_status); }; }; then
9489 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009490else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009491 echo "$as_me: program exited with status $ac_status" >&5
9492echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009493sed 's/^/| /' conftest.$ac_ext >&5
9494
Martin v. Löwis11437992002-04-12 09:54:03 +00009495( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009496if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009497 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009498See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009499echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009500See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009501 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009502 else
9503 ac_cv_sizeof_float=0
9504 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009506rm -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 +00009507fi
9508rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009509fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009510{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9511echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009512
9513
9514
Martin v. Löwis11437992002-04-12 09:54:03 +00009515cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009516#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009517_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009518
9519
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009520{ echo "$as_me:$LINENO: checking for double" >&5
9521echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9522if test "${ac_cv_type_double+set}" = set; then
9523 echo $ECHO_N "(cached) $ECHO_C" >&6
9524else
9525 cat >conftest.$ac_ext <<_ACEOF
9526/* confdefs.h. */
9527_ACEOF
9528cat confdefs.h >>conftest.$ac_ext
9529cat >>conftest.$ac_ext <<_ACEOF
9530/* end confdefs.h. */
9531$ac_includes_default
9532typedef double ac__type_new_;
9533int
9534main ()
9535{
9536if ((ac__type_new_ *) 0)
9537 return 0;
9538if (sizeof (ac__type_new_))
9539 return 0;
9540 ;
9541 return 0;
9542}
9543_ACEOF
9544rm -f conftest.$ac_objext
9545if { (ac_try="$ac_compile"
9546case "(($ac_try" in
9547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9548 *) ac_try_echo=$ac_try;;
9549esac
9550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9551 (eval "$ac_compile") 2>conftest.er1
9552 ac_status=$?
9553 grep -v '^ *+' conftest.er1 >conftest.err
9554 rm -f conftest.er1
9555 cat conftest.err >&5
9556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9557 (exit $ac_status); } && {
9558 test -z "$ac_c_werror_flag" ||
9559 test ! -s conftest.err
9560 } && test -s conftest.$ac_objext; then
9561 ac_cv_type_double=yes
9562else
9563 echo "$as_me: failed program was:" >&5
9564sed 's/^/| /' conftest.$ac_ext >&5
9565
9566 ac_cv_type_double=no
9567fi
9568
9569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9570fi
9571{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9572echo "${ECHO_T}$ac_cv_type_double" >&6; }
9573
Martin v. Löwiseba40652007-08-30 20:10:57 +00009574# The cast to long int works around a bug in the HP C Compiler
9575# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9576# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9577# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009578{ echo "$as_me:$LINENO: checking size of double" >&5
9579echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009580if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009581 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009582else
Martin v. Löwis11437992002-04-12 09:54:03 +00009583 if test "$cross_compiling" = yes; then
9584 # Depending upon the size, compute the lo and hi bounds.
9585cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009586/* confdefs.h. */
9587_ACEOF
9588cat confdefs.h >>conftest.$ac_ext
9589cat >>conftest.$ac_ext <<_ACEOF
9590/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009591$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009592 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009593int
9594main ()
9595{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009596static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009597test_array [0] = 0
9598
9599 ;
9600 return 0;
9601}
9602_ACEOF
9603rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009604if { (ac_try="$ac_compile"
9605case "(($ac_try" in
9606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9607 *) ac_try_echo=$ac_try;;
9608esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009610 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009612 grep -v '^ *+' conftest.er1 >conftest.err
9613 rm -f conftest.er1
9614 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009616 (exit $ac_status); } && {
9617 test -z "$ac_c_werror_flag" ||
9618 test ! -s conftest.err
9619 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009620 ac_lo=0 ac_mid=0
9621 while :; do
9622 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009623/* confdefs.h. */
9624_ACEOF
9625cat confdefs.h >>conftest.$ac_ext
9626cat >>conftest.$ac_ext <<_ACEOF
9627/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009628$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009629 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009630int
9631main ()
9632{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009633static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009634test_array [0] = 0
9635
9636 ;
9637 return 0;
9638}
9639_ACEOF
9640rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009641if { (ac_try="$ac_compile"
9642case "(($ac_try" in
9643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9644 *) ac_try_echo=$ac_try;;
9645esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009647 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009648 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009649 grep -v '^ *+' conftest.er1 >conftest.err
9650 rm -f conftest.er1
9651 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009653 (exit $ac_status); } && {
9654 test -z "$ac_c_werror_flag" ||
9655 test ! -s conftest.err
9656 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009657 ac_hi=$ac_mid; break
9658else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009660sed 's/^/| /' conftest.$ac_ext >&5
9661
Martin v. Löwiseba40652007-08-30 20:10:57 +00009662 ac_lo=`expr $ac_mid + 1`
9663 if test $ac_lo -le $ac_mid; then
9664 ac_lo= ac_hi=
9665 break
9666 fi
9667 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009668fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009669
9670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009671 done
9672else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009674sed 's/^/| /' conftest.$ac_ext >&5
9675
Martin v. Löwiseba40652007-08-30 20:10:57 +00009676 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009677/* confdefs.h. */
9678_ACEOF
9679cat confdefs.h >>conftest.$ac_ext
9680cat >>conftest.$ac_ext <<_ACEOF
9681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009682$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009683 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009684int
9685main ()
9686{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009687static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009688test_array [0] = 0
9689
9690 ;
9691 return 0;
9692}
9693_ACEOF
9694rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009695if { (ac_try="$ac_compile"
9696case "(($ac_try" in
9697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9698 *) ac_try_echo=$ac_try;;
9699esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009701 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009703 grep -v '^ *+' conftest.er1 >conftest.err
9704 rm -f conftest.er1
9705 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009707 (exit $ac_status); } && {
9708 test -z "$ac_c_werror_flag" ||
9709 test ! -s conftest.err
9710 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009711 ac_hi=-1 ac_mid=-1
9712 while :; do
9713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009714/* confdefs.h. */
9715_ACEOF
9716cat confdefs.h >>conftest.$ac_ext
9717cat >>conftest.$ac_ext <<_ACEOF
9718/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009719$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009720 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009721int
9722main ()
9723{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009724static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009725test_array [0] = 0
9726
9727 ;
9728 return 0;
9729}
9730_ACEOF
9731rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009732if { (ac_try="$ac_compile"
9733case "(($ac_try" in
9734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9735 *) ac_try_echo=$ac_try;;
9736esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009738 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009740 grep -v '^ *+' conftest.er1 >conftest.err
9741 rm -f conftest.er1
9742 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009744 (exit $ac_status); } && {
9745 test -z "$ac_c_werror_flag" ||
9746 test ! -s conftest.err
9747 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009748 ac_lo=$ac_mid; break
9749else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009750 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009751sed 's/^/| /' conftest.$ac_ext >&5
9752
Martin v. Löwiseba40652007-08-30 20:10:57 +00009753 ac_hi=`expr '(' $ac_mid ')' - 1`
9754 if test $ac_mid -le $ac_hi; then
9755 ac_lo= ac_hi=
9756 break
9757 fi
9758 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009759fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009760
9761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009762 done
9763else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009765sed 's/^/| /' conftest.$ac_ext >&5
9766
Martin v. Löwiseba40652007-08-30 20:10:57 +00009767 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009768fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009769
9770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009771fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009772
9773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009774# Binary search between lo and hi bounds.
9775while test "x$ac_lo" != "x$ac_hi"; do
9776 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9777 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009778/* confdefs.h. */
9779_ACEOF
9780cat confdefs.h >>conftest.$ac_ext
9781cat >>conftest.$ac_ext <<_ACEOF
9782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009783$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009784 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009785int
9786main ()
9787{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009788static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009789test_array [0] = 0
9790
9791 ;
9792 return 0;
9793}
9794_ACEOF
9795rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009796if { (ac_try="$ac_compile"
9797case "(($ac_try" in
9798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9799 *) ac_try_echo=$ac_try;;
9800esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009802 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009804 grep -v '^ *+' conftest.er1 >conftest.err
9805 rm -f conftest.er1
9806 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009808 (exit $ac_status); } && {
9809 test -z "$ac_c_werror_flag" ||
9810 test ! -s conftest.err
9811 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009812 ac_hi=$ac_mid
9813else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009815sed 's/^/| /' conftest.$ac_ext >&5
9816
Martin v. Löwiseba40652007-08-30 20:10:57 +00009817 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009819
9820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009821done
9822case $ac_lo in
9823?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009824'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009825 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009826See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009827echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009828See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009829 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009830 else
9831 ac_cv_sizeof_double=0
9832 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009833esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009834else
Martin v. Löwis11437992002-04-12 09:54:03 +00009835 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009836/* confdefs.h. */
9837_ACEOF
9838cat confdefs.h >>conftest.$ac_ext
9839cat >>conftest.$ac_ext <<_ACEOF
9840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009841$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009842 typedef double ac__type_sizeof_;
9843static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9844static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009845#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009846#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009847int
9848main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009849{
Martin v. Löwis11437992002-04-12 09:54:03 +00009850
9851 FILE *f = fopen ("conftest.val", "w");
9852 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009853 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009854 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009855 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009856 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009857 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009858 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009859 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009860 }
9861 else
9862 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009863 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009864 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009865 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009866 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009867 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009868 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009869
9870 ;
9871 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009872}
Martin v. Löwis11437992002-04-12 09:54:03 +00009873_ACEOF
9874rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009875if { (ac_try="$ac_link"
9876case "(($ac_try" in
9877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9878 *) ac_try_echo=$ac_try;;
9879esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009881 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009884 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009885 { (case "(($ac_try" in
9886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9887 *) ac_try_echo=$ac_try;;
9888esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009890 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009891 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009893 (exit $ac_status); }; }; then
9894 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009895else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009896 echo "$as_me: program exited with status $ac_status" >&5
9897echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009898sed 's/^/| /' conftest.$ac_ext >&5
9899
Martin v. Löwis11437992002-04-12 09:54:03 +00009900( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009901if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009902 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009903See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009904echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009905See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009906 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009907 else
9908 ac_cv_sizeof_double=0
9909 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009911rm -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 +00009912fi
9913rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009914fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009915{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9916echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009917
9918
9919
Martin v. Löwis11437992002-04-12 09:54:03 +00009920cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009921#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009922_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009923
9924
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009925{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9926echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9927if test "${ac_cv_type_fpos_t+set}" = set; then
9928 echo $ECHO_N "(cached) $ECHO_C" >&6
9929else
9930 cat >conftest.$ac_ext <<_ACEOF
9931/* confdefs.h. */
9932_ACEOF
9933cat confdefs.h >>conftest.$ac_ext
9934cat >>conftest.$ac_ext <<_ACEOF
9935/* end confdefs.h. */
9936$ac_includes_default
9937typedef fpos_t ac__type_new_;
9938int
9939main ()
9940{
9941if ((ac__type_new_ *) 0)
9942 return 0;
9943if (sizeof (ac__type_new_))
9944 return 0;
9945 ;
9946 return 0;
9947}
9948_ACEOF
9949rm -f conftest.$ac_objext
9950if { (ac_try="$ac_compile"
9951case "(($ac_try" in
9952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9953 *) ac_try_echo=$ac_try;;
9954esac
9955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9956 (eval "$ac_compile") 2>conftest.er1
9957 ac_status=$?
9958 grep -v '^ *+' conftest.er1 >conftest.err
9959 rm -f conftest.er1
9960 cat conftest.err >&5
9961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9962 (exit $ac_status); } && {
9963 test -z "$ac_c_werror_flag" ||
9964 test ! -s conftest.err
9965 } && test -s conftest.$ac_objext; then
9966 ac_cv_type_fpos_t=yes
9967else
9968 echo "$as_me: failed program was:" >&5
9969sed 's/^/| /' conftest.$ac_ext >&5
9970
9971 ac_cv_type_fpos_t=no
9972fi
9973
9974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9975fi
9976{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9977echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9978
Martin v. Löwiseba40652007-08-30 20:10:57 +00009979# The cast to long int works around a bug in the HP C Compiler
9980# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9981# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9982# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009983{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9984echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009985if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009986 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009987else
Martin v. Löwis11437992002-04-12 09:54:03 +00009988 if test "$cross_compiling" = yes; then
9989 # Depending upon the size, compute the lo and hi bounds.
9990cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009991/* confdefs.h. */
9992_ACEOF
9993cat confdefs.h >>conftest.$ac_ext
9994cat >>conftest.$ac_ext <<_ACEOF
9995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009996$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009997 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009998int
9999main ()
10000{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010001static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010002test_array [0] = 0
10003
10004 ;
10005 return 0;
10006}
10007_ACEOF
10008rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010009if { (ac_try="$ac_compile"
10010case "(($ac_try" in
10011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10012 *) ac_try_echo=$ac_try;;
10013esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010015 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010017 grep -v '^ *+' conftest.er1 >conftest.err
10018 rm -f conftest.er1
10019 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010021 (exit $ac_status); } && {
10022 test -z "$ac_c_werror_flag" ||
10023 test ! -s conftest.err
10024 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010025 ac_lo=0 ac_mid=0
10026 while :; do
10027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010028/* confdefs.h. */
10029_ACEOF
10030cat confdefs.h >>conftest.$ac_ext
10031cat >>conftest.$ac_ext <<_ACEOF
10032/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010033$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010034 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010035int
10036main ()
10037{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010038static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010039test_array [0] = 0
10040
10041 ;
10042 return 0;
10043}
10044_ACEOF
10045rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010046if { (ac_try="$ac_compile"
10047case "(($ac_try" in
10048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10049 *) ac_try_echo=$ac_try;;
10050esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010052 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010054 grep -v '^ *+' conftest.er1 >conftest.err
10055 rm -f conftest.er1
10056 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010058 (exit $ac_status); } && {
10059 test -z "$ac_c_werror_flag" ||
10060 test ! -s conftest.err
10061 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010062 ac_hi=$ac_mid; break
10063else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010065sed 's/^/| /' conftest.$ac_ext >&5
10066
Martin v. Löwiseba40652007-08-30 20:10:57 +000010067 ac_lo=`expr $ac_mid + 1`
10068 if test $ac_lo -le $ac_mid; then
10069 ac_lo= ac_hi=
10070 break
10071 fi
10072 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010074
10075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010076 done
10077else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010079sed 's/^/| /' conftest.$ac_ext >&5
10080
Martin v. Löwiseba40652007-08-30 20:10:57 +000010081 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010082/* confdefs.h. */
10083_ACEOF
10084cat confdefs.h >>conftest.$ac_ext
10085cat >>conftest.$ac_ext <<_ACEOF
10086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010087$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010088 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010089int
10090main ()
10091{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010092static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010093test_array [0] = 0
10094
10095 ;
10096 return 0;
10097}
10098_ACEOF
10099rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010100if { (ac_try="$ac_compile"
10101case "(($ac_try" in
10102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10103 *) ac_try_echo=$ac_try;;
10104esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010106 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010107 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010108 grep -v '^ *+' conftest.er1 >conftest.err
10109 rm -f conftest.er1
10110 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010112 (exit $ac_status); } && {
10113 test -z "$ac_c_werror_flag" ||
10114 test ! -s conftest.err
10115 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010116 ac_hi=-1 ac_mid=-1
10117 while :; do
10118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010119/* confdefs.h. */
10120_ACEOF
10121cat confdefs.h >>conftest.$ac_ext
10122cat >>conftest.$ac_ext <<_ACEOF
10123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010124$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010125 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010126int
10127main ()
10128{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010129static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010130test_array [0] = 0
10131
10132 ;
10133 return 0;
10134}
10135_ACEOF
10136rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010137if { (ac_try="$ac_compile"
10138case "(($ac_try" in
10139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10140 *) ac_try_echo=$ac_try;;
10141esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010143 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010145 grep -v '^ *+' conftest.er1 >conftest.err
10146 rm -f conftest.er1
10147 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010149 (exit $ac_status); } && {
10150 test -z "$ac_c_werror_flag" ||
10151 test ! -s conftest.err
10152 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010153 ac_lo=$ac_mid; break
10154else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010156sed 's/^/| /' conftest.$ac_ext >&5
10157
Martin v. Löwiseba40652007-08-30 20:10:57 +000010158 ac_hi=`expr '(' $ac_mid ')' - 1`
10159 if test $ac_mid -le $ac_hi; then
10160 ac_lo= ac_hi=
10161 break
10162 fi
10163 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010165
10166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010167 done
10168else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010170sed 's/^/| /' conftest.$ac_ext >&5
10171
Martin v. Löwiseba40652007-08-30 20:10:57 +000010172 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010174
10175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010176fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010177
10178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010179# Binary search between lo and hi bounds.
10180while test "x$ac_lo" != "x$ac_hi"; do
10181 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10182 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010183/* confdefs.h. */
10184_ACEOF
10185cat confdefs.h >>conftest.$ac_ext
10186cat >>conftest.$ac_ext <<_ACEOF
10187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010188$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010189 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010190int
10191main ()
10192{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010193static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010194test_array [0] = 0
10195
10196 ;
10197 return 0;
10198}
10199_ACEOF
10200rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010201if { (ac_try="$ac_compile"
10202case "(($ac_try" in
10203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10204 *) ac_try_echo=$ac_try;;
10205esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010207 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010209 grep -v '^ *+' conftest.er1 >conftest.err
10210 rm -f conftest.er1
10211 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010213 (exit $ac_status); } && {
10214 test -z "$ac_c_werror_flag" ||
10215 test ! -s conftest.err
10216 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010217 ac_hi=$ac_mid
10218else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010220sed 's/^/| /' conftest.$ac_ext >&5
10221
Martin v. Löwiseba40652007-08-30 20:10:57 +000010222 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010224
10225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010226done
10227case $ac_lo in
10228?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010229'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010230 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010231See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010232echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010233See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010234 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010235 else
10236 ac_cv_sizeof_fpos_t=0
10237 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010238esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010239else
Martin v. Löwis11437992002-04-12 09:54:03 +000010240 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010241/* confdefs.h. */
10242_ACEOF
10243cat confdefs.h >>conftest.$ac_ext
10244cat >>conftest.$ac_ext <<_ACEOF
10245/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010246$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010247 typedef fpos_t ac__type_sizeof_;
10248static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10249static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010250#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010251#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010252int
10253main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010254{
Martin v. Löwis11437992002-04-12 09:54:03 +000010255
10256 FILE *f = fopen ("conftest.val", "w");
10257 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010258 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010259 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010260 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010261 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010262 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010263 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010264 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 }
10266 else
10267 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010268 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010269 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010270 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010271 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010272 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010273 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010274
10275 ;
10276 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010277}
Martin v. Löwis11437992002-04-12 09:54:03 +000010278_ACEOF
10279rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010280if { (ac_try="$ac_link"
10281case "(($ac_try" in
10282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10283 *) ac_try_echo=$ac_try;;
10284esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010286 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010287 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010289 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010290 { (case "(($ac_try" in
10291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10292 *) ac_try_echo=$ac_try;;
10293esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010295 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010296 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010298 (exit $ac_status); }; }; then
10299 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010300else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010301 echo "$as_me: program exited with status $ac_status" >&5
10302echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010303sed 's/^/| /' conftest.$ac_ext >&5
10304
Martin v. Löwis11437992002-04-12 09:54:03 +000010305( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010306if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010307 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010308See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010309echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010310See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010311 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010312 else
10313 ac_cv_sizeof_fpos_t=0
10314 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010315fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010316rm -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 +000010317fi
10318rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010319fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010320{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10321echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010322
10323
10324
Martin v. Löwis11437992002-04-12 09:54:03 +000010325cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010326#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010327_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010328
Michael W. Hudson54241132001-12-07 15:38:26 +000010329
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010330{ echo "$as_me:$LINENO: checking for size_t" >&5
10331echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10332if test "${ac_cv_type_size_t+set}" = set; then
10333 echo $ECHO_N "(cached) $ECHO_C" >&6
10334else
10335 cat >conftest.$ac_ext <<_ACEOF
10336/* confdefs.h. */
10337_ACEOF
10338cat confdefs.h >>conftest.$ac_ext
10339cat >>conftest.$ac_ext <<_ACEOF
10340/* end confdefs.h. */
10341$ac_includes_default
10342typedef size_t ac__type_new_;
10343int
10344main ()
10345{
10346if ((ac__type_new_ *) 0)
10347 return 0;
10348if (sizeof (ac__type_new_))
10349 return 0;
10350 ;
10351 return 0;
10352}
10353_ACEOF
10354rm -f conftest.$ac_objext
10355if { (ac_try="$ac_compile"
10356case "(($ac_try" in
10357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10358 *) ac_try_echo=$ac_try;;
10359esac
10360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10361 (eval "$ac_compile") 2>conftest.er1
10362 ac_status=$?
10363 grep -v '^ *+' conftest.er1 >conftest.err
10364 rm -f conftest.er1
10365 cat conftest.err >&5
10366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10367 (exit $ac_status); } && {
10368 test -z "$ac_c_werror_flag" ||
10369 test ! -s conftest.err
10370 } && test -s conftest.$ac_objext; then
10371 ac_cv_type_size_t=yes
10372else
10373 echo "$as_me: failed program was:" >&5
10374sed 's/^/| /' conftest.$ac_ext >&5
10375
10376 ac_cv_type_size_t=no
10377fi
10378
10379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10380fi
10381{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10382echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10383
Martin v. Löwiseba40652007-08-30 20:10:57 +000010384# The cast to long int works around a bug in the HP C Compiler
10385# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10386# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10387# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010388{ echo "$as_me:$LINENO: checking size of size_t" >&5
10389echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010390if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010391 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010392else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010393 if test "$cross_compiling" = yes; then
10394 # Depending upon the size, compute the lo and hi bounds.
10395cat >conftest.$ac_ext <<_ACEOF
10396/* confdefs.h. */
10397_ACEOF
10398cat confdefs.h >>conftest.$ac_ext
10399cat >>conftest.$ac_ext <<_ACEOF
10400/* end confdefs.h. */
10401$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010402 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010403int
10404main ()
10405{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010406static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010407test_array [0] = 0
10408
10409 ;
10410 return 0;
10411}
10412_ACEOF
10413rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010414if { (ac_try="$ac_compile"
10415case "(($ac_try" in
10416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10417 *) ac_try_echo=$ac_try;;
10418esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010420 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010421 ac_status=$?
10422 grep -v '^ *+' conftest.er1 >conftest.err
10423 rm -f conftest.er1
10424 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010426 (exit $ac_status); } && {
10427 test -z "$ac_c_werror_flag" ||
10428 test ! -s conftest.err
10429 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010430 ac_lo=0 ac_mid=0
10431 while :; do
10432 cat >conftest.$ac_ext <<_ACEOF
10433/* confdefs.h. */
10434_ACEOF
10435cat confdefs.h >>conftest.$ac_ext
10436cat >>conftest.$ac_ext <<_ACEOF
10437/* end confdefs.h. */
10438$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010439 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010440int
10441main ()
10442{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010443static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010444test_array [0] = 0
10445
10446 ;
10447 return 0;
10448}
10449_ACEOF
10450rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010451if { (ac_try="$ac_compile"
10452case "(($ac_try" in
10453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10454 *) ac_try_echo=$ac_try;;
10455esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010457 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010458 ac_status=$?
10459 grep -v '^ *+' conftest.er1 >conftest.err
10460 rm -f conftest.er1
10461 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010463 (exit $ac_status); } && {
10464 test -z "$ac_c_werror_flag" ||
10465 test ! -s conftest.err
10466 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010467 ac_hi=$ac_mid; break
10468else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010469 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010470sed 's/^/| /' conftest.$ac_ext >&5
10471
Martin v. Löwiseba40652007-08-30 20:10:57 +000010472 ac_lo=`expr $ac_mid + 1`
10473 if test $ac_lo -le $ac_mid; then
10474 ac_lo= ac_hi=
10475 break
10476 fi
10477 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010478fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010479
10480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010481 done
10482else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010483 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010484sed 's/^/| /' conftest.$ac_ext >&5
10485
Martin v. Löwiseba40652007-08-30 20:10:57 +000010486 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010487/* confdefs.h. */
10488_ACEOF
10489cat confdefs.h >>conftest.$ac_ext
10490cat >>conftest.$ac_ext <<_ACEOF
10491/* end confdefs.h. */
10492$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010493 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010494int
10495main ()
10496{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010497static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010498test_array [0] = 0
10499
10500 ;
10501 return 0;
10502}
10503_ACEOF
10504rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010505if { (ac_try="$ac_compile"
10506case "(($ac_try" in
10507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10508 *) ac_try_echo=$ac_try;;
10509esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010511 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010512 ac_status=$?
10513 grep -v '^ *+' conftest.er1 >conftest.err
10514 rm -f conftest.er1
10515 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010517 (exit $ac_status); } && {
10518 test -z "$ac_c_werror_flag" ||
10519 test ! -s conftest.err
10520 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010521 ac_hi=-1 ac_mid=-1
10522 while :; do
10523 cat >conftest.$ac_ext <<_ACEOF
10524/* confdefs.h. */
10525_ACEOF
10526cat confdefs.h >>conftest.$ac_ext
10527cat >>conftest.$ac_ext <<_ACEOF
10528/* end confdefs.h. */
10529$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010530 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010531int
10532main ()
10533{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010534static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010535test_array [0] = 0
10536
10537 ;
10538 return 0;
10539}
10540_ACEOF
10541rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010542if { (ac_try="$ac_compile"
10543case "(($ac_try" in
10544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10545 *) ac_try_echo=$ac_try;;
10546esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010548 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010549 ac_status=$?
10550 grep -v '^ *+' conftest.er1 >conftest.err
10551 rm -f conftest.er1
10552 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010554 (exit $ac_status); } && {
10555 test -z "$ac_c_werror_flag" ||
10556 test ! -s conftest.err
10557 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010558 ac_lo=$ac_mid; break
10559else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010560 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010561sed 's/^/| /' conftest.$ac_ext >&5
10562
Martin v. Löwiseba40652007-08-30 20:10:57 +000010563 ac_hi=`expr '(' $ac_mid ')' - 1`
10564 if test $ac_mid -le $ac_hi; then
10565 ac_lo= ac_hi=
10566 break
10567 fi
10568 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010570
10571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010572 done
10573else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010574 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010575sed 's/^/| /' conftest.$ac_ext >&5
10576
Martin v. Löwiseba40652007-08-30 20:10:57 +000010577 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010578fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010579
10580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010582
10583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010584# Binary search between lo and hi bounds.
10585while test "x$ac_lo" != "x$ac_hi"; do
10586 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10587 cat >conftest.$ac_ext <<_ACEOF
10588/* confdefs.h. */
10589_ACEOF
10590cat confdefs.h >>conftest.$ac_ext
10591cat >>conftest.$ac_ext <<_ACEOF
10592/* end confdefs.h. */
10593$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010594 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010595int
10596main ()
10597{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010598static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010599test_array [0] = 0
10600
10601 ;
10602 return 0;
10603}
10604_ACEOF
10605rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010606if { (ac_try="$ac_compile"
10607case "(($ac_try" in
10608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10609 *) ac_try_echo=$ac_try;;
10610esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010612 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010613 ac_status=$?
10614 grep -v '^ *+' conftest.er1 >conftest.err
10615 rm -f conftest.er1
10616 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010618 (exit $ac_status); } && {
10619 test -z "$ac_c_werror_flag" ||
10620 test ! -s conftest.err
10621 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010622 ac_hi=$ac_mid
10623else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010624 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010625sed 's/^/| /' conftest.$ac_ext >&5
10626
Martin v. Löwiseba40652007-08-30 20:10:57 +000010627 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010629
10630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010631done
10632case $ac_lo in
10633?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010634'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010635 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010636See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010637echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010638See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010639 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010640 else
10641 ac_cv_sizeof_size_t=0
10642 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010643esac
10644else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010645 cat >conftest.$ac_ext <<_ACEOF
10646/* confdefs.h. */
10647_ACEOF
10648cat confdefs.h >>conftest.$ac_ext
10649cat >>conftest.$ac_ext <<_ACEOF
10650/* end confdefs.h. */
10651$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010652 typedef size_t ac__type_sizeof_;
10653static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10654static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010655#include <stdio.h>
10656#include <stdlib.h>
10657int
10658main ()
10659{
10660
10661 FILE *f = fopen ("conftest.val", "w");
10662 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010663 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010664 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010665 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010666 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010667 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010668 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010669 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670 }
10671 else
10672 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010673 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010674 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010675 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010676 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010677 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010678 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010679
10680 ;
10681 return 0;
10682}
10683_ACEOF
10684rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010685if { (ac_try="$ac_link"
10686case "(($ac_try" in
10687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10688 *) ac_try_echo=$ac_try;;
10689esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010691 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010692 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010694 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010695 { (case "(($ac_try" in
10696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10697 *) ac_try_echo=$ac_try;;
10698esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010700 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010701 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010703 (exit $ac_status); }; }; then
10704 ac_cv_sizeof_size_t=`cat conftest.val`
10705else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010706 echo "$as_me: program exited with status $ac_status" >&5
10707echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010708sed 's/^/| /' conftest.$ac_ext >&5
10709
10710( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010711if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010712 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010713See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010714echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010715See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010716 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010717 else
10718 ac_cv_sizeof_size_t=0
10719 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010720fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010721rm -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 +000010722fi
10723rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010724fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010725{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10726echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010727
10728
10729
Martin v. Löwis18e16552006-02-15 17:27:45 +000010730cat >>confdefs.h <<_ACEOF
10731#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10732_ACEOF
10733
10734
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010735{ echo "$as_me:$LINENO: checking for pid_t" >&5
10736echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10737if test "${ac_cv_type_pid_t+set}" = set; then
10738 echo $ECHO_N "(cached) $ECHO_C" >&6
10739else
10740 cat >conftest.$ac_ext <<_ACEOF
10741/* confdefs.h. */
10742_ACEOF
10743cat confdefs.h >>conftest.$ac_ext
10744cat >>conftest.$ac_ext <<_ACEOF
10745/* end confdefs.h. */
10746$ac_includes_default
10747typedef pid_t ac__type_new_;
10748int
10749main ()
10750{
10751if ((ac__type_new_ *) 0)
10752 return 0;
10753if (sizeof (ac__type_new_))
10754 return 0;
10755 ;
10756 return 0;
10757}
10758_ACEOF
10759rm -f conftest.$ac_objext
10760if { (ac_try="$ac_compile"
10761case "(($ac_try" in
10762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10763 *) ac_try_echo=$ac_try;;
10764esac
10765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10766 (eval "$ac_compile") 2>conftest.er1
10767 ac_status=$?
10768 grep -v '^ *+' conftest.er1 >conftest.err
10769 rm -f conftest.er1
10770 cat conftest.err >&5
10771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10772 (exit $ac_status); } && {
10773 test -z "$ac_c_werror_flag" ||
10774 test ! -s conftest.err
10775 } && test -s conftest.$ac_objext; then
10776 ac_cv_type_pid_t=yes
10777else
10778 echo "$as_me: failed program was:" >&5
10779sed 's/^/| /' conftest.$ac_ext >&5
10780
10781 ac_cv_type_pid_t=no
10782fi
10783
10784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10785fi
10786{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10787echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10788
Christian Heimes951cc0f2008-01-31 23:08:23 +000010789# The cast to long int works around a bug in the HP C Compiler
10790# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10791# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10792# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010793{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10794echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010795if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010796 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010797else
10798 if test "$cross_compiling" = yes; then
10799 # Depending upon the size, compute the lo and hi bounds.
10800cat >conftest.$ac_ext <<_ACEOF
10801/* confdefs.h. */
10802_ACEOF
10803cat confdefs.h >>conftest.$ac_ext
10804cat >>conftest.$ac_ext <<_ACEOF
10805/* end confdefs.h. */
10806$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010807 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010808int
10809main ()
10810{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010811static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010812test_array [0] = 0
10813
10814 ;
10815 return 0;
10816}
10817_ACEOF
10818rm -f conftest.$ac_objext
10819if { (ac_try="$ac_compile"
10820case "(($ac_try" in
10821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10822 *) ac_try_echo=$ac_try;;
10823esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010825 (eval "$ac_compile") 2>conftest.er1
10826 ac_status=$?
10827 grep -v '^ *+' conftest.er1 >conftest.err
10828 rm -f conftest.er1
10829 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010831 (exit $ac_status); } && {
10832 test -z "$ac_c_werror_flag" ||
10833 test ! -s conftest.err
10834 } && test -s conftest.$ac_objext; then
10835 ac_lo=0 ac_mid=0
10836 while :; do
10837 cat >conftest.$ac_ext <<_ACEOF
10838/* confdefs.h. */
10839_ACEOF
10840cat confdefs.h >>conftest.$ac_ext
10841cat >>conftest.$ac_ext <<_ACEOF
10842/* end confdefs.h. */
10843$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010844 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010845int
10846main ()
10847{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010848static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010849test_array [0] = 0
10850
10851 ;
10852 return 0;
10853}
10854_ACEOF
10855rm -f conftest.$ac_objext
10856if { (ac_try="$ac_compile"
10857case "(($ac_try" in
10858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10859 *) ac_try_echo=$ac_try;;
10860esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010862 (eval "$ac_compile") 2>conftest.er1
10863 ac_status=$?
10864 grep -v '^ *+' conftest.er1 >conftest.err
10865 rm -f conftest.er1
10866 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010868 (exit $ac_status); } && {
10869 test -z "$ac_c_werror_flag" ||
10870 test ! -s conftest.err
10871 } && test -s conftest.$ac_objext; then
10872 ac_hi=$ac_mid; break
10873else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010874 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010875sed 's/^/| /' conftest.$ac_ext >&5
10876
10877 ac_lo=`expr $ac_mid + 1`
10878 if test $ac_lo -le $ac_mid; then
10879 ac_lo= ac_hi=
10880 break
10881 fi
10882 ac_mid=`expr 2 '*' $ac_mid + 1`
10883fi
10884
10885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10886 done
10887else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010888 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010889sed 's/^/| /' conftest.$ac_ext >&5
10890
10891 cat >conftest.$ac_ext <<_ACEOF
10892/* confdefs.h. */
10893_ACEOF
10894cat confdefs.h >>conftest.$ac_ext
10895cat >>conftest.$ac_ext <<_ACEOF
10896/* end confdefs.h. */
10897$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010898 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010899int
10900main ()
10901{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010902static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010903test_array [0] = 0
10904
10905 ;
10906 return 0;
10907}
10908_ACEOF
10909rm -f conftest.$ac_objext
10910if { (ac_try="$ac_compile"
10911case "(($ac_try" in
10912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10913 *) ac_try_echo=$ac_try;;
10914esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010916 (eval "$ac_compile") 2>conftest.er1
10917 ac_status=$?
10918 grep -v '^ *+' conftest.er1 >conftest.err
10919 rm -f conftest.er1
10920 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010922 (exit $ac_status); } && {
10923 test -z "$ac_c_werror_flag" ||
10924 test ! -s conftest.err
10925 } && test -s conftest.$ac_objext; then
10926 ac_hi=-1 ac_mid=-1
10927 while :; do
10928 cat >conftest.$ac_ext <<_ACEOF
10929/* confdefs.h. */
10930_ACEOF
10931cat confdefs.h >>conftest.$ac_ext
10932cat >>conftest.$ac_ext <<_ACEOF
10933/* end confdefs.h. */
10934$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010935 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010936int
10937main ()
10938{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010939static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010940test_array [0] = 0
10941
10942 ;
10943 return 0;
10944}
10945_ACEOF
10946rm -f conftest.$ac_objext
10947if { (ac_try="$ac_compile"
10948case "(($ac_try" in
10949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10950 *) ac_try_echo=$ac_try;;
10951esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010953 (eval "$ac_compile") 2>conftest.er1
10954 ac_status=$?
10955 grep -v '^ *+' conftest.er1 >conftest.err
10956 rm -f conftest.er1
10957 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010959 (exit $ac_status); } && {
10960 test -z "$ac_c_werror_flag" ||
10961 test ! -s conftest.err
10962 } && test -s conftest.$ac_objext; then
10963 ac_lo=$ac_mid; break
10964else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010965 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010966sed 's/^/| /' conftest.$ac_ext >&5
10967
10968 ac_hi=`expr '(' $ac_mid ')' - 1`
10969 if test $ac_mid -le $ac_hi; then
10970 ac_lo= ac_hi=
10971 break
10972 fi
10973 ac_mid=`expr 2 '*' $ac_mid`
10974fi
10975
10976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10977 done
10978else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010979 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010980sed 's/^/| /' conftest.$ac_ext >&5
10981
10982 ac_lo= ac_hi=
10983fi
10984
10985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10986fi
10987
10988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10989# Binary search between lo and hi bounds.
10990while test "x$ac_lo" != "x$ac_hi"; do
10991 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10992 cat >conftest.$ac_ext <<_ACEOF
10993/* confdefs.h. */
10994_ACEOF
10995cat confdefs.h >>conftest.$ac_ext
10996cat >>conftest.$ac_ext <<_ACEOF
10997/* end confdefs.h. */
10998$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010999 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011000int
11001main ()
11002{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011003static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011004test_array [0] = 0
11005
11006 ;
11007 return 0;
11008}
11009_ACEOF
11010rm -f conftest.$ac_objext
11011if { (ac_try="$ac_compile"
11012case "(($ac_try" in
11013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11014 *) ac_try_echo=$ac_try;;
11015esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011017 (eval "$ac_compile") 2>conftest.er1
11018 ac_status=$?
11019 grep -v '^ *+' conftest.er1 >conftest.err
11020 rm -f conftest.er1
11021 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011023 (exit $ac_status); } && {
11024 test -z "$ac_c_werror_flag" ||
11025 test ! -s conftest.err
11026 } && test -s conftest.$ac_objext; then
11027 ac_hi=$ac_mid
11028else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011029 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011030sed 's/^/| /' conftest.$ac_ext >&5
11031
11032 ac_lo=`expr '(' $ac_mid ')' + 1`
11033fi
11034
11035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11036done
11037case $ac_lo in
11038?*) ac_cv_sizeof_pid_t=$ac_lo;;
11039'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011040 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011041See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011042echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011043See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011044 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011045 else
11046 ac_cv_sizeof_pid_t=0
11047 fi ;;
11048esac
11049else
11050 cat >conftest.$ac_ext <<_ACEOF
11051/* confdefs.h. */
11052_ACEOF
11053cat confdefs.h >>conftest.$ac_ext
11054cat >>conftest.$ac_ext <<_ACEOF
11055/* end confdefs.h. */
11056$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011057 typedef pid_t ac__type_sizeof_;
11058static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11059static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011060#include <stdio.h>
11061#include <stdlib.h>
11062int
11063main ()
11064{
11065
11066 FILE *f = fopen ("conftest.val", "w");
11067 if (! f)
11068 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011069 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011070 {
11071 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011072 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011073 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011074 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011075 }
11076 else
11077 {
11078 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011079 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011080 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011081 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011082 }
11083 return ferror (f) || fclose (f) != 0;
11084
11085 ;
11086 return 0;
11087}
11088_ACEOF
11089rm -f conftest$ac_exeext
11090if { (ac_try="$ac_link"
11091case "(($ac_try" in
11092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11093 *) ac_try_echo=$ac_try;;
11094esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011096 (eval "$ac_link") 2>&5
11097 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011099 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11100 { (case "(($ac_try" in
11101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11102 *) ac_try_echo=$ac_try;;
11103esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011105 (eval "$ac_try") 2>&5
11106 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011108 (exit $ac_status); }; }; then
11109 ac_cv_sizeof_pid_t=`cat conftest.val`
11110else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011111 echo "$as_me: program exited with status $ac_status" >&5
11112echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011113sed 's/^/| /' conftest.$ac_ext >&5
11114
11115( exit $ac_status )
11116if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011117 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011118See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011119echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011120See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011121 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011122 else
11123 ac_cv_sizeof_pid_t=0
11124 fi
11125fi
11126rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11127fi
11128rm -f conftest.val
11129fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011130{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11131echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011132
11133
11134
11135cat >>confdefs.h <<_ACEOF
11136#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11137_ACEOF
11138
11139
Michael W. Hudson54241132001-12-07 15:38:26 +000011140
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011141{ echo "$as_me:$LINENO: checking for long long support" >&5
11142echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011143have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011144cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011145/* confdefs.h. */
11146_ACEOF
11147cat confdefs.h >>conftest.$ac_ext
11148cat >>conftest.$ac_ext <<_ACEOF
11149/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011150
Martin v. Löwis11437992002-04-12 09:54:03 +000011151int
11152main ()
11153{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011154long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011155 ;
11156 return 0;
11157}
11158_ACEOF
11159rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011160if { (ac_try="$ac_compile"
11161case "(($ac_try" in
11162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11163 *) ac_try_echo=$ac_try;;
11164esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011166 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011167 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011168 grep -v '^ *+' conftest.er1 >conftest.err
11169 rm -f conftest.er1
11170 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011172 (exit $ac_status); } && {
11173 test -z "$ac_c_werror_flag" ||
11174 test ! -s conftest.err
11175 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011176
11177
11178cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011179#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011180_ACEOF
11181
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011182 have_long_long=yes
11183
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011184else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011186sed 's/^/| /' conftest.$ac_ext >&5
11187
Martin v. Löwiseba40652007-08-30 20:10:57 +000011188
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011189fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011190
11191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011192{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11193echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011194if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011195{ echo "$as_me:$LINENO: checking for long long" >&5
11196echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11197if test "${ac_cv_type_long_long+set}" = set; then
11198 echo $ECHO_N "(cached) $ECHO_C" >&6
11199else
11200 cat >conftest.$ac_ext <<_ACEOF
11201/* confdefs.h. */
11202_ACEOF
11203cat confdefs.h >>conftest.$ac_ext
11204cat >>conftest.$ac_ext <<_ACEOF
11205/* end confdefs.h. */
11206$ac_includes_default
11207typedef long long ac__type_new_;
11208int
11209main ()
11210{
11211if ((ac__type_new_ *) 0)
11212 return 0;
11213if (sizeof (ac__type_new_))
11214 return 0;
11215 ;
11216 return 0;
11217}
11218_ACEOF
11219rm -f conftest.$ac_objext
11220if { (ac_try="$ac_compile"
11221case "(($ac_try" in
11222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11223 *) ac_try_echo=$ac_try;;
11224esac
11225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11226 (eval "$ac_compile") 2>conftest.er1
11227 ac_status=$?
11228 grep -v '^ *+' conftest.er1 >conftest.err
11229 rm -f conftest.er1
11230 cat conftest.err >&5
11231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11232 (exit $ac_status); } && {
11233 test -z "$ac_c_werror_flag" ||
11234 test ! -s conftest.err
11235 } && test -s conftest.$ac_objext; then
11236 ac_cv_type_long_long=yes
11237else
11238 echo "$as_me: failed program was:" >&5
11239sed 's/^/| /' conftest.$ac_ext >&5
11240
11241 ac_cv_type_long_long=no
11242fi
11243
11244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11245fi
11246{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11247echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11248
Martin v. Löwiseba40652007-08-30 20:10:57 +000011249# The cast to long int works around a bug in the HP C Compiler
11250# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11251# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11252# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011253{ echo "$as_me:$LINENO: checking size of long long" >&5
11254echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011255if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011256 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011257else
Martin v. Löwis11437992002-04-12 09:54:03 +000011258 if test "$cross_compiling" = yes; then
11259 # Depending upon the size, compute the lo and hi bounds.
11260cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011261/* confdefs.h. */
11262_ACEOF
11263cat confdefs.h >>conftest.$ac_ext
11264cat >>conftest.$ac_ext <<_ACEOF
11265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011266$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011267 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011268int
11269main ()
11270{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011271static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011272test_array [0] = 0
11273
11274 ;
11275 return 0;
11276}
11277_ACEOF
11278rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011279if { (ac_try="$ac_compile"
11280case "(($ac_try" in
11281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11282 *) ac_try_echo=$ac_try;;
11283esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011285 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011286 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011287 grep -v '^ *+' conftest.er1 >conftest.err
11288 rm -f conftest.er1
11289 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011291 (exit $ac_status); } && {
11292 test -z "$ac_c_werror_flag" ||
11293 test ! -s conftest.err
11294 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011295 ac_lo=0 ac_mid=0
11296 while :; do
11297 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011298/* confdefs.h. */
11299_ACEOF
11300cat confdefs.h >>conftest.$ac_ext
11301cat >>conftest.$ac_ext <<_ACEOF
11302/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011303$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011304 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011305int
11306main ()
11307{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011308static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011309test_array [0] = 0
11310
11311 ;
11312 return 0;
11313}
11314_ACEOF
11315rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011316if { (ac_try="$ac_compile"
11317case "(($ac_try" in
11318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11319 *) ac_try_echo=$ac_try;;
11320esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011322 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011323 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011324 grep -v '^ *+' conftest.er1 >conftest.err
11325 rm -f conftest.er1
11326 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011328 (exit $ac_status); } && {
11329 test -z "$ac_c_werror_flag" ||
11330 test ! -s conftest.err
11331 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011332 ac_hi=$ac_mid; break
11333else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011335sed 's/^/| /' conftest.$ac_ext >&5
11336
Martin v. Löwiseba40652007-08-30 20:10:57 +000011337 ac_lo=`expr $ac_mid + 1`
11338 if test $ac_lo -le $ac_mid; then
11339 ac_lo= ac_hi=
11340 break
11341 fi
11342 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011343fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011344
11345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011346 done
11347else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011349sed 's/^/| /' conftest.$ac_ext >&5
11350
Martin v. Löwiseba40652007-08-30 20:10:57 +000011351 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011352/* confdefs.h. */
11353_ACEOF
11354cat confdefs.h >>conftest.$ac_ext
11355cat >>conftest.$ac_ext <<_ACEOF
11356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011357$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011358 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011359int
11360main ()
11361{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011362static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011363test_array [0] = 0
11364
11365 ;
11366 return 0;
11367}
11368_ACEOF
11369rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011370if { (ac_try="$ac_compile"
11371case "(($ac_try" in
11372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11373 *) ac_try_echo=$ac_try;;
11374esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011376 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011377 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011378 grep -v '^ *+' conftest.er1 >conftest.err
11379 rm -f conftest.er1
11380 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011382 (exit $ac_status); } && {
11383 test -z "$ac_c_werror_flag" ||
11384 test ! -s conftest.err
11385 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011386 ac_hi=-1 ac_mid=-1
11387 while :; do
11388 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011389/* confdefs.h. */
11390_ACEOF
11391cat confdefs.h >>conftest.$ac_ext
11392cat >>conftest.$ac_ext <<_ACEOF
11393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011394$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011395 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011396int
11397main ()
11398{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011399static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011400test_array [0] = 0
11401
11402 ;
11403 return 0;
11404}
11405_ACEOF
11406rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011407if { (ac_try="$ac_compile"
11408case "(($ac_try" in
11409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11410 *) ac_try_echo=$ac_try;;
11411esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011413 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011414 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011415 grep -v '^ *+' conftest.er1 >conftest.err
11416 rm -f conftest.er1
11417 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011419 (exit $ac_status); } && {
11420 test -z "$ac_c_werror_flag" ||
11421 test ! -s conftest.err
11422 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011423 ac_lo=$ac_mid; break
11424else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011426sed 's/^/| /' conftest.$ac_ext >&5
11427
Martin v. Löwiseba40652007-08-30 20:10:57 +000011428 ac_hi=`expr '(' $ac_mid ')' - 1`
11429 if test $ac_mid -le $ac_hi; then
11430 ac_lo= ac_hi=
11431 break
11432 fi
11433 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011435
11436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011437 done
11438else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011440sed 's/^/| /' conftest.$ac_ext >&5
11441
Martin v. Löwiseba40652007-08-30 20:10:57 +000011442 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011443fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011444
11445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011447
11448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011449# Binary search between lo and hi bounds.
11450while test "x$ac_lo" != "x$ac_hi"; do
11451 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11452 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011453/* confdefs.h. */
11454_ACEOF
11455cat confdefs.h >>conftest.$ac_ext
11456cat >>conftest.$ac_ext <<_ACEOF
11457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011458$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011459 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011460int
11461main ()
11462{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011463static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011464test_array [0] = 0
11465
11466 ;
11467 return 0;
11468}
11469_ACEOF
11470rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011471if { (ac_try="$ac_compile"
11472case "(($ac_try" in
11473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11474 *) ac_try_echo=$ac_try;;
11475esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011477 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011478 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011479 grep -v '^ *+' conftest.er1 >conftest.err
11480 rm -f conftest.er1
11481 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011483 (exit $ac_status); } && {
11484 test -z "$ac_c_werror_flag" ||
11485 test ! -s conftest.err
11486 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011487 ac_hi=$ac_mid
11488else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011489 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011490sed 's/^/| /' conftest.$ac_ext >&5
11491
Martin v. Löwiseba40652007-08-30 20:10:57 +000011492 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011493fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011494
11495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011496done
11497case $ac_lo in
11498?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011499'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011500 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011501See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011502echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011503See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011504 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011505 else
11506 ac_cv_sizeof_long_long=0
11507 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011508esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011509else
Martin v. Löwis11437992002-04-12 09:54:03 +000011510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011511/* confdefs.h. */
11512_ACEOF
11513cat confdefs.h >>conftest.$ac_ext
11514cat >>conftest.$ac_ext <<_ACEOF
11515/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011516$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011517 typedef long long ac__type_sizeof_;
11518static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11519static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011520#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011521#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011522int
11523main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011524{
Martin v. Löwis11437992002-04-12 09:54:03 +000011525
11526 FILE *f = fopen ("conftest.val", "w");
11527 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011528 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011529 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011530 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011531 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011532 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011533 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011534 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011535 }
11536 else
11537 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011538 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011539 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011540 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011541 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011542 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011543 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011544
11545 ;
11546 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011547}
Martin v. Löwis11437992002-04-12 09:54:03 +000011548_ACEOF
11549rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011550if { (ac_try="$ac_link"
11551case "(($ac_try" in
11552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11553 *) ac_try_echo=$ac_try;;
11554esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011556 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011557 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011559 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011560 { (case "(($ac_try" in
11561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11562 *) ac_try_echo=$ac_try;;
11563esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011565 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011566 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011568 (exit $ac_status); }; }; then
11569 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011570else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011571 echo "$as_me: program exited with status $ac_status" >&5
11572echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011573sed 's/^/| /' conftest.$ac_ext >&5
11574
Martin v. Löwis11437992002-04-12 09:54:03 +000011575( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011576if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011577 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011578See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011579echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011580See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011581 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011582 else
11583 ac_cv_sizeof_long_long=0
11584 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011586rm -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 +000011587fi
11588rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011589fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011590{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11591echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011592
11593
11594
Martin v. Löwis11437992002-04-12 09:54:03 +000011595cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011596#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011597_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011598
Michael W. Hudson54241132001-12-07 15:38:26 +000011599
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011600fi
11601
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011602{ echo "$as_me:$LINENO: checking for long double support" >&5
11603echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011604have_long_double=no
11605cat >conftest.$ac_ext <<_ACEOF
11606/* confdefs.h. */
11607_ACEOF
11608cat confdefs.h >>conftest.$ac_ext
11609cat >>conftest.$ac_ext <<_ACEOF
11610/* end confdefs.h. */
11611
11612int
11613main ()
11614{
11615long double x; x = (long double)0.;
11616 ;
11617 return 0;
11618}
11619_ACEOF
11620rm -f conftest.$ac_objext
11621if { (ac_try="$ac_compile"
11622case "(($ac_try" in
11623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11624 *) ac_try_echo=$ac_try;;
11625esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011627 (eval "$ac_compile") 2>conftest.er1
11628 ac_status=$?
11629 grep -v '^ *+' conftest.er1 >conftest.err
11630 rm -f conftest.er1
11631 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011633 (exit $ac_status); } && {
11634 test -z "$ac_c_werror_flag" ||
11635 test ! -s conftest.err
11636 } && test -s conftest.$ac_objext; then
11637
11638
11639cat >>confdefs.h <<\_ACEOF
11640#define HAVE_LONG_DOUBLE 1
11641_ACEOF
11642
11643 have_long_double=yes
11644
11645else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011646 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011647sed 's/^/| /' conftest.$ac_ext >&5
11648
11649
11650fi
11651
11652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011653{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11654echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011655if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011656{ echo "$as_me:$LINENO: checking for long double" >&5
11657echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11658if test "${ac_cv_type_long_double+set}" = set; then
11659 echo $ECHO_N "(cached) $ECHO_C" >&6
11660else
11661 cat >conftest.$ac_ext <<_ACEOF
11662/* confdefs.h. */
11663_ACEOF
11664cat confdefs.h >>conftest.$ac_ext
11665cat >>conftest.$ac_ext <<_ACEOF
11666/* end confdefs.h. */
11667$ac_includes_default
11668typedef long double ac__type_new_;
11669int
11670main ()
11671{
11672if ((ac__type_new_ *) 0)
11673 return 0;
11674if (sizeof (ac__type_new_))
11675 return 0;
11676 ;
11677 return 0;
11678}
11679_ACEOF
11680rm -f conftest.$ac_objext
11681if { (ac_try="$ac_compile"
11682case "(($ac_try" in
11683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11684 *) ac_try_echo=$ac_try;;
11685esac
11686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11687 (eval "$ac_compile") 2>conftest.er1
11688 ac_status=$?
11689 grep -v '^ *+' conftest.er1 >conftest.err
11690 rm -f conftest.er1
11691 cat conftest.err >&5
11692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11693 (exit $ac_status); } && {
11694 test -z "$ac_c_werror_flag" ||
11695 test ! -s conftest.err
11696 } && test -s conftest.$ac_objext; then
11697 ac_cv_type_long_double=yes
11698else
11699 echo "$as_me: failed program was:" >&5
11700sed 's/^/| /' conftest.$ac_ext >&5
11701
11702 ac_cv_type_long_double=no
11703fi
11704
11705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11706fi
11707{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11708echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11709
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011710# The cast to long int works around a bug in the HP C Compiler
11711# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11712# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11713# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011714{ echo "$as_me:$LINENO: checking size of long double" >&5
11715echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011716if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011717 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011718else
11719 if test "$cross_compiling" = yes; then
11720 # Depending upon the size, compute the lo and hi bounds.
11721cat >conftest.$ac_ext <<_ACEOF
11722/* confdefs.h. */
11723_ACEOF
11724cat confdefs.h >>conftest.$ac_ext
11725cat >>conftest.$ac_ext <<_ACEOF
11726/* end confdefs.h. */
11727$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011728 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011729int
11730main ()
11731{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011732static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011733test_array [0] = 0
11734
11735 ;
11736 return 0;
11737}
11738_ACEOF
11739rm -f conftest.$ac_objext
11740if { (ac_try="$ac_compile"
11741case "(($ac_try" in
11742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11743 *) ac_try_echo=$ac_try;;
11744esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011746 (eval "$ac_compile") 2>conftest.er1
11747 ac_status=$?
11748 grep -v '^ *+' conftest.er1 >conftest.err
11749 rm -f conftest.er1
11750 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011752 (exit $ac_status); } && {
11753 test -z "$ac_c_werror_flag" ||
11754 test ! -s conftest.err
11755 } && test -s conftest.$ac_objext; then
11756 ac_lo=0 ac_mid=0
11757 while :; do
11758 cat >conftest.$ac_ext <<_ACEOF
11759/* confdefs.h. */
11760_ACEOF
11761cat confdefs.h >>conftest.$ac_ext
11762cat >>conftest.$ac_ext <<_ACEOF
11763/* end confdefs.h. */
11764$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011765 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011766int
11767main ()
11768{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011769static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011770test_array [0] = 0
11771
11772 ;
11773 return 0;
11774}
11775_ACEOF
11776rm -f conftest.$ac_objext
11777if { (ac_try="$ac_compile"
11778case "(($ac_try" in
11779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11780 *) ac_try_echo=$ac_try;;
11781esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011783 (eval "$ac_compile") 2>conftest.er1
11784 ac_status=$?
11785 grep -v '^ *+' conftest.er1 >conftest.err
11786 rm -f conftest.er1
11787 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011789 (exit $ac_status); } && {
11790 test -z "$ac_c_werror_flag" ||
11791 test ! -s conftest.err
11792 } && test -s conftest.$ac_objext; then
11793 ac_hi=$ac_mid; break
11794else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011795 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011796sed 's/^/| /' conftest.$ac_ext >&5
11797
11798 ac_lo=`expr $ac_mid + 1`
11799 if test $ac_lo -le $ac_mid; then
11800 ac_lo= ac_hi=
11801 break
11802 fi
11803 ac_mid=`expr 2 '*' $ac_mid + 1`
11804fi
11805
11806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11807 done
11808else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011809 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011810sed 's/^/| /' conftest.$ac_ext >&5
11811
11812 cat >conftest.$ac_ext <<_ACEOF
11813/* confdefs.h. */
11814_ACEOF
11815cat confdefs.h >>conftest.$ac_ext
11816cat >>conftest.$ac_ext <<_ACEOF
11817/* end confdefs.h. */
11818$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011819 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011820int
11821main ()
11822{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011823static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011824test_array [0] = 0
11825
11826 ;
11827 return 0;
11828}
11829_ACEOF
11830rm -f conftest.$ac_objext
11831if { (ac_try="$ac_compile"
11832case "(($ac_try" in
11833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11834 *) ac_try_echo=$ac_try;;
11835esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011837 (eval "$ac_compile") 2>conftest.er1
11838 ac_status=$?
11839 grep -v '^ *+' conftest.er1 >conftest.err
11840 rm -f conftest.er1
11841 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011843 (exit $ac_status); } && {
11844 test -z "$ac_c_werror_flag" ||
11845 test ! -s conftest.err
11846 } && test -s conftest.$ac_objext; then
11847 ac_hi=-1 ac_mid=-1
11848 while :; do
11849 cat >conftest.$ac_ext <<_ACEOF
11850/* confdefs.h. */
11851_ACEOF
11852cat confdefs.h >>conftest.$ac_ext
11853cat >>conftest.$ac_ext <<_ACEOF
11854/* end confdefs.h. */
11855$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011856 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011857int
11858main ()
11859{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011860static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011861test_array [0] = 0
11862
11863 ;
11864 return 0;
11865}
11866_ACEOF
11867rm -f conftest.$ac_objext
11868if { (ac_try="$ac_compile"
11869case "(($ac_try" in
11870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11871 *) ac_try_echo=$ac_try;;
11872esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011874 (eval "$ac_compile") 2>conftest.er1
11875 ac_status=$?
11876 grep -v '^ *+' conftest.er1 >conftest.err
11877 rm -f conftest.er1
11878 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011880 (exit $ac_status); } && {
11881 test -z "$ac_c_werror_flag" ||
11882 test ! -s conftest.err
11883 } && test -s conftest.$ac_objext; then
11884 ac_lo=$ac_mid; break
11885else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011886 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011887sed 's/^/| /' conftest.$ac_ext >&5
11888
11889 ac_hi=`expr '(' $ac_mid ')' - 1`
11890 if test $ac_mid -le $ac_hi; then
11891 ac_lo= ac_hi=
11892 break
11893 fi
11894 ac_mid=`expr 2 '*' $ac_mid`
11895fi
11896
11897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11898 done
11899else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011900 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011901sed 's/^/| /' conftest.$ac_ext >&5
11902
11903 ac_lo= ac_hi=
11904fi
11905
11906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11907fi
11908
11909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11910# Binary search between lo and hi bounds.
11911while test "x$ac_lo" != "x$ac_hi"; do
11912 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11913 cat >conftest.$ac_ext <<_ACEOF
11914/* confdefs.h. */
11915_ACEOF
11916cat confdefs.h >>conftest.$ac_ext
11917cat >>conftest.$ac_ext <<_ACEOF
11918/* end confdefs.h. */
11919$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011920 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011921int
11922main ()
11923{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011924static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011925test_array [0] = 0
11926
11927 ;
11928 return 0;
11929}
11930_ACEOF
11931rm -f conftest.$ac_objext
11932if { (ac_try="$ac_compile"
11933case "(($ac_try" in
11934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11935 *) ac_try_echo=$ac_try;;
11936esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011938 (eval "$ac_compile") 2>conftest.er1
11939 ac_status=$?
11940 grep -v '^ *+' conftest.er1 >conftest.err
11941 rm -f conftest.er1
11942 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011944 (exit $ac_status); } && {
11945 test -z "$ac_c_werror_flag" ||
11946 test ! -s conftest.err
11947 } && test -s conftest.$ac_objext; then
11948 ac_hi=$ac_mid
11949else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011950 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011951sed 's/^/| /' conftest.$ac_ext >&5
11952
11953 ac_lo=`expr '(' $ac_mid ')' + 1`
11954fi
11955
11956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11957done
11958case $ac_lo in
11959?*) ac_cv_sizeof_long_double=$ac_lo;;
11960'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011961 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011962See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011963echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011964See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011965 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011966 else
11967 ac_cv_sizeof_long_double=0
11968 fi ;;
11969esac
11970else
11971 cat >conftest.$ac_ext <<_ACEOF
11972/* confdefs.h. */
11973_ACEOF
11974cat confdefs.h >>conftest.$ac_ext
11975cat >>conftest.$ac_ext <<_ACEOF
11976/* end confdefs.h. */
11977$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011978 typedef long double ac__type_sizeof_;
11979static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11980static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011981#include <stdio.h>
11982#include <stdlib.h>
11983int
11984main ()
11985{
11986
11987 FILE *f = fopen ("conftest.val", "w");
11988 if (! f)
11989 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011990 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011991 {
11992 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011993 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011994 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011995 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011996 }
11997 else
11998 {
11999 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012000 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012001 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012002 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012003 }
12004 return ferror (f) || fclose (f) != 0;
12005
12006 ;
12007 return 0;
12008}
12009_ACEOF
12010rm -f conftest$ac_exeext
12011if { (ac_try="$ac_link"
12012case "(($ac_try" in
12013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12014 *) ac_try_echo=$ac_try;;
12015esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012017 (eval "$ac_link") 2>&5
12018 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012020 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12021 { (case "(($ac_try" in
12022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12023 *) ac_try_echo=$ac_try;;
12024esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012026 (eval "$ac_try") 2>&5
12027 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012029 (exit $ac_status); }; }; then
12030 ac_cv_sizeof_long_double=`cat conftest.val`
12031else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012032 echo "$as_me: program exited with status $ac_status" >&5
12033echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012034sed 's/^/| /' conftest.$ac_ext >&5
12035
12036( exit $ac_status )
12037if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012038 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012039See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012040echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012041See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012042 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012043 else
12044 ac_cv_sizeof_long_double=0
12045 fi
12046fi
12047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12048fi
12049rm -f conftest.val
12050fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012051{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12052echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012053
12054
12055
12056cat >>confdefs.h <<_ACEOF
12057#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12058_ACEOF
12059
12060
12061fi
12062
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012063{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12064echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012065have_c99_bool=no
12066cat >conftest.$ac_ext <<_ACEOF
12067/* confdefs.h. */
12068_ACEOF
12069cat confdefs.h >>conftest.$ac_ext
12070cat >>conftest.$ac_ext <<_ACEOF
12071/* end confdefs.h. */
12072
12073int
12074main ()
12075{
12076_Bool x; x = (_Bool)0;
12077 ;
12078 return 0;
12079}
12080_ACEOF
12081rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012082if { (ac_try="$ac_compile"
12083case "(($ac_try" in
12084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12085 *) ac_try_echo=$ac_try;;
12086esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012088 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012089 ac_status=$?
12090 grep -v '^ *+' conftest.er1 >conftest.err
12091 rm -f conftest.er1
12092 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012094 (exit $ac_status); } && {
12095 test -z "$ac_c_werror_flag" ||
12096 test ! -s conftest.err
12097 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012098
12099
12100cat >>confdefs.h <<\_ACEOF
12101#define HAVE_C99_BOOL 1
12102_ACEOF
12103
12104 have_c99_bool=yes
12105
12106else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012107 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012108sed 's/^/| /' conftest.$ac_ext >&5
12109
Martin v. Löwiseba40652007-08-30 20:10:57 +000012110
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012111fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012112
12113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012114{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12115echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012116if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012117{ echo "$as_me:$LINENO: checking for _Bool" >&5
12118echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12119if test "${ac_cv_type__Bool+set}" = set; then
12120 echo $ECHO_N "(cached) $ECHO_C" >&6
12121else
12122 cat >conftest.$ac_ext <<_ACEOF
12123/* confdefs.h. */
12124_ACEOF
12125cat confdefs.h >>conftest.$ac_ext
12126cat >>conftest.$ac_ext <<_ACEOF
12127/* end confdefs.h. */
12128$ac_includes_default
12129typedef _Bool ac__type_new_;
12130int
12131main ()
12132{
12133if ((ac__type_new_ *) 0)
12134 return 0;
12135if (sizeof (ac__type_new_))
12136 return 0;
12137 ;
12138 return 0;
12139}
12140_ACEOF
12141rm -f conftest.$ac_objext
12142if { (ac_try="$ac_compile"
12143case "(($ac_try" in
12144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12145 *) ac_try_echo=$ac_try;;
12146esac
12147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12148 (eval "$ac_compile") 2>conftest.er1
12149 ac_status=$?
12150 grep -v '^ *+' conftest.er1 >conftest.err
12151 rm -f conftest.er1
12152 cat conftest.err >&5
12153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12154 (exit $ac_status); } && {
12155 test -z "$ac_c_werror_flag" ||
12156 test ! -s conftest.err
12157 } && test -s conftest.$ac_objext; then
12158 ac_cv_type__Bool=yes
12159else
12160 echo "$as_me: failed program was:" >&5
12161sed 's/^/| /' conftest.$ac_ext >&5
12162
12163 ac_cv_type__Bool=no
12164fi
12165
12166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12167fi
12168{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12169echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12170
Martin v. Löwiseba40652007-08-30 20:10:57 +000012171# The cast to long int works around a bug in the HP C Compiler
12172# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12173# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12174# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012175{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12176echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012177if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012178 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012179else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012180 if test "$cross_compiling" = yes; then
12181 # Depending upon the size, compute the lo and hi bounds.
12182cat >conftest.$ac_ext <<_ACEOF
12183/* confdefs.h. */
12184_ACEOF
12185cat confdefs.h >>conftest.$ac_ext
12186cat >>conftest.$ac_ext <<_ACEOF
12187/* end confdefs.h. */
12188$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012189 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012190int
12191main ()
12192{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012193static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012194test_array [0] = 0
12195
12196 ;
12197 return 0;
12198}
12199_ACEOF
12200rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012201if { (ac_try="$ac_compile"
12202case "(($ac_try" in
12203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12204 *) ac_try_echo=$ac_try;;
12205esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012207 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012208 ac_status=$?
12209 grep -v '^ *+' conftest.er1 >conftest.err
12210 rm -f conftest.er1
12211 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012213 (exit $ac_status); } && {
12214 test -z "$ac_c_werror_flag" ||
12215 test ! -s conftest.err
12216 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012217 ac_lo=0 ac_mid=0
12218 while :; do
12219 cat >conftest.$ac_ext <<_ACEOF
12220/* confdefs.h. */
12221_ACEOF
12222cat confdefs.h >>conftest.$ac_ext
12223cat >>conftest.$ac_ext <<_ACEOF
12224/* end confdefs.h. */
12225$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012226 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012227int
12228main ()
12229{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012230static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012231test_array [0] = 0
12232
12233 ;
12234 return 0;
12235}
12236_ACEOF
12237rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012238if { (ac_try="$ac_compile"
12239case "(($ac_try" in
12240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12241 *) ac_try_echo=$ac_try;;
12242esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012244 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012245 ac_status=$?
12246 grep -v '^ *+' conftest.er1 >conftest.err
12247 rm -f conftest.er1
12248 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012250 (exit $ac_status); } && {
12251 test -z "$ac_c_werror_flag" ||
12252 test ! -s conftest.err
12253 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012254 ac_hi=$ac_mid; break
12255else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012256 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012257sed 's/^/| /' conftest.$ac_ext >&5
12258
Martin v. Löwiseba40652007-08-30 20:10:57 +000012259 ac_lo=`expr $ac_mid + 1`
12260 if test $ac_lo -le $ac_mid; then
12261 ac_lo= ac_hi=
12262 break
12263 fi
12264 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012266
12267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012268 done
12269else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012270 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012271sed 's/^/| /' conftest.$ac_ext >&5
12272
Martin v. Löwiseba40652007-08-30 20:10:57 +000012273 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012274/* confdefs.h. */
12275_ACEOF
12276cat confdefs.h >>conftest.$ac_ext
12277cat >>conftest.$ac_ext <<_ACEOF
12278/* end confdefs.h. */
12279$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012280 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012281int
12282main ()
12283{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012284static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012285test_array [0] = 0
12286
12287 ;
12288 return 0;
12289}
12290_ACEOF
12291rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012292if { (ac_try="$ac_compile"
12293case "(($ac_try" in
12294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12295 *) ac_try_echo=$ac_try;;
12296esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012298 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012299 ac_status=$?
12300 grep -v '^ *+' conftest.er1 >conftest.err
12301 rm -f conftest.er1
12302 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012304 (exit $ac_status); } && {
12305 test -z "$ac_c_werror_flag" ||
12306 test ! -s conftest.err
12307 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012308 ac_hi=-1 ac_mid=-1
12309 while :; do
12310 cat >conftest.$ac_ext <<_ACEOF
12311/* confdefs.h. */
12312_ACEOF
12313cat confdefs.h >>conftest.$ac_ext
12314cat >>conftest.$ac_ext <<_ACEOF
12315/* end confdefs.h. */
12316$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012317 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012318int
12319main ()
12320{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012321static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012322test_array [0] = 0
12323
12324 ;
12325 return 0;
12326}
12327_ACEOF
12328rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012329if { (ac_try="$ac_compile"
12330case "(($ac_try" in
12331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12332 *) ac_try_echo=$ac_try;;
12333esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012335 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012336 ac_status=$?
12337 grep -v '^ *+' conftest.er1 >conftest.err
12338 rm -f conftest.er1
12339 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012341 (exit $ac_status); } && {
12342 test -z "$ac_c_werror_flag" ||
12343 test ! -s conftest.err
12344 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012345 ac_lo=$ac_mid; break
12346else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012347 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012348sed 's/^/| /' conftest.$ac_ext >&5
12349
Martin v. Löwiseba40652007-08-30 20:10:57 +000012350 ac_hi=`expr '(' $ac_mid ')' - 1`
12351 if test $ac_mid -le $ac_hi; then
12352 ac_lo= ac_hi=
12353 break
12354 fi
12355 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012357
12358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012359 done
12360else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012361 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012362sed 's/^/| /' conftest.$ac_ext >&5
12363
Martin v. Löwiseba40652007-08-30 20:10:57 +000012364 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012365fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012366
12367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012368fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012369
12370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012371# Binary search between lo and hi bounds.
12372while test "x$ac_lo" != "x$ac_hi"; do
12373 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12374 cat >conftest.$ac_ext <<_ACEOF
12375/* confdefs.h. */
12376_ACEOF
12377cat confdefs.h >>conftest.$ac_ext
12378cat >>conftest.$ac_ext <<_ACEOF
12379/* end confdefs.h. */
12380$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012381 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012382int
12383main ()
12384{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012385static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012386test_array [0] = 0
12387
12388 ;
12389 return 0;
12390}
12391_ACEOF
12392rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012393if { (ac_try="$ac_compile"
12394case "(($ac_try" in
12395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12396 *) ac_try_echo=$ac_try;;
12397esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012399 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012400 ac_status=$?
12401 grep -v '^ *+' conftest.er1 >conftest.err
12402 rm -f conftest.er1
12403 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012405 (exit $ac_status); } && {
12406 test -z "$ac_c_werror_flag" ||
12407 test ! -s conftest.err
12408 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012409 ac_hi=$ac_mid
12410else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012411 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012412sed 's/^/| /' conftest.$ac_ext >&5
12413
Martin v. Löwiseba40652007-08-30 20:10:57 +000012414 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012415fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012416
12417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012418done
12419case $ac_lo in
12420?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012421'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012422 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012423See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012424echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012425See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012426 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012427 else
12428 ac_cv_sizeof__Bool=0
12429 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012430esac
12431else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012432 cat >conftest.$ac_ext <<_ACEOF
12433/* confdefs.h. */
12434_ACEOF
12435cat confdefs.h >>conftest.$ac_ext
12436cat >>conftest.$ac_ext <<_ACEOF
12437/* end confdefs.h. */
12438$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012439 typedef _Bool ac__type_sizeof_;
12440static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12441static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012442#include <stdio.h>
12443#include <stdlib.h>
12444int
12445main ()
12446{
12447
12448 FILE *f = fopen ("conftest.val", "w");
12449 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012450 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012451 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012452 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012453 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012454 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012455 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012456 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012457 }
12458 else
12459 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012460 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012461 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012462 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012463 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012464 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012465 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012466
12467 ;
12468 return 0;
12469}
12470_ACEOF
12471rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012472if { (ac_try="$ac_link"
12473case "(($ac_try" in
12474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12475 *) ac_try_echo=$ac_try;;
12476esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012478 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012479 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012481 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012482 { (case "(($ac_try" in
12483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12484 *) ac_try_echo=$ac_try;;
12485esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012487 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012488 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012490 (exit $ac_status); }; }; then
12491 ac_cv_sizeof__Bool=`cat conftest.val`
12492else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012493 echo "$as_me: program exited with status $ac_status" >&5
12494echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012495sed 's/^/| /' conftest.$ac_ext >&5
12496
12497( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012498if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012499 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012500See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012501echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012502See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012503 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012504 else
12505 ac_cv_sizeof__Bool=0
12506 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012507fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012508rm -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 +000012509fi
12510rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012511fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012512{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12513echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012514
12515
12516
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012517cat >>confdefs.h <<_ACEOF
12518#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12519_ACEOF
12520
12521
12522fi
12523
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012524{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12525echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012526if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012527 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012528else
12529 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012530/* confdefs.h. */
12531_ACEOF
12532cat confdefs.h >>conftest.$ac_ext
12533cat >>conftest.$ac_ext <<_ACEOF
12534/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012535#ifdef HAVE_STDINT_H
12536 #include <stdint.h>
12537 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012538
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012539typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012540int
12541main ()
12542{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012543if ((ac__type_new_ *) 0)
12544 return 0;
12545if (sizeof (ac__type_new_))
12546 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012547 ;
12548 return 0;
12549}
12550_ACEOF
12551rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012552if { (ac_try="$ac_compile"
12553case "(($ac_try" in
12554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12555 *) ac_try_echo=$ac_try;;
12556esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012558 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012559 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012560 grep -v '^ *+' conftest.er1 >conftest.err
12561 rm -f conftest.er1
12562 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012564 (exit $ac_status); } && {
12565 test -z "$ac_c_werror_flag" ||
12566 test ! -s conftest.err
12567 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012568 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012569else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012570 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012571sed 's/^/| /' conftest.$ac_ext >&5
12572
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012573 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012575
12576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012577fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012578{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12579echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12580if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012581
12582cat >>confdefs.h <<_ACEOF
12583#define HAVE_UINTPTR_T 1
12584_ACEOF
12585
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012586{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12587echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12588if test "${ac_cv_type_uintptr_t+set}" = set; then
12589 echo $ECHO_N "(cached) $ECHO_C" >&6
12590else
12591 cat >conftest.$ac_ext <<_ACEOF
12592/* confdefs.h. */
12593_ACEOF
12594cat confdefs.h >>conftest.$ac_ext
12595cat >>conftest.$ac_ext <<_ACEOF
12596/* end confdefs.h. */
12597$ac_includes_default
12598typedef uintptr_t ac__type_new_;
12599int
12600main ()
12601{
12602if ((ac__type_new_ *) 0)
12603 return 0;
12604if (sizeof (ac__type_new_))
12605 return 0;
12606 ;
12607 return 0;
12608}
12609_ACEOF
12610rm -f conftest.$ac_objext
12611if { (ac_try="$ac_compile"
12612case "(($ac_try" in
12613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12614 *) ac_try_echo=$ac_try;;
12615esac
12616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12617 (eval "$ac_compile") 2>conftest.er1
12618 ac_status=$?
12619 grep -v '^ *+' conftest.er1 >conftest.err
12620 rm -f conftest.er1
12621 cat conftest.err >&5
12622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12623 (exit $ac_status); } && {
12624 test -z "$ac_c_werror_flag" ||
12625 test ! -s conftest.err
12626 } && test -s conftest.$ac_objext; then
12627 ac_cv_type_uintptr_t=yes
12628else
12629 echo "$as_me: failed program was:" >&5
12630sed 's/^/| /' conftest.$ac_ext >&5
12631
12632 ac_cv_type_uintptr_t=no
12633fi
12634
12635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12636fi
12637{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12638echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12639
Martin v. Löwiseba40652007-08-30 20:10:57 +000012640# The cast to long int works around a bug in the HP C Compiler
12641# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12642# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12643# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012644{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12645echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012646if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012647 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012648else
Martin v. Löwis11437992002-04-12 09:54:03 +000012649 if test "$cross_compiling" = yes; then
12650 # Depending upon the size, compute the lo and hi bounds.
12651cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012652/* confdefs.h. */
12653_ACEOF
12654cat confdefs.h >>conftest.$ac_ext
12655cat >>conftest.$ac_ext <<_ACEOF
12656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012657$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012658 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012659int
12660main ()
12661{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012662static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012663test_array [0] = 0
12664
12665 ;
12666 return 0;
12667}
12668_ACEOF
12669rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012670if { (ac_try="$ac_compile"
12671case "(($ac_try" in
12672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12673 *) ac_try_echo=$ac_try;;
12674esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012676 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012678 grep -v '^ *+' conftest.er1 >conftest.err
12679 rm -f conftest.er1
12680 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012682 (exit $ac_status); } && {
12683 test -z "$ac_c_werror_flag" ||
12684 test ! -s conftest.err
12685 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012686 ac_lo=0 ac_mid=0
12687 while :; do
12688 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012689/* confdefs.h. */
12690_ACEOF
12691cat confdefs.h >>conftest.$ac_ext
12692cat >>conftest.$ac_ext <<_ACEOF
12693/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012694$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012695 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012696int
12697main ()
12698{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012699static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012700test_array [0] = 0
12701
12702 ;
12703 return 0;
12704}
12705_ACEOF
12706rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012707if { (ac_try="$ac_compile"
12708case "(($ac_try" in
12709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12710 *) ac_try_echo=$ac_try;;
12711esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012713 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012714 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012715 grep -v '^ *+' conftest.er1 >conftest.err
12716 rm -f conftest.er1
12717 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012719 (exit $ac_status); } && {
12720 test -z "$ac_c_werror_flag" ||
12721 test ! -s conftest.err
12722 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012723 ac_hi=$ac_mid; break
12724else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012726sed 's/^/| /' conftest.$ac_ext >&5
12727
Martin v. Löwiseba40652007-08-30 20:10:57 +000012728 ac_lo=`expr $ac_mid + 1`
12729 if test $ac_lo -le $ac_mid; then
12730 ac_lo= ac_hi=
12731 break
12732 fi
12733 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012735
12736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012737 done
12738else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012740sed 's/^/| /' conftest.$ac_ext >&5
12741
Martin v. Löwiseba40652007-08-30 20:10:57 +000012742 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012743/* confdefs.h. */
12744_ACEOF
12745cat confdefs.h >>conftest.$ac_ext
12746cat >>conftest.$ac_ext <<_ACEOF
12747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012748$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012749 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012750int
12751main ()
12752{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012753static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012754test_array [0] = 0
12755
12756 ;
12757 return 0;
12758}
12759_ACEOF
12760rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012761if { (ac_try="$ac_compile"
12762case "(($ac_try" in
12763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12764 *) ac_try_echo=$ac_try;;
12765esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012767 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012769 grep -v '^ *+' conftest.er1 >conftest.err
12770 rm -f conftest.er1
12771 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012773 (exit $ac_status); } && {
12774 test -z "$ac_c_werror_flag" ||
12775 test ! -s conftest.err
12776 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012777 ac_hi=-1 ac_mid=-1
12778 while :; do
12779 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012780/* confdefs.h. */
12781_ACEOF
12782cat confdefs.h >>conftest.$ac_ext
12783cat >>conftest.$ac_ext <<_ACEOF
12784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012785$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012786 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012787int
12788main ()
12789{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012790static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012791test_array [0] = 0
12792
12793 ;
12794 return 0;
12795}
12796_ACEOF
12797rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012798if { (ac_try="$ac_compile"
12799case "(($ac_try" in
12800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12801 *) ac_try_echo=$ac_try;;
12802esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012804 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012806 grep -v '^ *+' conftest.er1 >conftest.err
12807 rm -f conftest.er1
12808 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012810 (exit $ac_status); } && {
12811 test -z "$ac_c_werror_flag" ||
12812 test ! -s conftest.err
12813 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012814 ac_lo=$ac_mid; break
12815else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012817sed 's/^/| /' conftest.$ac_ext >&5
12818
Martin v. Löwiseba40652007-08-30 20:10:57 +000012819 ac_hi=`expr '(' $ac_mid ')' - 1`
12820 if test $ac_mid -le $ac_hi; then
12821 ac_lo= ac_hi=
12822 break
12823 fi
12824 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012826
12827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012828 done
12829else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012831sed 's/^/| /' conftest.$ac_ext >&5
12832
Martin v. Löwiseba40652007-08-30 20:10:57 +000012833 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012835
12836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012837fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012838
12839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012840# Binary search between lo and hi bounds.
12841while test "x$ac_lo" != "x$ac_hi"; do
12842 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12843 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012844/* confdefs.h. */
12845_ACEOF
12846cat confdefs.h >>conftest.$ac_ext
12847cat >>conftest.$ac_ext <<_ACEOF
12848/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012849$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012850 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012851int
12852main ()
12853{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012854static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012855test_array [0] = 0
12856
12857 ;
12858 return 0;
12859}
12860_ACEOF
12861rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012862if { (ac_try="$ac_compile"
12863case "(($ac_try" in
12864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12865 *) ac_try_echo=$ac_try;;
12866esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012868 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012870 grep -v '^ *+' conftest.er1 >conftest.err
12871 rm -f conftest.er1
12872 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012874 (exit $ac_status); } && {
12875 test -z "$ac_c_werror_flag" ||
12876 test ! -s conftest.err
12877 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012878 ac_hi=$ac_mid
12879else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012881sed 's/^/| /' conftest.$ac_ext >&5
12882
Martin v. Löwiseba40652007-08-30 20:10:57 +000012883 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012885
12886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012887done
12888case $ac_lo in
12889?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012890'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012891 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012892See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012893echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012894See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012895 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012896 else
12897 ac_cv_sizeof_uintptr_t=0
12898 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012899esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012900else
Martin v. Löwis11437992002-04-12 09:54:03 +000012901 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012902/* confdefs.h. */
12903_ACEOF
12904cat confdefs.h >>conftest.$ac_ext
12905cat >>conftest.$ac_ext <<_ACEOF
12906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012907$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012908 typedef uintptr_t ac__type_sizeof_;
12909static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12910static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012911#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012912#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012913int
12914main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012915{
Martin v. Löwis11437992002-04-12 09:54:03 +000012916
12917 FILE *f = fopen ("conftest.val", "w");
12918 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012919 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012920 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012921 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012922 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012923 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012924 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012925 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012926 }
12927 else
12928 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012929 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012930 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012931 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012932 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012933 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012934 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012935
12936 ;
12937 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012938}
Martin v. Löwis11437992002-04-12 09:54:03 +000012939_ACEOF
12940rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012941if { (ac_try="$ac_link"
12942case "(($ac_try" in
12943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12944 *) ac_try_echo=$ac_try;;
12945esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012947 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012948 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012950 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012951 { (case "(($ac_try" in
12952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12953 *) ac_try_echo=$ac_try;;
12954esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012956 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012957 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012959 (exit $ac_status); }; }; then
12960 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012961else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012962 echo "$as_me: program exited with status $ac_status" >&5
12963echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012964sed 's/^/| /' conftest.$ac_ext >&5
12965
Martin v. Löwis11437992002-04-12 09:54:03 +000012966( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012967if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012968 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012969See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012970echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012971See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012972 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012973 else
12974 ac_cv_sizeof_uintptr_t=0
12975 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012977rm -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 +000012978fi
12979rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012980fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012981{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12982echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012983
12984
12985
Martin v. Löwis11437992002-04-12 09:54:03 +000012986cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012987#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012988_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012989
Michael W. Hudson54241132001-12-07 15:38:26 +000012990
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012991fi
12992
Martin v. Löwisebe26702006-10-02 14:55:51 +000012993
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000012994{ echo "$as_me:$LINENO: checking for off_t" >&5
12995echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
12996if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012997 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012998else
Martin v. Löwis11437992002-04-12 09:54:03 +000012999 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013000/* confdefs.h. */
13001_ACEOF
13002cat confdefs.h >>conftest.$ac_ext
13003cat >>conftest.$ac_ext <<_ACEOF
13004/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013005
13006#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013007#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013008#endif
13009
13010
13011typedef off_t ac__type_new_;
13012int
13013main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013014{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013015if ((ac__type_new_ *) 0)
13016 return 0;
13017if (sizeof (ac__type_new_))
13018 return 0;
13019 ;
13020 return 0;
13021}
13022_ACEOF
13023rm -f conftest.$ac_objext
13024if { (ac_try="$ac_compile"
13025case "(($ac_try" in
13026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13027 *) ac_try_echo=$ac_try;;
13028esac
13029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13030 (eval "$ac_compile") 2>conftest.er1
13031 ac_status=$?
13032 grep -v '^ *+' conftest.er1 >conftest.err
13033 rm -f conftest.er1
13034 cat conftest.err >&5
13035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13036 (exit $ac_status); } && {
13037 test -z "$ac_c_werror_flag" ||
13038 test ! -s conftest.err
13039 } && test -s conftest.$ac_objext; then
13040 ac_cv_type_off_t=yes
13041else
13042 echo "$as_me: failed program was:" >&5
13043sed 's/^/| /' conftest.$ac_ext >&5
13044
13045 ac_cv_type_off_t=no
13046fi
13047
13048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13049fi
13050{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13051echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13052
13053# The cast to long int works around a bug in the HP C Compiler
13054# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13055# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13056# This bug is HP SR number 8606223364.
13057{ echo "$as_me:$LINENO: checking size of off_t" >&5
13058echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13059if test "${ac_cv_sizeof_off_t+set}" = set; then
13060 echo $ECHO_N "(cached) $ECHO_C" >&6
13061else
13062 if test "$cross_compiling" = yes; then
13063 # Depending upon the size, compute the lo and hi bounds.
13064cat >conftest.$ac_ext <<_ACEOF
13065/* confdefs.h. */
13066_ACEOF
13067cat confdefs.h >>conftest.$ac_ext
13068cat >>conftest.$ac_ext <<_ACEOF
13069/* end confdefs.h. */
13070
13071#ifdef HAVE_SYS_TYPES_H
13072#include <sys/types.h>
13073#endif
13074
13075
13076 typedef off_t ac__type_sizeof_;
13077int
13078main ()
13079{
13080static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13081test_array [0] = 0
13082
13083 ;
13084 return 0;
13085}
13086_ACEOF
13087rm -f conftest.$ac_objext
13088if { (ac_try="$ac_compile"
13089case "(($ac_try" in
13090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13091 *) ac_try_echo=$ac_try;;
13092esac
13093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13094 (eval "$ac_compile") 2>conftest.er1
13095 ac_status=$?
13096 grep -v '^ *+' conftest.er1 >conftest.err
13097 rm -f conftest.er1
13098 cat conftest.err >&5
13099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13100 (exit $ac_status); } && {
13101 test -z "$ac_c_werror_flag" ||
13102 test ! -s conftest.err
13103 } && test -s conftest.$ac_objext; then
13104 ac_lo=0 ac_mid=0
13105 while :; do
13106 cat >conftest.$ac_ext <<_ACEOF
13107/* confdefs.h. */
13108_ACEOF
13109cat confdefs.h >>conftest.$ac_ext
13110cat >>conftest.$ac_ext <<_ACEOF
13111/* end confdefs.h. */
13112
13113#ifdef HAVE_SYS_TYPES_H
13114#include <sys/types.h>
13115#endif
13116
13117
13118 typedef off_t ac__type_sizeof_;
13119int
13120main ()
13121{
13122static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13123test_array [0] = 0
13124
13125 ;
13126 return 0;
13127}
13128_ACEOF
13129rm -f conftest.$ac_objext
13130if { (ac_try="$ac_compile"
13131case "(($ac_try" in
13132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13133 *) ac_try_echo=$ac_try;;
13134esac
13135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13136 (eval "$ac_compile") 2>conftest.er1
13137 ac_status=$?
13138 grep -v '^ *+' conftest.er1 >conftest.err
13139 rm -f conftest.er1
13140 cat conftest.err >&5
13141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13142 (exit $ac_status); } && {
13143 test -z "$ac_c_werror_flag" ||
13144 test ! -s conftest.err
13145 } && test -s conftest.$ac_objext; then
13146 ac_hi=$ac_mid; break
13147else
13148 echo "$as_me: failed program was:" >&5
13149sed 's/^/| /' conftest.$ac_ext >&5
13150
13151 ac_lo=`expr $ac_mid + 1`
13152 if test $ac_lo -le $ac_mid; then
13153 ac_lo= ac_hi=
13154 break
13155 fi
13156 ac_mid=`expr 2 '*' $ac_mid + 1`
13157fi
13158
13159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13160 done
13161else
13162 echo "$as_me: failed program was:" >&5
13163sed 's/^/| /' conftest.$ac_ext >&5
13164
13165 cat >conftest.$ac_ext <<_ACEOF
13166/* confdefs.h. */
13167_ACEOF
13168cat confdefs.h >>conftest.$ac_ext
13169cat >>conftest.$ac_ext <<_ACEOF
13170/* end confdefs.h. */
13171
13172#ifdef HAVE_SYS_TYPES_H
13173#include <sys/types.h>
13174#endif
13175
13176
13177 typedef off_t ac__type_sizeof_;
13178int
13179main ()
13180{
13181static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13182test_array [0] = 0
13183
13184 ;
13185 return 0;
13186}
13187_ACEOF
13188rm -f conftest.$ac_objext
13189if { (ac_try="$ac_compile"
13190case "(($ac_try" in
13191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13192 *) ac_try_echo=$ac_try;;
13193esac
13194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13195 (eval "$ac_compile") 2>conftest.er1
13196 ac_status=$?
13197 grep -v '^ *+' conftest.er1 >conftest.err
13198 rm -f conftest.er1
13199 cat conftest.err >&5
13200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13201 (exit $ac_status); } && {
13202 test -z "$ac_c_werror_flag" ||
13203 test ! -s conftest.err
13204 } && test -s conftest.$ac_objext; then
13205 ac_hi=-1 ac_mid=-1
13206 while :; do
13207 cat >conftest.$ac_ext <<_ACEOF
13208/* confdefs.h. */
13209_ACEOF
13210cat confdefs.h >>conftest.$ac_ext
13211cat >>conftest.$ac_ext <<_ACEOF
13212/* end confdefs.h. */
13213
13214#ifdef HAVE_SYS_TYPES_H
13215#include <sys/types.h>
13216#endif
13217
13218
13219 typedef off_t ac__type_sizeof_;
13220int
13221main ()
13222{
13223static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13224test_array [0] = 0
13225
13226 ;
13227 return 0;
13228}
13229_ACEOF
13230rm -f conftest.$ac_objext
13231if { (ac_try="$ac_compile"
13232case "(($ac_try" in
13233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13234 *) ac_try_echo=$ac_try;;
13235esac
13236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13237 (eval "$ac_compile") 2>conftest.er1
13238 ac_status=$?
13239 grep -v '^ *+' conftest.er1 >conftest.err
13240 rm -f conftest.er1
13241 cat conftest.err >&5
13242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13243 (exit $ac_status); } && {
13244 test -z "$ac_c_werror_flag" ||
13245 test ! -s conftest.err
13246 } && test -s conftest.$ac_objext; then
13247 ac_lo=$ac_mid; break
13248else
13249 echo "$as_me: failed program was:" >&5
13250sed 's/^/| /' conftest.$ac_ext >&5
13251
13252 ac_hi=`expr '(' $ac_mid ')' - 1`
13253 if test $ac_mid -le $ac_hi; then
13254 ac_lo= ac_hi=
13255 break
13256 fi
13257 ac_mid=`expr 2 '*' $ac_mid`
13258fi
13259
13260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13261 done
13262else
13263 echo "$as_me: failed program was:" >&5
13264sed 's/^/| /' conftest.$ac_ext >&5
13265
13266 ac_lo= ac_hi=
13267fi
13268
13269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13270fi
13271
13272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13273# Binary search between lo and hi bounds.
13274while test "x$ac_lo" != "x$ac_hi"; do
13275 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13276 cat >conftest.$ac_ext <<_ACEOF
13277/* confdefs.h. */
13278_ACEOF
13279cat confdefs.h >>conftest.$ac_ext
13280cat >>conftest.$ac_ext <<_ACEOF
13281/* end confdefs.h. */
13282
13283#ifdef HAVE_SYS_TYPES_H
13284#include <sys/types.h>
13285#endif
13286
13287
13288 typedef off_t ac__type_sizeof_;
13289int
13290main ()
13291{
13292static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13293test_array [0] = 0
13294
13295 ;
13296 return 0;
13297}
13298_ACEOF
13299rm -f conftest.$ac_objext
13300if { (ac_try="$ac_compile"
13301case "(($ac_try" in
13302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13303 *) ac_try_echo=$ac_try;;
13304esac
13305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13306 (eval "$ac_compile") 2>conftest.er1
13307 ac_status=$?
13308 grep -v '^ *+' conftest.er1 >conftest.err
13309 rm -f conftest.er1
13310 cat conftest.err >&5
13311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13312 (exit $ac_status); } && {
13313 test -z "$ac_c_werror_flag" ||
13314 test ! -s conftest.err
13315 } && test -s conftest.$ac_objext; then
13316 ac_hi=$ac_mid
13317else
13318 echo "$as_me: failed program was:" >&5
13319sed 's/^/| /' conftest.$ac_ext >&5
13320
13321 ac_lo=`expr '(' $ac_mid ')' + 1`
13322fi
13323
13324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13325done
13326case $ac_lo in
13327?*) ac_cv_sizeof_off_t=$ac_lo;;
13328'') if test "$ac_cv_type_off_t" = yes; then
13329 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13330See \`config.log' for more details." >&5
13331echo "$as_me: error: cannot compute sizeof (off_t)
13332See \`config.log' for more details." >&2;}
13333 { (exit 77); exit 77; }; }
13334 else
13335 ac_cv_sizeof_off_t=0
13336 fi ;;
13337esac
13338else
13339 cat >conftest.$ac_ext <<_ACEOF
13340/* confdefs.h. */
13341_ACEOF
13342cat confdefs.h >>conftest.$ac_ext
13343cat >>conftest.$ac_ext <<_ACEOF
13344/* end confdefs.h. */
13345
13346#ifdef HAVE_SYS_TYPES_H
13347#include <sys/types.h>
13348#endif
13349
13350
13351 typedef off_t ac__type_sizeof_;
13352static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13353static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13354#include <stdio.h>
13355#include <stdlib.h>
13356int
13357main ()
13358{
13359
13360 FILE *f = fopen ("conftest.val", "w");
13361 if (! f)
13362 return 1;
13363 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13364 {
13365 long int i = longval ();
13366 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13367 return 1;
13368 fprintf (f, "%ld\n", i);
13369 }
13370 else
13371 {
13372 unsigned long int i = ulongval ();
13373 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13374 return 1;
13375 fprintf (f, "%lu\n", i);
13376 }
13377 return ferror (f) || fclose (f) != 0;
13378
13379 ;
13380 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013381}
Martin v. Löwis11437992002-04-12 09:54:03 +000013382_ACEOF
13383rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013384if { (ac_try="$ac_link"
13385case "(($ac_try" in
13386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13387 *) ac_try_echo=$ac_try;;
13388esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013390 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013391 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013393 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013394 { (case "(($ac_try" in
13395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13396 *) ac_try_echo=$ac_try;;
13397esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013399 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013400 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013402 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013403 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013404else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013405 echo "$as_me: program exited with status $ac_status" >&5
13406echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013407sed 's/^/| /' conftest.$ac_ext >&5
13408
Martin v. Löwis11437992002-04-12 09:54:03 +000013409( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013410if test "$ac_cv_type_off_t" = yes; then
13411 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13412See \`config.log' for more details." >&5
13413echo "$as_me: error: cannot compute sizeof (off_t)
13414See \`config.log' for more details." >&2;}
13415 { (exit 77); exit 77; }; }
13416 else
13417 ac_cv_sizeof_off_t=0
13418 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013420rm -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 +000013421fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013422rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013423fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013424{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13425echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013426
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013427
13428
Martin v. Löwis11437992002-04-12 09:54:03 +000013429cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013430#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013431_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013432
Michael W. Hudson54241132001-12-07 15:38:26 +000013433
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013434
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013435{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13436echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013437if test "$have_long_long" = yes -a \
13438 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13439 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013440
Martin v. Löwis11437992002-04-12 09:54:03 +000013441cat >>confdefs.h <<\_ACEOF
13442#define HAVE_LARGEFILE_SUPPORT 1
13443_ACEOF
13444
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013445 { echo "$as_me:$LINENO: result: yes" >&5
13446echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013447else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013448 { echo "$as_me:$LINENO: result: no" >&5
13449echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013450fi
13451
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013452{ echo "$as_me:$LINENO: checking for time_t" >&5
13453echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13454if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013455 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013456else
Martin v. Löwis11437992002-04-12 09:54:03 +000013457 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013458/* confdefs.h. */
13459_ACEOF
13460cat confdefs.h >>conftest.$ac_ext
13461cat >>conftest.$ac_ext <<_ACEOF
13462/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013463
13464#ifdef HAVE_SYS_TYPES_H
13465#include <sys/types.h>
13466#endif
13467#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013468#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013469#endif
13470
13471
13472typedef time_t ac__type_new_;
13473int
13474main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013475{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013476if ((ac__type_new_ *) 0)
13477 return 0;
13478if (sizeof (ac__type_new_))
13479 return 0;
13480 ;
13481 return 0;
13482}
13483_ACEOF
13484rm -f conftest.$ac_objext
13485if { (ac_try="$ac_compile"
13486case "(($ac_try" in
13487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13488 *) ac_try_echo=$ac_try;;
13489esac
13490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13491 (eval "$ac_compile") 2>conftest.er1
13492 ac_status=$?
13493 grep -v '^ *+' conftest.er1 >conftest.err
13494 rm -f conftest.er1
13495 cat conftest.err >&5
13496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13497 (exit $ac_status); } && {
13498 test -z "$ac_c_werror_flag" ||
13499 test ! -s conftest.err
13500 } && test -s conftest.$ac_objext; then
13501 ac_cv_type_time_t=yes
13502else
13503 echo "$as_me: failed program was:" >&5
13504sed 's/^/| /' conftest.$ac_ext >&5
13505
13506 ac_cv_type_time_t=no
13507fi
13508
13509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13510fi
13511{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13512echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13513
13514# The cast to long int works around a bug in the HP C Compiler
13515# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13516# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13517# This bug is HP SR number 8606223364.
13518{ echo "$as_me:$LINENO: checking size of time_t" >&5
13519echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13520if test "${ac_cv_sizeof_time_t+set}" = set; then
13521 echo $ECHO_N "(cached) $ECHO_C" >&6
13522else
13523 if test "$cross_compiling" = yes; then
13524 # Depending upon the size, compute the lo and hi bounds.
13525cat >conftest.$ac_ext <<_ACEOF
13526/* confdefs.h. */
13527_ACEOF
13528cat confdefs.h >>conftest.$ac_ext
13529cat >>conftest.$ac_ext <<_ACEOF
13530/* end confdefs.h. */
13531
13532#ifdef HAVE_SYS_TYPES_H
13533#include <sys/types.h>
13534#endif
13535#ifdef HAVE_TIME_H
13536#include <time.h>
13537#endif
13538
13539
13540 typedef time_t ac__type_sizeof_;
13541int
13542main ()
13543{
13544static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13545test_array [0] = 0
13546
13547 ;
13548 return 0;
13549}
13550_ACEOF
13551rm -f conftest.$ac_objext
13552if { (ac_try="$ac_compile"
13553case "(($ac_try" in
13554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13555 *) ac_try_echo=$ac_try;;
13556esac
13557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13558 (eval "$ac_compile") 2>conftest.er1
13559 ac_status=$?
13560 grep -v '^ *+' conftest.er1 >conftest.err
13561 rm -f conftest.er1
13562 cat conftest.err >&5
13563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13564 (exit $ac_status); } && {
13565 test -z "$ac_c_werror_flag" ||
13566 test ! -s conftest.err
13567 } && test -s conftest.$ac_objext; then
13568 ac_lo=0 ac_mid=0
13569 while :; do
13570 cat >conftest.$ac_ext <<_ACEOF
13571/* confdefs.h. */
13572_ACEOF
13573cat confdefs.h >>conftest.$ac_ext
13574cat >>conftest.$ac_ext <<_ACEOF
13575/* end confdefs.h. */
13576
13577#ifdef HAVE_SYS_TYPES_H
13578#include <sys/types.h>
13579#endif
13580#ifdef HAVE_TIME_H
13581#include <time.h>
13582#endif
13583
13584
13585 typedef time_t ac__type_sizeof_;
13586int
13587main ()
13588{
13589static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13590test_array [0] = 0
13591
13592 ;
13593 return 0;
13594}
13595_ACEOF
13596rm -f conftest.$ac_objext
13597if { (ac_try="$ac_compile"
13598case "(($ac_try" in
13599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13600 *) ac_try_echo=$ac_try;;
13601esac
13602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13603 (eval "$ac_compile") 2>conftest.er1
13604 ac_status=$?
13605 grep -v '^ *+' conftest.er1 >conftest.err
13606 rm -f conftest.er1
13607 cat conftest.err >&5
13608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13609 (exit $ac_status); } && {
13610 test -z "$ac_c_werror_flag" ||
13611 test ! -s conftest.err
13612 } && test -s conftest.$ac_objext; then
13613 ac_hi=$ac_mid; break
13614else
13615 echo "$as_me: failed program was:" >&5
13616sed 's/^/| /' conftest.$ac_ext >&5
13617
13618 ac_lo=`expr $ac_mid + 1`
13619 if test $ac_lo -le $ac_mid; then
13620 ac_lo= ac_hi=
13621 break
13622 fi
13623 ac_mid=`expr 2 '*' $ac_mid + 1`
13624fi
13625
13626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13627 done
13628else
13629 echo "$as_me: failed program was:" >&5
13630sed 's/^/| /' conftest.$ac_ext >&5
13631
13632 cat >conftest.$ac_ext <<_ACEOF
13633/* confdefs.h. */
13634_ACEOF
13635cat confdefs.h >>conftest.$ac_ext
13636cat >>conftest.$ac_ext <<_ACEOF
13637/* end confdefs.h. */
13638
13639#ifdef HAVE_SYS_TYPES_H
13640#include <sys/types.h>
13641#endif
13642#ifdef HAVE_TIME_H
13643#include <time.h>
13644#endif
13645
13646
13647 typedef time_t ac__type_sizeof_;
13648int
13649main ()
13650{
13651static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13652test_array [0] = 0
13653
13654 ;
13655 return 0;
13656}
13657_ACEOF
13658rm -f conftest.$ac_objext
13659if { (ac_try="$ac_compile"
13660case "(($ac_try" in
13661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13662 *) ac_try_echo=$ac_try;;
13663esac
13664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13665 (eval "$ac_compile") 2>conftest.er1
13666 ac_status=$?
13667 grep -v '^ *+' conftest.er1 >conftest.err
13668 rm -f conftest.er1
13669 cat conftest.err >&5
13670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13671 (exit $ac_status); } && {
13672 test -z "$ac_c_werror_flag" ||
13673 test ! -s conftest.err
13674 } && test -s conftest.$ac_objext; then
13675 ac_hi=-1 ac_mid=-1
13676 while :; do
13677 cat >conftest.$ac_ext <<_ACEOF
13678/* confdefs.h. */
13679_ACEOF
13680cat confdefs.h >>conftest.$ac_ext
13681cat >>conftest.$ac_ext <<_ACEOF
13682/* end confdefs.h. */
13683
13684#ifdef HAVE_SYS_TYPES_H
13685#include <sys/types.h>
13686#endif
13687#ifdef HAVE_TIME_H
13688#include <time.h>
13689#endif
13690
13691
13692 typedef time_t ac__type_sizeof_;
13693int
13694main ()
13695{
13696static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13697test_array [0] = 0
13698
13699 ;
13700 return 0;
13701}
13702_ACEOF
13703rm -f conftest.$ac_objext
13704if { (ac_try="$ac_compile"
13705case "(($ac_try" in
13706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13707 *) ac_try_echo=$ac_try;;
13708esac
13709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13710 (eval "$ac_compile") 2>conftest.er1
13711 ac_status=$?
13712 grep -v '^ *+' conftest.er1 >conftest.err
13713 rm -f conftest.er1
13714 cat conftest.err >&5
13715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13716 (exit $ac_status); } && {
13717 test -z "$ac_c_werror_flag" ||
13718 test ! -s conftest.err
13719 } && test -s conftest.$ac_objext; then
13720 ac_lo=$ac_mid; break
13721else
13722 echo "$as_me: failed program was:" >&5
13723sed 's/^/| /' conftest.$ac_ext >&5
13724
13725 ac_hi=`expr '(' $ac_mid ')' - 1`
13726 if test $ac_mid -le $ac_hi; then
13727 ac_lo= ac_hi=
13728 break
13729 fi
13730 ac_mid=`expr 2 '*' $ac_mid`
13731fi
13732
13733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13734 done
13735else
13736 echo "$as_me: failed program was:" >&5
13737sed 's/^/| /' conftest.$ac_ext >&5
13738
13739 ac_lo= ac_hi=
13740fi
13741
13742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13743fi
13744
13745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13746# Binary search between lo and hi bounds.
13747while test "x$ac_lo" != "x$ac_hi"; do
13748 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13749 cat >conftest.$ac_ext <<_ACEOF
13750/* confdefs.h. */
13751_ACEOF
13752cat confdefs.h >>conftest.$ac_ext
13753cat >>conftest.$ac_ext <<_ACEOF
13754/* end confdefs.h. */
13755
13756#ifdef HAVE_SYS_TYPES_H
13757#include <sys/types.h>
13758#endif
13759#ifdef HAVE_TIME_H
13760#include <time.h>
13761#endif
13762
13763
13764 typedef time_t ac__type_sizeof_;
13765int
13766main ()
13767{
13768static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13769test_array [0] = 0
13770
13771 ;
13772 return 0;
13773}
13774_ACEOF
13775rm -f conftest.$ac_objext
13776if { (ac_try="$ac_compile"
13777case "(($ac_try" in
13778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13779 *) ac_try_echo=$ac_try;;
13780esac
13781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13782 (eval "$ac_compile") 2>conftest.er1
13783 ac_status=$?
13784 grep -v '^ *+' conftest.er1 >conftest.err
13785 rm -f conftest.er1
13786 cat conftest.err >&5
13787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13788 (exit $ac_status); } && {
13789 test -z "$ac_c_werror_flag" ||
13790 test ! -s conftest.err
13791 } && test -s conftest.$ac_objext; then
13792 ac_hi=$ac_mid
13793else
13794 echo "$as_me: failed program was:" >&5
13795sed 's/^/| /' conftest.$ac_ext >&5
13796
13797 ac_lo=`expr '(' $ac_mid ')' + 1`
13798fi
13799
13800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13801done
13802case $ac_lo in
13803?*) ac_cv_sizeof_time_t=$ac_lo;;
13804'') if test "$ac_cv_type_time_t" = yes; then
13805 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13806See \`config.log' for more details." >&5
13807echo "$as_me: error: cannot compute sizeof (time_t)
13808See \`config.log' for more details." >&2;}
13809 { (exit 77); exit 77; }; }
13810 else
13811 ac_cv_sizeof_time_t=0
13812 fi ;;
13813esac
13814else
13815 cat >conftest.$ac_ext <<_ACEOF
13816/* confdefs.h. */
13817_ACEOF
13818cat confdefs.h >>conftest.$ac_ext
13819cat >>conftest.$ac_ext <<_ACEOF
13820/* end confdefs.h. */
13821
13822#ifdef HAVE_SYS_TYPES_H
13823#include <sys/types.h>
13824#endif
13825#ifdef HAVE_TIME_H
13826#include <time.h>
13827#endif
13828
13829
13830 typedef time_t ac__type_sizeof_;
13831static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13832static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13833#include <stdio.h>
13834#include <stdlib.h>
13835int
13836main ()
13837{
13838
13839 FILE *f = fopen ("conftest.val", "w");
13840 if (! f)
13841 return 1;
13842 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13843 {
13844 long int i = longval ();
13845 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13846 return 1;
13847 fprintf (f, "%ld\n", i);
13848 }
13849 else
13850 {
13851 unsigned long int i = ulongval ();
13852 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13853 return 1;
13854 fprintf (f, "%lu\n", i);
13855 }
13856 return ferror (f) || fclose (f) != 0;
13857
13858 ;
13859 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013860}
Martin v. Löwis11437992002-04-12 09:54:03 +000013861_ACEOF
13862rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013863if { (ac_try="$ac_link"
13864case "(($ac_try" in
13865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13866 *) ac_try_echo=$ac_try;;
13867esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013869 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013870 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013872 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013873 { (case "(($ac_try" in
13874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13875 *) ac_try_echo=$ac_try;;
13876esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013878 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013879 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013881 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013882 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013883else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013884 echo "$as_me: program exited with status $ac_status" >&5
13885echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013886sed 's/^/| /' conftest.$ac_ext >&5
13887
Martin v. Löwis11437992002-04-12 09:54:03 +000013888( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013889if test "$ac_cv_type_time_t" = yes; then
13890 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13891See \`config.log' for more details." >&5
13892echo "$as_me: error: cannot compute sizeof (time_t)
13893See \`config.log' for more details." >&2;}
13894 { (exit 77); exit 77; }; }
13895 else
13896 ac_cv_sizeof_time_t=0
13897 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013898fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013899rm -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 +000013900fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013901rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013902fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013903{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13904echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013905
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013906
13907
Martin v. Löwis11437992002-04-12 09:54:03 +000013908cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013909#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013910_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013911
Michael W. Hudson54241132001-12-07 15:38:26 +000013912
13913
Trent Mick635f6fb2000-08-23 21:33:05 +000013914# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013915ac_save_cc="$CC"
13916if test "$ac_cv_kpthread" = "yes"
13917then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013918elif test "$ac_cv_kthread" = "yes"
13919then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013920elif test "$ac_cv_pthread" = "yes"
13921then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013922fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013923{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13924echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013925have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013926cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013927/* confdefs.h. */
13928_ACEOF
13929cat confdefs.h >>conftest.$ac_ext
13930cat >>conftest.$ac_ext <<_ACEOF
13931/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013932#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013933int
13934main ()
13935{
Guido van Rossum12580492000-09-24 16:47:19 +000013936pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013937 ;
13938 return 0;
13939}
13940_ACEOF
13941rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013942if { (ac_try="$ac_compile"
13943case "(($ac_try" in
13944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13945 *) ac_try_echo=$ac_try;;
13946esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013948 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013950 grep -v '^ *+' conftest.er1 >conftest.err
13951 rm -f conftest.er1
13952 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013954 (exit $ac_status); } && {
13955 test -z "$ac_c_werror_flag" ||
13956 test ! -s conftest.err
13957 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013958 have_pthread_t=yes
13959else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013961sed 's/^/| /' conftest.$ac_ext >&5
13962
Martin v. Löwiseba40652007-08-30 20:10:57 +000013963
Trent Mick635f6fb2000-08-23 21:33:05 +000013964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013965
13966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013967{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13968echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013969if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013970 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13971echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13972if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013973 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013974else
Martin v. Löwis11437992002-04-12 09:54:03 +000013975 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013976/* confdefs.h. */
13977_ACEOF
13978cat confdefs.h >>conftest.$ac_ext
13979cat >>conftest.$ac_ext <<_ACEOF
13980/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013981
13982#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013983#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013984#endif
13985
13986
13987typedef pthread_t ac__type_new_;
13988int
13989main ()
13990{
13991if ((ac__type_new_ *) 0)
13992 return 0;
13993if (sizeof (ac__type_new_))
13994 return 0;
13995 ;
13996 return 0;
13997}
13998_ACEOF
13999rm -f conftest.$ac_objext
14000if { (ac_try="$ac_compile"
14001case "(($ac_try" in
14002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14003 *) ac_try_echo=$ac_try;;
14004esac
14005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14006 (eval "$ac_compile") 2>conftest.er1
14007 ac_status=$?
14008 grep -v '^ *+' conftest.er1 >conftest.err
14009 rm -f conftest.er1
14010 cat conftest.err >&5
14011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14012 (exit $ac_status); } && {
14013 test -z "$ac_c_werror_flag" ||
14014 test ! -s conftest.err
14015 } && test -s conftest.$ac_objext; then
14016 ac_cv_type_pthread_t=yes
14017else
14018 echo "$as_me: failed program was:" >&5
14019sed 's/^/| /' conftest.$ac_ext >&5
14020
14021 ac_cv_type_pthread_t=no
14022fi
14023
14024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14025fi
14026{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14027echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14028
14029# The cast to long int works around a bug in the HP C Compiler
14030# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14031# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14032# This bug is HP SR number 8606223364.
14033{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14034echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14035if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14036 echo $ECHO_N "(cached) $ECHO_C" >&6
14037else
14038 if test "$cross_compiling" = yes; then
14039 # Depending upon the size, compute the lo and hi bounds.
14040cat >conftest.$ac_ext <<_ACEOF
14041/* confdefs.h. */
14042_ACEOF
14043cat confdefs.h >>conftest.$ac_ext
14044cat >>conftest.$ac_ext <<_ACEOF
14045/* end confdefs.h. */
14046
14047#ifdef HAVE_PTHREAD_H
14048#include <pthread.h>
14049#endif
14050
14051
14052 typedef pthread_t ac__type_sizeof_;
14053int
14054main ()
14055{
14056static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14057test_array [0] = 0
14058
14059 ;
14060 return 0;
14061}
14062_ACEOF
14063rm -f conftest.$ac_objext
14064if { (ac_try="$ac_compile"
14065case "(($ac_try" in
14066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14067 *) ac_try_echo=$ac_try;;
14068esac
14069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14070 (eval "$ac_compile") 2>conftest.er1
14071 ac_status=$?
14072 grep -v '^ *+' conftest.er1 >conftest.err
14073 rm -f conftest.er1
14074 cat conftest.err >&5
14075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14076 (exit $ac_status); } && {
14077 test -z "$ac_c_werror_flag" ||
14078 test ! -s conftest.err
14079 } && test -s conftest.$ac_objext; then
14080 ac_lo=0 ac_mid=0
14081 while :; do
14082 cat >conftest.$ac_ext <<_ACEOF
14083/* confdefs.h. */
14084_ACEOF
14085cat confdefs.h >>conftest.$ac_ext
14086cat >>conftest.$ac_ext <<_ACEOF
14087/* end confdefs.h. */
14088
14089#ifdef HAVE_PTHREAD_H
14090#include <pthread.h>
14091#endif
14092
14093
14094 typedef pthread_t ac__type_sizeof_;
14095int
14096main ()
14097{
14098static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14099test_array [0] = 0
14100
14101 ;
14102 return 0;
14103}
14104_ACEOF
14105rm -f conftest.$ac_objext
14106if { (ac_try="$ac_compile"
14107case "(($ac_try" in
14108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14109 *) ac_try_echo=$ac_try;;
14110esac
14111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14112 (eval "$ac_compile") 2>conftest.er1
14113 ac_status=$?
14114 grep -v '^ *+' conftest.er1 >conftest.err
14115 rm -f conftest.er1
14116 cat conftest.err >&5
14117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14118 (exit $ac_status); } && {
14119 test -z "$ac_c_werror_flag" ||
14120 test ! -s conftest.err
14121 } && test -s conftest.$ac_objext; then
14122 ac_hi=$ac_mid; break
14123else
14124 echo "$as_me: failed program was:" >&5
14125sed 's/^/| /' conftest.$ac_ext >&5
14126
14127 ac_lo=`expr $ac_mid + 1`
14128 if test $ac_lo -le $ac_mid; then
14129 ac_lo= ac_hi=
14130 break
14131 fi
14132 ac_mid=`expr 2 '*' $ac_mid + 1`
14133fi
14134
14135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14136 done
14137else
14138 echo "$as_me: failed program was:" >&5
14139sed 's/^/| /' conftest.$ac_ext >&5
14140
14141 cat >conftest.$ac_ext <<_ACEOF
14142/* confdefs.h. */
14143_ACEOF
14144cat confdefs.h >>conftest.$ac_ext
14145cat >>conftest.$ac_ext <<_ACEOF
14146/* end confdefs.h. */
14147
14148#ifdef HAVE_PTHREAD_H
14149#include <pthread.h>
14150#endif
14151
14152
14153 typedef pthread_t ac__type_sizeof_;
14154int
14155main ()
14156{
14157static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14158test_array [0] = 0
14159
14160 ;
14161 return 0;
14162}
14163_ACEOF
14164rm -f conftest.$ac_objext
14165if { (ac_try="$ac_compile"
14166case "(($ac_try" in
14167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14168 *) ac_try_echo=$ac_try;;
14169esac
14170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14171 (eval "$ac_compile") 2>conftest.er1
14172 ac_status=$?
14173 grep -v '^ *+' conftest.er1 >conftest.err
14174 rm -f conftest.er1
14175 cat conftest.err >&5
14176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14177 (exit $ac_status); } && {
14178 test -z "$ac_c_werror_flag" ||
14179 test ! -s conftest.err
14180 } && test -s conftest.$ac_objext; then
14181 ac_hi=-1 ac_mid=-1
14182 while :; do
14183 cat >conftest.$ac_ext <<_ACEOF
14184/* confdefs.h. */
14185_ACEOF
14186cat confdefs.h >>conftest.$ac_ext
14187cat >>conftest.$ac_ext <<_ACEOF
14188/* end confdefs.h. */
14189
14190#ifdef HAVE_PTHREAD_H
14191#include <pthread.h>
14192#endif
14193
14194
14195 typedef pthread_t ac__type_sizeof_;
14196int
14197main ()
14198{
14199static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14200test_array [0] = 0
14201
14202 ;
14203 return 0;
14204}
14205_ACEOF
14206rm -f conftest.$ac_objext
14207if { (ac_try="$ac_compile"
14208case "(($ac_try" in
14209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14210 *) ac_try_echo=$ac_try;;
14211esac
14212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14213 (eval "$ac_compile") 2>conftest.er1
14214 ac_status=$?
14215 grep -v '^ *+' conftest.er1 >conftest.err
14216 rm -f conftest.er1
14217 cat conftest.err >&5
14218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14219 (exit $ac_status); } && {
14220 test -z "$ac_c_werror_flag" ||
14221 test ! -s conftest.err
14222 } && test -s conftest.$ac_objext; then
14223 ac_lo=$ac_mid; break
14224else
14225 echo "$as_me: failed program was:" >&5
14226sed 's/^/| /' conftest.$ac_ext >&5
14227
14228 ac_hi=`expr '(' $ac_mid ')' - 1`
14229 if test $ac_mid -le $ac_hi; then
14230 ac_lo= ac_hi=
14231 break
14232 fi
14233 ac_mid=`expr 2 '*' $ac_mid`
14234fi
14235
14236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14237 done
14238else
14239 echo "$as_me: failed program was:" >&5
14240sed 's/^/| /' conftest.$ac_ext >&5
14241
14242 ac_lo= ac_hi=
14243fi
14244
14245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14246fi
14247
14248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14249# Binary search between lo and hi bounds.
14250while test "x$ac_lo" != "x$ac_hi"; do
14251 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14252 cat >conftest.$ac_ext <<_ACEOF
14253/* confdefs.h. */
14254_ACEOF
14255cat confdefs.h >>conftest.$ac_ext
14256cat >>conftest.$ac_ext <<_ACEOF
14257/* end confdefs.h. */
14258
14259#ifdef HAVE_PTHREAD_H
14260#include <pthread.h>
14261#endif
14262
14263
14264 typedef pthread_t ac__type_sizeof_;
14265int
14266main ()
14267{
14268static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14269test_array [0] = 0
14270
14271 ;
14272 return 0;
14273}
14274_ACEOF
14275rm -f conftest.$ac_objext
14276if { (ac_try="$ac_compile"
14277case "(($ac_try" in
14278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14279 *) ac_try_echo=$ac_try;;
14280esac
14281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14282 (eval "$ac_compile") 2>conftest.er1
14283 ac_status=$?
14284 grep -v '^ *+' conftest.er1 >conftest.err
14285 rm -f conftest.er1
14286 cat conftest.err >&5
14287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14288 (exit $ac_status); } && {
14289 test -z "$ac_c_werror_flag" ||
14290 test ! -s conftest.err
14291 } && test -s conftest.$ac_objext; then
14292 ac_hi=$ac_mid
14293else
14294 echo "$as_me: failed program was:" >&5
14295sed 's/^/| /' conftest.$ac_ext >&5
14296
14297 ac_lo=`expr '(' $ac_mid ')' + 1`
14298fi
14299
14300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14301done
14302case $ac_lo in
14303?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14304'') if test "$ac_cv_type_pthread_t" = yes; then
14305 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14306See \`config.log' for more details." >&5
14307echo "$as_me: error: cannot compute sizeof (pthread_t)
14308See \`config.log' for more details." >&2;}
14309 { (exit 77); exit 77; }; }
14310 else
14311 ac_cv_sizeof_pthread_t=0
14312 fi ;;
14313esac
14314else
14315 cat >conftest.$ac_ext <<_ACEOF
14316/* confdefs.h. */
14317_ACEOF
14318cat confdefs.h >>conftest.$ac_ext
14319cat >>conftest.$ac_ext <<_ACEOF
14320/* end confdefs.h. */
14321
14322#ifdef HAVE_PTHREAD_H
14323#include <pthread.h>
14324#endif
14325
14326
14327 typedef pthread_t ac__type_sizeof_;
14328static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14329static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14330#include <stdio.h>
14331#include <stdlib.h>
14332int
14333main ()
14334{
14335
14336 FILE *f = fopen ("conftest.val", "w");
14337 if (! f)
14338 return 1;
14339 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14340 {
14341 long int i = longval ();
14342 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14343 return 1;
14344 fprintf (f, "%ld\n", i);
14345 }
14346 else
14347 {
14348 unsigned long int i = ulongval ();
14349 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14350 return 1;
14351 fprintf (f, "%lu\n", i);
14352 }
14353 return ferror (f) || fclose (f) != 0;
14354
14355 ;
14356 return 0;
14357}
Martin v. Löwis11437992002-04-12 09:54:03 +000014358_ACEOF
14359rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014360if { (ac_try="$ac_link"
14361case "(($ac_try" in
14362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14363 *) ac_try_echo=$ac_try;;
14364esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014366 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014367 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014369 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014370 { (case "(($ac_try" in
14371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14372 *) ac_try_echo=$ac_try;;
14373esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014375 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014376 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014378 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014379 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014380else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014381 echo "$as_me: program exited with status $ac_status" >&5
14382echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014383sed 's/^/| /' conftest.$ac_ext >&5
14384
Martin v. Löwis11437992002-04-12 09:54:03 +000014385( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014386if test "$ac_cv_type_pthread_t" = yes; then
14387 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14388See \`config.log' for more details." >&5
14389echo "$as_me: error: cannot compute sizeof (pthread_t)
14390See \`config.log' for more details." >&2;}
14391 { (exit 77); exit 77; }; }
14392 else
14393 ac_cv_sizeof_pthread_t=0
14394 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014396rm -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 +000014397fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014398rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014399fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014400{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014401echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014402
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014403
14404
Martin v. Löwis11437992002-04-12 09:54:03 +000014405cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014406#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014407_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014408
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014409
Trent Mick635f6fb2000-08-23 21:33:05 +000014410fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014411CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014412
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014413{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14414echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014415# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014416if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014417 enableval=$enable_toolbox_glue;
14418fi
Jack Jansene578a632001-08-15 01:27:14 +000014419
14420
14421if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014422then
Jack Jansene578a632001-08-15 01:27:14 +000014423 case $ac_sys_system/$ac_sys_release in
14424 Darwin/*)
14425 enable_toolbox_glue="yes";;
14426 *)
14427 enable_toolbox_glue="no";;
14428 esac
14429fi
14430case "$enable_toolbox_glue" in
14431yes)
Jack Jansene578a632001-08-15 01:27:14 +000014432 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014433 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014434
14435cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014436#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014437_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014438
14439 ;;
14440*)
Jack Jansene578a632001-08-15 01:27:14 +000014441 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014442 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014443 ;;
14444esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014445{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14446echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014447
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014448
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014449
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014450case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014451 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014452 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14453 ;;
14454 Darwin/*)
14455 OTHER_LIBTOOL_OPT=""
14456 ;;
14457esac
14458
14459
14460case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014461 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014462 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14463 if test "${enable_universalsdk}"; then
14464 :
14465 else
14466 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
14467 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014468 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014469 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014470 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014471 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14472 if test ${gcc_version} '<' 4.0
14473 then
14474 LIBTOOL_CRUFT="-lcc_dynamic"
14475 else
14476 LIBTOOL_CRUFT=""
14477 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000014478 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000014479 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014480 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014481esac
14482
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014483{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14484echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014485if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014486then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014487 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014488 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014489 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014490
Martin v. Löwis11437992002-04-12 09:54:03 +000014491cat >>confdefs.h <<\_ACEOF
14492#define WITH_NEXT_FRAMEWORK 1
14493_ACEOF
14494
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014495 { echo "$as_me:$LINENO: result: yes" >&5
14496echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014497 if test $enable_shared = "yes"
14498 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014499 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14500echo "$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 +000014501 { (exit 1); exit 1; }; }
14502 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014503else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014504 { echo "$as_me:$LINENO: result: no" >&5
14505echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014506fi
14507
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014508{ echo "$as_me:$LINENO: checking for dyld" >&5
14509echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014510case $ac_sys_system/$ac_sys_release in
14511 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014512
Martin v. Löwis11437992002-04-12 09:54:03 +000014513cat >>confdefs.h <<\_ACEOF
14514#define WITH_DYLD 1
14515_ACEOF
14516
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014517 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14518echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014519 ;;
14520 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014521 { echo "$as_me:$LINENO: result: no" >&5
14522echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014523 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014524esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014525
Guido van Rossum0a516c91994-09-12 10:58:40 +000014526# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014527
Michael W. Hudson54241132001-12-07 15:38:26 +000014528
14529
14530
14531
Guido van Rossum0a516c91994-09-12 10:58:40 +000014532# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014533# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014534{ echo "$as_me:$LINENO: checking SO" >&5
14535echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014536if test -z "$SO"
14537then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014538 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014539 hp*|HP*)
14540 case `uname -m` in
14541 ia64) SO=.so;;
14542 *) SO=.sl;;
14543 esac
14544 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014545 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014546 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014547 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014548else
14549 # this might also be a termcap variable, see #610332
14550 echo
14551 echo '====================================================================='
14552 echo '+ +'
14553 echo '+ WARNING: You have set SO in your environment. +'
14554 echo '+ Do you really mean to change the extension for shared libraries? +'
14555 echo '+ Continuing in 10 seconds to let you to ponder. +'
14556 echo '+ +'
14557 echo '====================================================================='
14558 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014559fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014560{ echo "$as_me:$LINENO: result: $SO" >&5
14561echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014562
Ronald Oussoren79f90492009-01-02 10:44:46 +000014563
Neal Norwitz58e28882006-05-19 07:00:58 +000014564cat >>confdefs.h <<_ACEOF
14565#define SHLIB_EXT "$SO"
14566_ACEOF
14567
Guido van Rossum0a516c91994-09-12 10:58:40 +000014568# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014569# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014570# (Shared libraries in this instance are shared modules to be loaded into
14571# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014572{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14573echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014574if test -z "$LDSHARED"
14575then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014576 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014577 AIX*)
14578 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014579 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014580 ;;
14581 BeOS*)
14582 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014583 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014584 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014585 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014586 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014587 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000014588 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014589 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014590 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000014591 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014592 hp*|HP*)
14593 if test "$GCC" = "yes"
14594 then LDSHARED='$(CC) -shared'
14595 else LDSHARED='ld -b';
14596 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014597 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014598 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014599 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14600 if test "$enable_framework" ; then
14601 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014602 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14603 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014604 else
14605 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014606 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014607 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014608 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014609 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14610 if test "$enable_framework" ; then
14611 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014612 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14613 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014614 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014615 # No framework, use the Python app as bundle-loader
14616 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014617 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014618 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014619 Darwin/*)
14620 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14621 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014622
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014623 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014624 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014625 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014626 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014627 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014628 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14629 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014630 else
14631 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14632 if test "$enable_framework" ; then
14633 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014634 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14635 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014636 else
14637 # No framework, use the Python app as bundle-loader
14638 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14639 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14640 fi
14641 fi
14642 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014643 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014644 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014645 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014646 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014647 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014648 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014649 else
14650 LDSHARED="ld -Bshareable ${LDFLAGS}"
14651 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014652 OpenBSD*)
14653 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14654 then
14655 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14656 else
14657 case `uname -r` in
14658 [01].* | 2.[0-7] | 2.[0-7].*)
14659 LDSHARED="ld -Bshareable ${LDFLAGS}"
14660 ;;
14661 *)
14662 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14663 ;;
14664 esac
14665 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014666 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014667 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014668 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014669 then LDSHARED='$(CC) -shared'
14670 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014671 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014672 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014673 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014674 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014675 *) LDSHARED="ld";;
14676 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014677fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014678{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14679echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014680BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014681# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014682# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014683{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14684echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014685if test -z "$CCSHARED"
14686then
Guido van Rossum07397971997-04-29 21:49:50 +000014687 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014688 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014689 then CCSHARED="-fPIC";
14690 elif test `uname -p` = sparc;
14691 then CCSHARED="-xcode=pic32";
14692 else CCSHARED="-Kpic";
14693 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014694 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014695 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014696 else CCSHARED="+z";
14697 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014698 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014699 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014700 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014701 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014702 if test "$GCC" = "yes"
14703 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014704 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014705 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014706 SCO_SV*)
14707 if test "$GCC" = "yes"
14708 then CCSHARED="-fPIC"
14709 else CCSHARED="-Kpic -belf"
14710 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014711 IRIX*/6*) case $CC in
14712 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014713 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014714 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014715 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014716 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014717fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014718{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14719echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014720# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014721# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014722{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14723echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014724if test -z "$LINKFORSHARED"
14725then
Guido van Rossum07397971997-04-29 21:49:50 +000014726 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014727 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014728 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014729 LINKFORSHARED="-Wl,-E -Wl,+s";;
14730# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014731 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014732 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014733 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014734 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014735 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14736 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014737 # not used by the core itself but which needs to be in the core so
14738 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014739 # -prebind is no longer used, because it actually seems to give a
14740 # slowdown in stead of a speedup, maybe due to the large number of
14741 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014742
14743 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014744 if test "$enable_framework"
14745 then
Jack Jansenda49e192005-01-07 13:08:22 +000014746 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014747 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014748 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014749 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014750 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014751 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014752 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014753 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14754 then
14755 LINKFORSHARED="-Wl,--export-dynamic"
14756 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014757 SunOS/5*) case $CC in
14758 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014759 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014760 then
14761 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014762 fi;;
14763 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014764 CYGWIN*)
14765 if test $enable_shared = "no"
14766 then
14767 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14768 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014769 QNX*)
14770 # -Wl,-E causes the symbols to be added to the dynamic
14771 # symbol table so that they can be found when a module
14772 # is loaded. -N 2048K causes the stack size to be set
14773 # to 2048 kilobytes so that the stack doesn't overflow
14774 # when running test_compile.py.
14775 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014776 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014777fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014778{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14779echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014780
Michael W. Hudson54241132001-12-07 15:38:26 +000014781
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014782
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014783{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14784echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014785if test ! "$LIBRARY" = "$LDLIBRARY"
14786then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014787 case $ac_sys_system in
14788 CYGWIN*)
14789 # Cygwin needs CCSHARED when building extension DLLs
14790 # but not when building the interpreter DLL.
14791 CFLAGSFORSHARED='';;
14792 *)
14793 CFLAGSFORSHARED='$(CCSHARED)'
14794 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014795fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014796{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14797echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014798
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014799# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14800# library (with --enable-shared).
14801# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014802# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14803# if it is not required, since it creates a dependency of the shared library
14804# to LIBS. This, in turn, means that applications linking the shared libpython
14805# don't need to link LIBS explicitly. The default should be only changed
14806# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014807
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014808{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14809echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014810case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014811 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014812 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014813esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014814{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14815echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014816
14817
Guido van Rossum627b2d71993-12-24 10:39:16 +000014818# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014819
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014820{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14821echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014822if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014823 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014824else
Martin v. Löwis11437992002-04-12 09:54:03 +000014825 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014826LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014827cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014828/* confdefs.h. */
14829_ACEOF
14830cat confdefs.h >>conftest.$ac_ext
14831cat >>conftest.$ac_ext <<_ACEOF
14832/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014833
Martin v. Löwiseba40652007-08-30 20:10:57 +000014834/* Override any GCC internal prototype to avoid an error.
14835 Use char because int might match the return type of a GCC
14836 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014837#ifdef __cplusplus
14838extern "C"
14839#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014840char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014841int
14842main ()
14843{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014844return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014845 ;
14846 return 0;
14847}
14848_ACEOF
14849rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014850if { (ac_try="$ac_link"
14851case "(($ac_try" in
14852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14853 *) ac_try_echo=$ac_try;;
14854esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014856 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014857 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014858 grep -v '^ *+' conftest.er1 >conftest.err
14859 rm -f conftest.er1
14860 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014862 (exit $ac_status); } && {
14863 test -z "$ac_c_werror_flag" ||
14864 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014865 } && test -s conftest$ac_exeext &&
14866 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014867 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014868else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014870sed 's/^/| /' conftest.$ac_ext >&5
14871
Martin v. Löwiseba40652007-08-30 20:10:57 +000014872 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014873fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014874
14875rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014876 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014877LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014878fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014879{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14880echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14881if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014882 cat >>confdefs.h <<_ACEOF
14883#define HAVE_LIBDL 1
14884_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014885
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014886 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014887
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014888fi
14889 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014890
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014891{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14892echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014893if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014894 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014895else
Martin v. Löwis11437992002-04-12 09:54:03 +000014896 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014897LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014898cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014899/* confdefs.h. */
14900_ACEOF
14901cat confdefs.h >>conftest.$ac_ext
14902cat >>conftest.$ac_ext <<_ACEOF
14903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014904
Martin v. Löwiseba40652007-08-30 20:10:57 +000014905/* Override any GCC internal prototype to avoid an error.
14906 Use char because int might match the return type of a GCC
14907 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014908#ifdef __cplusplus
14909extern "C"
14910#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014911char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014912int
14913main ()
14914{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014915return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014916 ;
14917 return 0;
14918}
14919_ACEOF
14920rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014921if { (ac_try="$ac_link"
14922case "(($ac_try" in
14923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14924 *) ac_try_echo=$ac_try;;
14925esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014927 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014928 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014929 grep -v '^ *+' conftest.er1 >conftest.err
14930 rm -f conftest.er1
14931 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014933 (exit $ac_status); } && {
14934 test -z "$ac_c_werror_flag" ||
14935 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014936 } && test -s conftest$ac_exeext &&
14937 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014938 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014939else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014941sed 's/^/| /' conftest.$ac_ext >&5
14942
Martin v. Löwiseba40652007-08-30 20:10:57 +000014943 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014944fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014945
14946rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014947 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014948LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014949fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014950{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
14951echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
14952if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014953 cat >>confdefs.h <<_ACEOF
14954#define HAVE_LIBDLD 1
14955_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014956
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014957 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014958
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014959fi
14960 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000014961
Ronald Oussoren79f90492009-01-02 10:44:46 +000014962# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000014963if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014964 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
14965echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014966if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014967 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014968else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014969 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000014970cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014971/* confdefs.h. */
14972_ACEOF
14973cat confdefs.h >>conftest.$ac_ext
14974cat >>conftest.$ac_ext <<_ACEOF
14975/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014976
Martin v. Löwiseba40652007-08-30 20:10:57 +000014977/* Override any GCC internal prototype to avoid an error.
14978 Use char because int might match the return type of a GCC
14979 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014980#ifdef __cplusplus
14981extern "C"
14982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014983char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014984int
14985main ()
14986{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014987return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014988 ;
14989 return 0;
14990}
14991_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014992for ac_lib in '' pthread rt posix4; do
14993 if test -z "$ac_lib"; then
14994 ac_res="none required"
14995 else
14996 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000014997 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014998 fi
14999 rm -f conftest.$ac_objext conftest$ac_exeext
15000if { (ac_try="$ac_link"
15001case "(($ac_try" in
15002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15003 *) ac_try_echo=$ac_try;;
15004esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015006 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015007 ac_status=$?
15008 grep -v '^ *+' conftest.er1 >conftest.err
15009 rm -f conftest.er1
15010 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015012 (exit $ac_status); } && {
15013 test -z "$ac_c_werror_flag" ||
15014 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015015 } && test -s conftest$ac_exeext &&
15016 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015017 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015018else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015019 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015020sed 's/^/| /' conftest.$ac_ext >&5
15021
Martin v. Löwiseba40652007-08-30 20:10:57 +000015022
Brett Cannon19fab762007-06-02 03:02:29 +000015023fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015024
15025rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15026 conftest$ac_exeext
15027 if test "${ac_cv_search_sem_init+set}" = set; then
15028 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015030done
15031if test "${ac_cv_search_sem_init+set}" = set; then
15032 :
15033else
15034 ac_cv_search_sem_init=no
15035fi
15036rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015037LIBS=$ac_func_search_save_LIBS
15038fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015039{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15040echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015041ac_res=$ac_cv_search_sem_init
15042if test "$ac_res" != no; then
15043 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015044
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015045fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015046 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015047 # posix4 on Solaris 2.6
15048 # pthread (first!) on Linux
15049fi
15050
Martin v. Löwis19d17342003-06-14 21:03:05 +000015051# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015052{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15053echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015054if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015055 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015056else
15057 ac_check_lib_save_LIBS=$LIBS
15058LIBS="-lintl $LIBS"
15059cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015060/* confdefs.h. */
15061_ACEOF
15062cat confdefs.h >>conftest.$ac_ext
15063cat >>conftest.$ac_ext <<_ACEOF
15064/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015065
Martin v. Löwiseba40652007-08-30 20:10:57 +000015066/* Override any GCC internal prototype to avoid an error.
15067 Use char because int might match the return type of a GCC
15068 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015069#ifdef __cplusplus
15070extern "C"
15071#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015072char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015073int
15074main ()
15075{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015076return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015077 ;
15078 return 0;
15079}
15080_ACEOF
15081rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015082if { (ac_try="$ac_link"
15083case "(($ac_try" in
15084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15085 *) ac_try_echo=$ac_try;;
15086esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015088 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015089 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015090 grep -v '^ *+' conftest.er1 >conftest.err
15091 rm -f conftest.er1
15092 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015094 (exit $ac_status); } && {
15095 test -z "$ac_c_werror_flag" ||
15096 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015097 } && test -s conftest$ac_exeext &&
15098 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015099 ac_cv_lib_intl_textdomain=yes
15100else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015102sed 's/^/| /' conftest.$ac_ext >&5
15103
Martin v. Löwiseba40652007-08-30 20:10:57 +000015104 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015106
15107rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015108 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015109LIBS=$ac_check_lib_save_LIBS
15110fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015111{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15112echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15113if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015114
15115cat >>confdefs.h <<\_ACEOF
15116#define WITH_LIBINTL 1
15117_ACEOF
15118
15119fi
15120
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015121
15122# checks for system dependent C++ extensions support
15123case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015124 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15125echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015126 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015127/* confdefs.h. */
15128_ACEOF
15129cat confdefs.h >>conftest.$ac_ext
15130cat >>conftest.$ac_ext <<_ACEOF
15131/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015132#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015133int
15134main ()
15135{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015136loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015137 ;
15138 return 0;
15139}
15140_ACEOF
15141rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015142if { (ac_try="$ac_link"
15143case "(($ac_try" in
15144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15145 *) ac_try_echo=$ac_try;;
15146esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015148 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015149 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015150 grep -v '^ *+' conftest.er1 >conftest.err
15151 rm -f conftest.er1
15152 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015154 (exit $ac_status); } && {
15155 test -z "$ac_c_werror_flag" ||
15156 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015157 } && test -s conftest$ac_exeext &&
15158 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015159
Martin v. Löwis11437992002-04-12 09:54:03 +000015160cat >>confdefs.h <<\_ACEOF
15161#define AIX_GENUINE_CPLUSPLUS 1
15162_ACEOF
15163
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015164 { echo "$as_me:$LINENO: result: yes" >&5
15165echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015166else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015168sed 's/^/| /' conftest.$ac_ext >&5
15169
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015170 { echo "$as_me:$LINENO: result: no" >&5
15171echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015173
15174rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015175 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015176 *) ;;
15177esac
15178
Guido van Rossum70c7f481998-03-26 18:44:10 +000015179# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015180# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015181{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15182echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015183if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015184 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015185else
Martin v. Löwis11437992002-04-12 09:54:03 +000015186 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015187LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015188cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015189/* confdefs.h. */
15190_ACEOF
15191cat confdefs.h >>conftest.$ac_ext
15192cat >>conftest.$ac_ext <<_ACEOF
15193/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015194
Martin v. Löwiseba40652007-08-30 20:10:57 +000015195/* Override any GCC internal prototype to avoid an error.
15196 Use char because int might match the return type of a GCC
15197 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015198#ifdef __cplusplus
15199extern "C"
15200#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015201char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015202int
15203main ()
15204{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015205return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015206 ;
15207 return 0;
15208}
15209_ACEOF
15210rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015211if { (ac_try="$ac_link"
15212case "(($ac_try" in
15213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15214 *) ac_try_echo=$ac_try;;
15215esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015217 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015218 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015219 grep -v '^ *+' conftest.er1 >conftest.err
15220 rm -f conftest.er1
15221 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015223 (exit $ac_status); } && {
15224 test -z "$ac_c_werror_flag" ||
15225 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015226 } && test -s conftest$ac_exeext &&
15227 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015228 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015229else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015230 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015231sed 's/^/| /' conftest.$ac_ext >&5
15232
Martin v. Löwiseba40652007-08-30 20:10:57 +000015233 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015234fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015235
15236rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015237 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015238LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015239fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015240{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15241echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15242if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015243 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015244fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015245 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015246{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15247echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015248if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015249 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015250else
Martin v. Löwis11437992002-04-12 09:54:03 +000015251 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015252LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015253cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015254/* confdefs.h. */
15255_ACEOF
15256cat confdefs.h >>conftest.$ac_ext
15257cat >>conftest.$ac_ext <<_ACEOF
15258/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015259
Martin v. Löwiseba40652007-08-30 20:10:57 +000015260/* Override any GCC internal prototype to avoid an error.
15261 Use char because int might match the return type of a GCC
15262 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015263#ifdef __cplusplus
15264extern "C"
15265#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015266char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015267int
15268main ()
15269{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015270return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015271 ;
15272 return 0;
15273}
15274_ACEOF
15275rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015276if { (ac_try="$ac_link"
15277case "(($ac_try" in
15278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15279 *) ac_try_echo=$ac_try;;
15280esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015282 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015283 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015284 grep -v '^ *+' conftest.er1 >conftest.err
15285 rm -f conftest.er1
15286 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015288 (exit $ac_status); } && {
15289 test -z "$ac_c_werror_flag" ||
15290 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015291 } && test -s conftest$ac_exeext &&
15292 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015293 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015294else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015296sed 's/^/| /' conftest.$ac_ext >&5
15297
Martin v. Löwiseba40652007-08-30 20:10:57 +000015298 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015300
15301rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015302 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015303LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015304fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015305{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15306echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15307if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015308 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015309fi
15310 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015311
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015312case "$ac_sys_system" in
15313BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015314{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15315echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015316if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015317 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015318else
Martin v. Löwis11437992002-04-12 09:54:03 +000015319 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015320LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015321cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015322/* confdefs.h. */
15323_ACEOF
15324cat confdefs.h >>conftest.$ac_ext
15325cat >>conftest.$ac_ext <<_ACEOF
15326/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015327
Martin v. Löwiseba40652007-08-30 20:10:57 +000015328/* Override any GCC internal prototype to avoid an error.
15329 Use char because int might match the return type of a GCC
15330 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015331#ifdef __cplusplus
15332extern "C"
15333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015334char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015335int
15336main ()
15337{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015338return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015339 ;
15340 return 0;
15341}
15342_ACEOF
15343rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015344if { (ac_try="$ac_link"
15345case "(($ac_try" in
15346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15347 *) ac_try_echo=$ac_try;;
15348esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015350 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015351 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015352 grep -v '^ *+' conftest.er1 >conftest.err
15353 rm -f conftest.er1
15354 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015356 (exit $ac_status); } && {
15357 test -z "$ac_c_werror_flag" ||
15358 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015359 } && test -s conftest$ac_exeext &&
15360 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015361 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015362else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015364sed 's/^/| /' conftest.$ac_ext >&5
15365
Martin v. Löwiseba40652007-08-30 20:10:57 +000015366 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015368
15369rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015370 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015371LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015372fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015373{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15374echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15375if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015376 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015377fi
15378 # BeOS
15379;;
15380esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015381
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015382{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15383echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015384
Martin v. Löwiseba40652007-08-30 20:10:57 +000015385# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015386if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015387 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015388{ echo "$as_me:$LINENO: result: $withval" >&5
15389echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015390LIBS="$withval $LIBS"
15391
15392else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015393 { echo "$as_me:$LINENO: result: no" >&5
15394echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015395fi
15396
Guido van Rossum7f43da71994-08-01 12:15:30 +000015397
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015398# Check for use of the system libffi library
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015399{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15400echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015401
Martin v. Löwiseba40652007-08-30 20:10:57 +000015402# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015403if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015404 withval=$with_system_ffi;
15405fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015406
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015407
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015408{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15409echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015410
Benjamin Peterson867475c2009-04-29 20:36:25 +000015411# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015412{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15413echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015414
15415# Check whether --with-dbmliborder was given.
15416if test "${with_dbmliborder+set}" = set; then
15417 withval=$with_dbmliborder;
15418if test x$with_dbmliborder = xyes
15419then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015420{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15421echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015422 { (exit 1); exit 1; }; }
15423else
15424 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15425 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15426 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015427 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15428echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015429 { (exit 1); exit 1; }; }
15430 fi
15431 done
15432fi
15433fi
15434
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015435{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15436echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015437
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015438# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015439
15440
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015441{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15442echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015443
Martin v. Löwiseba40652007-08-30 20:10:57 +000015444# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015445if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015446 withval=$with_signal_module;
15447fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015448
15449
15450if test -z "$with_signal_module"
15451then with_signal_module="yes"
15452fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015453{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15454echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015455
15456if test "${with_signal_module}" = "yes"; then
15457 USE_SIGNAL_MODULE=""
15458 SIGNAL_OBJS=""
15459else
15460 USE_SIGNAL_MODULE="#"
15461 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15462fi
15463
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015464# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015465
Barry Warsawc0d24d82000-06-29 16:12:00 +000015466USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015467
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015468{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15469echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015470
Guido van Rossumec2f0731997-01-22 20:54:01 +000015471
Martin v. Löwiseba40652007-08-30 20:10:57 +000015472# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015473if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015474 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015475{ echo "$as_me:$LINENO: result: $withval" >&5
15476echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015477LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015478if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015479 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015480fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015481else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015482 { echo "$as_me:$LINENO: result: no" >&5
15483echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015484fi
15485
Martin v. Löwis11437992002-04-12 09:54:03 +000015486
15487# Templates for things AC_DEFINEd more than once.
15488# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015489
15490
Martin v. Löwis11437992002-04-12 09:54:03 +000015491
15492
15493
15494
15495
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015496{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15497echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015498
Martin v. Löwiseba40652007-08-30 20:10:57 +000015499# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015500if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015501 withval=$with_threads;
15502fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015503
15504
Barry Warsawc0d24d82000-06-29 16:12:00 +000015505# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015506
Martin v. Löwiseba40652007-08-30 20:10:57 +000015507# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015508if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015509 withval=$with_thread; with_threads=$with_thread
15510fi
15511
Barry Warsawc0d24d82000-06-29 16:12:00 +000015512
15513if test -z "$with_threads"
15514then with_threads="yes"
15515fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015516{ echo "$as_me:$LINENO: result: $with_threads" >&5
15517echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015518
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015519
Barry Warsawc0d24d82000-06-29 16:12:00 +000015520if test "$with_threads" = "no"
15521then
15522 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015523elif test "$ac_cv_pthread_is_default" = yes
15524then
Martin v. Löwis11437992002-04-12 09:54:03 +000015525 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015526#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015527_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015528
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015529 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015530 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015531#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015532_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015533
15534 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015535 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015536elif test "$ac_cv_kpthread" = "yes"
15537then
15538 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015539 if test "$ac_cv_cxx_thread" = "yes"; then
15540 CXX="$CXX -Kpthread"
15541 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015542 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015543#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015544_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015545
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015546 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015547 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015548elif test "$ac_cv_kthread" = "yes"
15549then
15550 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015551 if test "$ac_cv_cxx_thread" = "yes"; then
15552 CXX="$CXX -Kthread"
15553 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015554 cat >>confdefs.h <<\_ACEOF
15555#define WITH_THREAD 1
15556_ACEOF
15557
15558 posix_threads=yes
15559 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015560elif test "$ac_cv_pthread" = "yes"
15561then
15562 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015563 if test "$ac_cv_cxx_thread" = "yes"; then
15564 CXX="$CXX -pthread"
15565 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015566 cat >>confdefs.h <<\_ACEOF
15567#define WITH_THREAD 1
15568_ACEOF
15569
15570 posix_threads=yes
15571 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015572else
15573 if test ! -z "$with_threads" -a -d "$with_threads"
15574 then LDFLAGS="$LDFLAGS -L$with_threads"
15575 fi
15576 if test ! -z "$withval" -a -d "$withval"
15577 then LDFLAGS="$LDFLAGS -L$withval"
15578 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015579
15580 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015581 # define _POSIX_THREADS in unistd.h. Some apparently don't
15582 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015583 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15584echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015586/* confdefs.h. */
15587_ACEOF
15588cat confdefs.h >>conftest.$ac_ext
15589cat >>conftest.$ac_ext <<_ACEOF
15590/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015591
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015592#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015593#ifdef _POSIX_THREADS
15594yes
15595#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015596
15597_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015598if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015599 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015600 unistd_defines_pthreads=yes
15601else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015602 unistd_defines_pthreads=no
15603fi
15604rm -f conftest*
15605
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015606 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15607echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015608
Martin v. Löwis11437992002-04-12 09:54:03 +000015609 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015610#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015611_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015612
Martin v. Löwis11437992002-04-12 09:54:03 +000015613 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015614 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15615echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015616if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015617 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015618fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015619{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15620echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015621else
Martin v. Löwis11437992002-04-12 09:54:03 +000015622 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015623{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15624echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015625cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015626/* confdefs.h. */
15627_ACEOF
15628cat confdefs.h >>conftest.$ac_ext
15629cat >>conftest.$ac_ext <<_ACEOF
15630/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015631$ac_includes_default
15632#include <cthreads.h>
15633_ACEOF
15634rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015635if { (ac_try="$ac_compile"
15636case "(($ac_try" in
15637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15638 *) ac_try_echo=$ac_try;;
15639esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015641 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015643 grep -v '^ *+' conftest.er1 >conftest.err
15644 rm -f conftest.er1
15645 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015647 (exit $ac_status); } && {
15648 test -z "$ac_c_werror_flag" ||
15649 test ! -s conftest.err
15650 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015651 ac_header_compiler=yes
15652else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015653 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015654sed 's/^/| /' conftest.$ac_ext >&5
15655
Martin v. Löwiseba40652007-08-30 20:10:57 +000015656 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015657fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015658
15659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015660{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15661echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015662
15663# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015664{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15665echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015666cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015667/* confdefs.h. */
15668_ACEOF
15669cat confdefs.h >>conftest.$ac_ext
15670cat >>conftest.$ac_ext <<_ACEOF
15671/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015672#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015673_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015674if { (ac_try="$ac_cpp conftest.$ac_ext"
15675case "(($ac_try" in
15676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15677 *) ac_try_echo=$ac_try;;
15678esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015680 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015681 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015682 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015683 rm -f conftest.er1
15684 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015686 (exit $ac_status); } >/dev/null && {
15687 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15688 test ! -s conftest.err
15689 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015690 ac_header_preproc=yes
15691else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015693sed 's/^/| /' conftest.$ac_ext >&5
15694
Martin v. Löwis11437992002-04-12 09:54:03 +000015695 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015697
Martin v. Löwis11437992002-04-12 09:54:03 +000015698rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015699{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15700echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015701
15702# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015703case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15704 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015705 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15706echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15707 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15708echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015709 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015710 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015711 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015712 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15713echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15714 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15715echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15716 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15717echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15718 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15719echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15720 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15721echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15722 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15723echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015724 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015725## -------------------------------------- ##
15726## Report this to http://bugs.python.org/ ##
15727## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015728_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015729 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015730 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015731esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015732{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15733echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015734if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015735 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015736else
15737 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015738fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015739{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15740echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015741
15742fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015743if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015744 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015745#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015746_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015747
Martin v. Löwis11437992002-04-12 09:54:03 +000015748 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015749#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015750_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015751
Martin v. Löwis11437992002-04-12 09:54:03 +000015752
15753cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015754#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015755_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015756
15757 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015758 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015759else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015760
Martin v. Löwis11437992002-04-12 09:54:03 +000015761 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015762 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15763echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015764if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015765 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015766fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015767{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15768echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015769else
Martin v. Löwis11437992002-04-12 09:54:03 +000015770 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015771{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15772echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015773cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015774/* confdefs.h. */
15775_ACEOF
15776cat confdefs.h >>conftest.$ac_ext
15777cat >>conftest.$ac_ext <<_ACEOF
15778/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015779$ac_includes_default
15780#include <mach/cthreads.h>
15781_ACEOF
15782rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015783if { (ac_try="$ac_compile"
15784case "(($ac_try" in
15785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15786 *) ac_try_echo=$ac_try;;
15787esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015789 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015790 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015791 grep -v '^ *+' conftest.er1 >conftest.err
15792 rm -f conftest.er1
15793 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015795 (exit $ac_status); } && {
15796 test -z "$ac_c_werror_flag" ||
15797 test ! -s conftest.err
15798 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015799 ac_header_compiler=yes
15800else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015802sed 's/^/| /' conftest.$ac_ext >&5
15803
Martin v. Löwiseba40652007-08-30 20:10:57 +000015804 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015805fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015806
15807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015808{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15809echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015810
15811# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015812{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15813echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015814cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015815/* confdefs.h. */
15816_ACEOF
15817cat confdefs.h >>conftest.$ac_ext
15818cat >>conftest.$ac_ext <<_ACEOF
15819/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015820#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015821_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015822if { (ac_try="$ac_cpp conftest.$ac_ext"
15823case "(($ac_try" in
15824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15825 *) ac_try_echo=$ac_try;;
15826esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015828 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015829 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015830 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015831 rm -f conftest.er1
15832 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015834 (exit $ac_status); } >/dev/null && {
15835 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15836 test ! -s conftest.err
15837 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015838 ac_header_preproc=yes
15839else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015841sed 's/^/| /' conftest.$ac_ext >&5
15842
Martin v. Löwis11437992002-04-12 09:54:03 +000015843 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015845
Martin v. Löwis11437992002-04-12 09:54:03 +000015846rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015847{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15848echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015849
15850# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015851case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15852 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015853 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15854echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15855 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15856echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015857 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015858 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015859 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015860 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15861echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15862 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15863echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15864 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15865echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15866 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15867echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15868 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15869echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15870 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15871echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015872 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015873## -------------------------------------- ##
15874## Report this to http://bugs.python.org/ ##
15875## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015876_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015877 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015878 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015879esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015880{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15881echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015882if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015883 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015884else
15885 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015886fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015887{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15888echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015889
15890fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015891if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015892 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015893#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015894_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015895
Martin v. Löwis11437992002-04-12 09:54:03 +000015896 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015897#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015898_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015899
Martin v. Löwis11437992002-04-12 09:54:03 +000015900
15901cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015902#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015903_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015904
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015905 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015906else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015907
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015908 { echo "$as_me:$LINENO: checking for --with-pth" >&5
15909echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015910
Martin v. Löwiseba40652007-08-30 20:10:57 +000015911# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015912if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015913 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
15914echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015915 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015916#define WITH_THREAD 1
15917_ACEOF
15918
15919
15920cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015921#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015922_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015923
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015924 LIBS="-lpth $LIBS"
15925 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015926else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015927 { echo "$as_me:$LINENO: result: no" >&5
15928echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015929
15930 # Just looking for pthread_create in libpthread is not enough:
15931 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
15932 # So we really have to include pthread.h, and then link.
15933 _libs=$LIBS
15934 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015935 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15936echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015937 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015938/* confdefs.h. */
15939_ACEOF
15940cat confdefs.h >>conftest.$ac_ext
15941cat >>conftest.$ac_ext <<_ACEOF
15942/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015943#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000015944
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015945void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000015946int
15947main ()
15948{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015949
15950pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000015951 ;
15952 return 0;
15953}
15954_ACEOF
15955rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015956if { (ac_try="$ac_link"
15957case "(($ac_try" in
15958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15959 *) ac_try_echo=$ac_try;;
15960esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015962 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015963 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015964 grep -v '^ *+' conftest.er1 >conftest.err
15965 rm -f conftest.er1
15966 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015968 (exit $ac_status); } && {
15969 test -z "$ac_c_werror_flag" ||
15970 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015971 } && test -s conftest$ac_exeext &&
15972 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015973
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015974 { echo "$as_me:$LINENO: result: yes" >&5
15975echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015976 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015977#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015978_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015979
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015980 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015981 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000015982else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015984sed 's/^/| /' conftest.$ac_ext >&5
15985
Martin v. Löwis11437992002-04-12 09:54:03 +000015986
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015987 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015988 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
15989echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015990if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015991 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015992else
Martin v. Löwis11437992002-04-12 09:54:03 +000015993 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015994/* confdefs.h. */
15995_ACEOF
15996cat confdefs.h >>conftest.$ac_ext
15997cat >>conftest.$ac_ext <<_ACEOF
15998/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015999/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16000 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16001#define pthread_detach innocuous_pthread_detach
16002
Guido van Rossumad678af1998-10-02 14:42:15 +000016003/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016004 which can conflict with char pthread_detach (); below.
16005 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016006 <limits.h> exists even on freestanding compilers. */
16007
16008#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016009# include <limits.h>
16010#else
16011# include <assert.h>
16012#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016013
16014#undef pthread_detach
16015
Martin v. Löwiseba40652007-08-30 20:10:57 +000016016/* Override any GCC internal prototype to avoid an error.
16017 Use char because int might match the return type of a GCC
16018 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016019#ifdef __cplusplus
16020extern "C"
16021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016022char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016023/* The GNU C library defines this for functions which it implements
16024 to always fail with ENOSYS. Some functions are actually named
16025 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016026#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016027choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016028#endif
16029
Skip Montanaro6dead952003-09-25 14:50:04 +000016030int
16031main ()
16032{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016033return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016034 ;
16035 return 0;
16036}
16037_ACEOF
16038rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016039if { (ac_try="$ac_link"
16040case "(($ac_try" in
16041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16042 *) ac_try_echo=$ac_try;;
16043esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016045 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016047 grep -v '^ *+' conftest.er1 >conftest.err
16048 rm -f conftest.er1
16049 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016051 (exit $ac_status); } && {
16052 test -z "$ac_c_werror_flag" ||
16053 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016054 } && test -s conftest$ac_exeext &&
16055 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016056 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016057else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016058 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016059sed 's/^/| /' conftest.$ac_ext >&5
16060
Martin v. Löwiseba40652007-08-30 20:10:57 +000016061 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016063
16064rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016065 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016066fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016067{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16068echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16069if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016070 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016071#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016072_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016073
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016074 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016075 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016076else
Guido van Rossumad678af1998-10-02 14:42:15 +000016077
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016078 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016079 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16080echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016081if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016082 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016083fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016084{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16085echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016086else
16087 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016088{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16089echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016090cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016091/* confdefs.h. */
16092_ACEOF
16093cat confdefs.h >>conftest.$ac_ext
16094cat >>conftest.$ac_ext <<_ACEOF
16095/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016096$ac_includes_default
16097#include <atheos/threads.h>
16098_ACEOF
16099rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016100if { (ac_try="$ac_compile"
16101case "(($ac_try" in
16102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16103 *) ac_try_echo=$ac_try;;
16104esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016106 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016107 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016108 grep -v '^ *+' conftest.er1 >conftest.err
16109 rm -f conftest.er1
16110 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016112 (exit $ac_status); } && {
16113 test -z "$ac_c_werror_flag" ||
16114 test ! -s conftest.err
16115 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016116 ac_header_compiler=yes
16117else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016118 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016119sed 's/^/| /' conftest.$ac_ext >&5
16120
Martin v. Löwiseba40652007-08-30 20:10:57 +000016121 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016123
16124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016125{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16126echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016127
16128# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016129{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16130echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016131cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016132/* confdefs.h. */
16133_ACEOF
16134cat confdefs.h >>conftest.$ac_ext
16135cat >>conftest.$ac_ext <<_ACEOF
16136/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016137#include <atheos/threads.h>
16138_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016139if { (ac_try="$ac_cpp conftest.$ac_ext"
16140case "(($ac_try" in
16141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16142 *) ac_try_echo=$ac_try;;
16143esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016145 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016146 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016147 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016148 rm -f conftest.er1
16149 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016151 (exit $ac_status); } >/dev/null && {
16152 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16153 test ! -s conftest.err
16154 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016155 ac_header_preproc=yes
16156else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016158sed 's/^/| /' conftest.$ac_ext >&5
16159
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016160 ac_header_preproc=no
16161fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016162
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016163rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016164{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16165echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016166
16167# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016168case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16169 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016170 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16171echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16172 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16173echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016174 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016175 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016176 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016177 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16178echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16179 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16180echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16181 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16182echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16183 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16184echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16185 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16186echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16187 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16188echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016189 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016190## -------------------------------------- ##
16191## Report this to http://bugs.python.org/ ##
16192## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016193_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016194 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016195 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016196esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016197{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16198echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016199if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016200 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016201else
16202 ac_cv_header_atheos_threads_h=$ac_header_preproc
16203fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016204{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16205echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016206
16207fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016208if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016209 cat >>confdefs.h <<\_ACEOF
16210#define WITH_THREAD 1
16211_ACEOF
16212
16213
16214cat >>confdefs.h <<\_ACEOF
16215#define ATHEOS_THREADS 1
16216_ACEOF
16217
16218 THREADOBJ="Python/thread.o"
16219else
16220
Martin v. Löwis11437992002-04-12 09:54:03 +000016221 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016222 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16223echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016224if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016225 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016226fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016227{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16228echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016229else
Martin v. Löwis11437992002-04-12 09:54:03 +000016230 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016231{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16232echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016233cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016234/* confdefs.h. */
16235_ACEOF
16236cat confdefs.h >>conftest.$ac_ext
16237cat >>conftest.$ac_ext <<_ACEOF
16238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016239$ac_includes_default
16240#include <kernel/OS.h>
16241_ACEOF
16242rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016243if { (ac_try="$ac_compile"
16244case "(($ac_try" in
16245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16246 *) ac_try_echo=$ac_try;;
16247esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016249 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016250 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016251 grep -v '^ *+' conftest.er1 >conftest.err
16252 rm -f conftest.er1
16253 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016255 (exit $ac_status); } && {
16256 test -z "$ac_c_werror_flag" ||
16257 test ! -s conftest.err
16258 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016259 ac_header_compiler=yes
16260else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016262sed 's/^/| /' conftest.$ac_ext >&5
16263
Martin v. Löwiseba40652007-08-30 20:10:57 +000016264 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016266
16267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016268{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16269echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016270
16271# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016272{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16273echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016274cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016275/* confdefs.h. */
16276_ACEOF
16277cat confdefs.h >>conftest.$ac_ext
16278cat >>conftest.$ac_ext <<_ACEOF
16279/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016280#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016281_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016282if { (ac_try="$ac_cpp conftest.$ac_ext"
16283case "(($ac_try" in
16284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16285 *) ac_try_echo=$ac_try;;
16286esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016288 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016289 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016290 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016291 rm -f conftest.er1
16292 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016294 (exit $ac_status); } >/dev/null && {
16295 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16296 test ! -s conftest.err
16297 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016298 ac_header_preproc=yes
16299else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016300 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016301sed 's/^/| /' conftest.$ac_ext >&5
16302
Martin v. Löwis11437992002-04-12 09:54:03 +000016303 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016304fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016305
Martin v. Löwis11437992002-04-12 09:54:03 +000016306rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016307{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16308echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016309
Martin v. Löwis11437992002-04-12 09:54:03 +000016310# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016311case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16312 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016313 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16314echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16315 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16316echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016317 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016318 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016319 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016320 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16321echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16322 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16323echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16324 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16325echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16326 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16327echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16328 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16329echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16330 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16331echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016332 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016333## -------------------------------------- ##
16334## Report this to http://bugs.python.org/ ##
16335## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016336_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016337 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016338 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016339esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016340{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16341echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016342if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016343 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016344else
16345 ac_cv_header_kernel_OS_h=$ac_header_preproc
16346fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016347{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16348echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016349
16350fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016351if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016352 cat >>confdefs.h <<\_ACEOF
16353#define WITH_THREAD 1
16354_ACEOF
16355
16356
16357cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016358#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016359_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016360
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016361 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016362else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016363
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016364 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16365echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016366if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016367 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016368else
Martin v. Löwis11437992002-04-12 09:54:03 +000016369 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016370LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016371cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016372/* confdefs.h. */
16373_ACEOF
16374cat confdefs.h >>conftest.$ac_ext
16375cat >>conftest.$ac_ext <<_ACEOF
16376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016377
Martin v. Löwiseba40652007-08-30 20:10:57 +000016378/* Override any GCC internal prototype to avoid an error.
16379 Use char because int might match the return type of a GCC
16380 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016381#ifdef __cplusplus
16382extern "C"
16383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016384char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016385int
16386main ()
16387{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016388return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016389 ;
16390 return 0;
16391}
16392_ACEOF
16393rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016394if { (ac_try="$ac_link"
16395case "(($ac_try" in
16396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16397 *) ac_try_echo=$ac_try;;
16398esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016400 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016402 grep -v '^ *+' conftest.er1 >conftest.err
16403 rm -f conftest.er1
16404 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016406 (exit $ac_status); } && {
16407 test -z "$ac_c_werror_flag" ||
16408 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016409 } && test -s conftest$ac_exeext &&
16410 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016411 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016412else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016414sed 's/^/| /' conftest.$ac_ext >&5
16415
Martin v. Löwiseba40652007-08-30 20:10:57 +000016416 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016418
16419rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016420 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016421LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016422fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016423{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16424echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16425if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016426 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016427#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016428_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016429
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016430 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016431 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016432 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016433else
Greg Steinadf63d62000-07-05 10:38:09 +000016434
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016435 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16436echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016437if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016438 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016439else
Martin v. Löwis11437992002-04-12 09:54:03 +000016440 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016441LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016442cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016443/* confdefs.h. */
16444_ACEOF
16445cat confdefs.h >>conftest.$ac_ext
16446cat >>conftest.$ac_ext <<_ACEOF
16447/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016448
Martin v. Löwiseba40652007-08-30 20:10:57 +000016449/* Override any GCC internal prototype to avoid an error.
16450 Use char because int might match the return type of a GCC
16451 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016452#ifdef __cplusplus
16453extern "C"
16454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016455char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016456int
16457main ()
16458{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016459return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016460 ;
16461 return 0;
16462}
16463_ACEOF
16464rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016465if { (ac_try="$ac_link"
16466case "(($ac_try" in
16467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16468 *) ac_try_echo=$ac_try;;
16469esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016471 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016472 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016473 grep -v '^ *+' conftest.er1 >conftest.err
16474 rm -f conftest.er1
16475 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016477 (exit $ac_status); } && {
16478 test -z "$ac_c_werror_flag" ||
16479 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016480 } && test -s conftest$ac_exeext &&
16481 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016482 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016483else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016485sed 's/^/| /' conftest.$ac_ext >&5
16486
Martin v. Löwiseba40652007-08-30 20:10:57 +000016487 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016489
16490rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016491 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016492LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016493fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016494{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16495echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16496if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016497 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016498#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016499_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016500
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016501 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016502 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016503 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016504else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016505
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016506 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16507echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016508if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016509 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016510else
Martin v. Löwis11437992002-04-12 09:54:03 +000016511 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016512LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016513cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016514/* confdefs.h. */
16515_ACEOF
16516cat confdefs.h >>conftest.$ac_ext
16517cat >>conftest.$ac_ext <<_ACEOF
16518/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016519
Martin v. Löwiseba40652007-08-30 20:10:57 +000016520/* Override any GCC internal prototype to avoid an error.
16521 Use char because int might match the return type of a GCC
16522 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016523#ifdef __cplusplus
16524extern "C"
16525#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016526char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016527int
16528main ()
16529{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016530return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016531 ;
16532 return 0;
16533}
16534_ACEOF
16535rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016536if { (ac_try="$ac_link"
16537case "(($ac_try" in
16538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16539 *) ac_try_echo=$ac_try;;
16540esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016542 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016544 grep -v '^ *+' conftest.er1 >conftest.err
16545 rm -f conftest.er1
16546 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016548 (exit $ac_status); } && {
16549 test -z "$ac_c_werror_flag" ||
16550 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016551 } && test -s conftest$ac_exeext &&
16552 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016553 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016554else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016556sed 's/^/| /' conftest.$ac_ext >&5
16557
Martin v. Löwiseba40652007-08-30 20:10:57 +000016558 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016559fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016560
16561rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016562 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016563LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016564fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016565{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16566echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16567if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016568 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016569#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016570_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016571
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016572 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016573 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016574 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016575else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016576
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016577 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16578echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016579if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016580 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016581else
Martin v. Löwis11437992002-04-12 09:54:03 +000016582 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016583LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016584cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016585/* confdefs.h. */
16586_ACEOF
16587cat confdefs.h >>conftest.$ac_ext
16588cat >>conftest.$ac_ext <<_ACEOF
16589/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016590
Martin v. Löwiseba40652007-08-30 20:10:57 +000016591/* Override any GCC internal prototype to avoid an error.
16592 Use char because int might match the return type of a GCC
16593 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016594#ifdef __cplusplus
16595extern "C"
16596#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016597char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016598int
16599main ()
16600{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016601return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016602 ;
16603 return 0;
16604}
16605_ACEOF
16606rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016607if { (ac_try="$ac_link"
16608case "(($ac_try" in
16609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16610 *) ac_try_echo=$ac_try;;
16611esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016613 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016615 grep -v '^ *+' conftest.er1 >conftest.err
16616 rm -f conftest.er1
16617 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016619 (exit $ac_status); } && {
16620 test -z "$ac_c_werror_flag" ||
16621 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016622 } && test -s conftest$ac_exeext &&
16623 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016624 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016625else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016627sed 's/^/| /' conftest.$ac_ext >&5
16628
Martin v. Löwiseba40652007-08-30 20:10:57 +000016629 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016631
16632rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016633 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016634LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016635fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016636{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16637echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16638if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016639 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016640#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016641_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016642
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016643 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016644 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016645 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016646else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016647
Martin v. Löwis130fb172001-07-19 11:00:41 +000016648 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016649fi
16650
Guido van Rossum627b2d71993-12-24 10:39:16 +000016651
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016652fi
16653
Guido van Rossum0be3e491997-05-22 20:33:33 +000016654fi
16655
Guido van Rossum49545951997-12-02 19:28:29 +000016656fi
16657
Guido van Rossumb93a8621998-05-07 13:27:32 +000016658fi
16659
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016660
Michael W. Hudson54241132001-12-07 15:38:26 +000016661fi
16662
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016663
16664fi
16665
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016666fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016667
16668rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016669 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016670fi
16671
Martin v. Löwis11437992002-04-12 09:54:03 +000016672fi
16673
16674
16675fi
16676
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016677
Michael W. Hudson54241132001-12-07 15:38:26 +000016678
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016679 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16680echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016681if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016682 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016683else
Martin v. Löwis11437992002-04-12 09:54:03 +000016684 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016685LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016686cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016687/* confdefs.h. */
16688_ACEOF
16689cat confdefs.h >>conftest.$ac_ext
16690cat >>conftest.$ac_ext <<_ACEOF
16691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016692
Martin v. Löwiseba40652007-08-30 20:10:57 +000016693/* Override any GCC internal prototype to avoid an error.
16694 Use char because int might match the return type of a GCC
16695 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016696#ifdef __cplusplus
16697extern "C"
16698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016699char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016700int
16701main ()
16702{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016703return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016704 ;
16705 return 0;
16706}
16707_ACEOF
16708rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016709if { (ac_try="$ac_link"
16710case "(($ac_try" in
16711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16712 *) ac_try_echo=$ac_try;;
16713esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016715 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016716 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016717 grep -v '^ *+' conftest.er1 >conftest.err
16718 rm -f conftest.er1
16719 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016721 (exit $ac_status); } && {
16722 test -z "$ac_c_werror_flag" ||
16723 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016724 } && test -s conftest$ac_exeext &&
16725 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016726 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016727else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016729sed 's/^/| /' conftest.$ac_ext >&5
16730
Martin v. Löwiseba40652007-08-30 20:10:57 +000016731 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016732fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016733
16734rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016735 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016736LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016737fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016738{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16739echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16740if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016741 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016742#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016743_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016744
Martin v. Löwis130fb172001-07-19 11:00:41 +000016745 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016746 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016747 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016748fi
16749
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016750
Neal Norwitza978ab02002-11-02 16:58:05 +000016751 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016752 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16753echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016754if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016755 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016756else
Martin v. Löwis11437992002-04-12 09:54:03 +000016757 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016758LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016759cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016760/* confdefs.h. */
16761_ACEOF
16762cat confdefs.h >>conftest.$ac_ext
16763cat >>conftest.$ac_ext <<_ACEOF
16764/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016765
Martin v. Löwiseba40652007-08-30 20:10:57 +000016766/* Override any GCC internal prototype to avoid an error.
16767 Use char because int might match the return type of a GCC
16768 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016769#ifdef __cplusplus
16770extern "C"
16771#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016772char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016773int
16774main ()
16775{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016776return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016777 ;
16778 return 0;
16779}
16780_ACEOF
16781rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016782if { (ac_try="$ac_link"
16783case "(($ac_try" in
16784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16785 *) ac_try_echo=$ac_try;;
16786esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016788 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016789 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016790 grep -v '^ *+' conftest.er1 >conftest.err
16791 rm -f conftest.er1
16792 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016794 (exit $ac_status); } && {
16795 test -z "$ac_c_werror_flag" ||
16796 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016797 } && test -s conftest$ac_exeext &&
16798 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016799 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016800else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016802sed 's/^/| /' conftest.$ac_ext >&5
16803
Martin v. Löwiseba40652007-08-30 20:10:57 +000016804 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016805fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016806
16807rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016808 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016809LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016810fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016811{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16812echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16813if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016814 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016815#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016816_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016817
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016818 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016819 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016820 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016821fi
16822
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016823 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016824
Martin v. Löwis130fb172001-07-19 11:00:41 +000016825 if test "$USE_THREAD_MODULE" != "#"
16826 then
16827 # If the above checks didn't disable threads, (at least) OSF1
16828 # needs this '-threads' argument during linking.
16829 case $ac_sys_system in
16830 OSF1) LDLAST=-threads;;
16831 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016832 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016833fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016834
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016835if test "$posix_threads" = "yes"; then
16836 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016837
16838cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016839#define _POSIX_THREADS 1
16840_ACEOF
16841
16842 fi
16843
16844 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16845 case $ac_sys_system/$ac_sys_release in
16846 SunOS/5.6)
16847cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016848#define HAVE_PTHREAD_DESTRUCTOR 1
16849_ACEOF
16850
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016851 ;;
16852 SunOS/5.8)
16853cat >>confdefs.h <<\_ACEOF
16854#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16855_ACEOF
16856
16857 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000016858 AIX/5)
16859cat >>confdefs.h <<\_ACEOF
16860#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16861_ACEOF
16862
16863 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016864 esac
16865
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016866 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16867echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016868 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016869 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016870else
16871 if test "$cross_compiling" = yes; then
16872 ac_cv_pthread_system_supported=no
16873else
16874 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016875/* confdefs.h. */
16876_ACEOF
16877cat confdefs.h >>conftest.$ac_ext
16878cat >>conftest.$ac_ext <<_ACEOF
16879/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016880#include <pthread.h>
16881 void *foo(void *parm) {
16882 return NULL;
16883 }
16884 main() {
16885 pthread_attr_t attr;
16886 pthread_t id;
16887 if (pthread_attr_init(&attr)) exit(-1);
16888 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16889 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16890 exit(0);
16891 }
16892_ACEOF
16893rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016894if { (ac_try="$ac_link"
16895case "(($ac_try" in
16896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16897 *) ac_try_echo=$ac_try;;
16898esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016900 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016901 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016903 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016904 { (case "(($ac_try" in
16905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16906 *) ac_try_echo=$ac_try;;
16907esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016909 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016910 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016912 (exit $ac_status); }; }; then
16913 ac_cv_pthread_system_supported=yes
16914else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016915 echo "$as_me: program exited with status $ac_status" >&5
16916echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016917sed 's/^/| /' conftest.$ac_ext >&5
16918
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016919( exit $ac_status )
16920ac_cv_pthread_system_supported=no
16921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016922rm -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 +000016923fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016924
Martin v. Löwiseba40652007-08-30 20:10:57 +000016925
16926
Guido van Rossum627b2d71993-12-24 10:39:16 +000016927fi
16928
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016929 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16930echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016931 if test "$ac_cv_pthread_system_supported" = "yes"; then
16932
16933cat >>confdefs.h <<\_ACEOF
16934#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16935_ACEOF
16936
16937 fi
16938
16939for ac_func in pthread_sigmask
16940do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016941as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16942{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16943echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000016944if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016945 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016946else
16947 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016948/* confdefs.h. */
16949_ACEOF
16950cat confdefs.h >>conftest.$ac_ext
16951cat >>conftest.$ac_ext <<_ACEOF
16952/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016953/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16954 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16955#define $ac_func innocuous_$ac_func
16956
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016957/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016958 which can conflict with char $ac_func (); below.
16959 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016960 <limits.h> exists even on freestanding compilers. */
16961
16962#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016963# include <limits.h>
16964#else
16965# include <assert.h>
16966#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016967
16968#undef $ac_func
16969
Martin v. Löwiseba40652007-08-30 20:10:57 +000016970/* Override any GCC internal prototype to avoid an error.
16971 Use char because int might match the return type of a GCC
16972 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016973#ifdef __cplusplus
16974extern "C"
16975#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016976char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016977/* The GNU C library defines this for functions which it implements
16978 to always fail with ENOSYS. Some functions are actually named
16979 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016980#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016981choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016982#endif
16983
Skip Montanaro6dead952003-09-25 14:50:04 +000016984int
16985main ()
16986{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016987return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016988 ;
16989 return 0;
16990}
16991_ACEOF
16992rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016993if { (ac_try="$ac_link"
16994case "(($ac_try" in
16995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16996 *) ac_try_echo=$ac_try;;
16997esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016999 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017000 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017001 grep -v '^ *+' conftest.er1 >conftest.err
17002 rm -f conftest.er1
17003 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017005 (exit $ac_status); } && {
17006 test -z "$ac_c_werror_flag" ||
17007 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017008 } && test -s conftest$ac_exeext &&
17009 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017010 eval "$as_ac_var=yes"
17011else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017012 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017013sed 's/^/| /' conftest.$ac_ext >&5
17014
Martin v. Löwiseba40652007-08-30 20:10:57 +000017015 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017017
17018rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017019 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017020fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017021ac_res=`eval echo '${'$as_ac_var'}'`
17022 { echo "$as_me:$LINENO: result: $ac_res" >&5
17023echo "${ECHO_T}$ac_res" >&6; }
17024if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017025 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017026#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017027_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017028 case $ac_sys_system in
17029 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017030
Jason Tishlerfac083d2003-07-22 15:20:49 +000017031cat >>confdefs.h <<\_ACEOF
17032#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17033_ACEOF
17034
17035 ;;
17036 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017037fi
17038done
17039
17040fi
17041
17042
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017043# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017044
17045
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017046{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17047echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017048# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017049if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017050 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017051 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017052 { echo "$as_me:$LINENO: result: no" >&5
17053echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017054 ipv6=no
17055 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017056 *) { echo "$as_me:$LINENO: result: yes" >&5
17057echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017058 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017059#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017060_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017061
17062 ipv6=yes
17063 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017064 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017065else
Martin v. Löwis11437992002-04-12 09:54:03 +000017066
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017067 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017068 { echo "$as_me:$LINENO: result: no" >&5
17069echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017070 ipv6=no
17071
17072else
Martin v. Löwis11437992002-04-12 09:54:03 +000017073 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017074/* confdefs.h. */
17075_ACEOF
17076cat confdefs.h >>conftest.$ac_ext
17077cat >>conftest.$ac_ext <<_ACEOF
17078/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017079 /* AF_INET6 available check */
17080#include <sys/types.h>
17081#include <sys/socket.h>
17082main()
17083{
17084 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17085 exit(1);
17086 else
17087 exit(0);
17088}
17089
Martin v. Löwis11437992002-04-12 09:54:03 +000017090_ACEOF
17091rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017092if { (ac_try="$ac_link"
17093case "(($ac_try" in
17094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17095 *) ac_try_echo=$ac_try;;
17096esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017098 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017099 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017101 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017102 { (case "(($ac_try" in
17103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17104 *) ac_try_echo=$ac_try;;
17105esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017107 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017108 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017110 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017111 { echo "$as_me:$LINENO: result: yes" >&5
17112echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017113 ipv6=yes
17114else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017115 echo "$as_me: program exited with status $ac_status" >&5
17116echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017117sed 's/^/| /' conftest.$ac_ext >&5
17118
Martin v. Löwis11437992002-04-12 09:54:03 +000017119( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017120{ echo "$as_me:$LINENO: result: no" >&5
17121echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017122 ipv6=no
17123fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017124rm -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 +000017125fi
17126
Martin v. Löwiseba40652007-08-30 20:10:57 +000017127
17128
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017129if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017130 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17131echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017132 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017133/* confdefs.h. */
17134_ACEOF
17135cat confdefs.h >>conftest.$ac_ext
17136cat >>conftest.$ac_ext <<_ACEOF
17137/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017138#include <sys/types.h>
17139#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017140int
17141main ()
17142{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017143struct sockaddr_in6 x;
17144x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017145 ;
17146 return 0;
17147}
17148_ACEOF
17149rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017150if { (ac_try="$ac_compile"
17151case "(($ac_try" in
17152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17153 *) ac_try_echo=$ac_try;;
17154esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017156 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017157 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017158 grep -v '^ *+' conftest.er1 >conftest.err
17159 rm -f conftest.er1
17160 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017162 (exit $ac_status); } && {
17163 test -z "$ac_c_werror_flag" ||
17164 test ! -s conftest.err
17165 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017166 { echo "$as_me:$LINENO: result: yes" >&5
17167echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017168 ipv6=yes
17169else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017170 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017171sed 's/^/| /' conftest.$ac_ext >&5
17172
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017173 { echo "$as_me:$LINENO: result: no" >&5
17174echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017175 ipv6=no
17176fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017177
17178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017179fi
17180
17181if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017182 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017183#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017184_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017185
17186fi
17187
Martin v. Löwiseba40652007-08-30 20:10:57 +000017188fi
17189
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017190
17191ipv6type=unknown
17192ipv6lib=none
17193ipv6trylibc=no
17194
17195if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017196 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17197echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017198 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17199 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017200 case $i in
17201 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017202 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017203/* confdefs.h. */
17204_ACEOF
17205cat confdefs.h >>conftest.$ac_ext
17206cat >>conftest.$ac_ext <<_ACEOF
17207/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017208
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017209#include <netinet/in.h>
17210#ifdef IPV6_INRIA_VERSION
17211yes
17212#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017213_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017214if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017215 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017216 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017217fi
17218rm -f conftest*
17219
17220 ;;
17221 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017222 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017223/* confdefs.h. */
17224_ACEOF
17225cat confdefs.h >>conftest.$ac_ext
17226cat >>conftest.$ac_ext <<_ACEOF
17227/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017228
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017229#include <netinet/in.h>
17230#ifdef __KAME__
17231yes
17232#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017233_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017234if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017235 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017236 ipv6type=$i;
17237 ipv6lib=inet6
17238 ipv6libdir=/usr/local/v6/lib
17239 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017240fi
17241rm -f conftest*
17242
17243 ;;
17244 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017245 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017246/* confdefs.h. */
17247_ACEOF
17248cat confdefs.h >>conftest.$ac_ext
17249cat >>conftest.$ac_ext <<_ACEOF
17250/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017251
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017252#include <features.h>
17253#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17254yes
17255#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017256_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017257if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017258 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017259 ipv6type=$i;
17260 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017261fi
17262rm -f conftest*
17263
17264 ;;
17265 linux-inet6)
17266 if test -d /usr/inet6; then
17267 ipv6type=$i
17268 ipv6lib=inet6
17269 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017270 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017271 fi
17272 ;;
17273 solaris)
17274 if test -f /etc/netconfig; then
17275 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17276 ipv6type=$i
17277 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017278 fi
17279 fi
17280 ;;
17281 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017282 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017283/* confdefs.h. */
17284_ACEOF
17285cat confdefs.h >>conftest.$ac_ext
17286cat >>conftest.$ac_ext <<_ACEOF
17287/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017288
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017289#include <sys/param.h>
17290#ifdef _TOSHIBA_INET6
17291yes
17292#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017293_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017294if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017295 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017296 ipv6type=$i;
17297 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017298 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017299fi
17300rm -f conftest*
17301
17302 ;;
17303 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017304 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017305/* confdefs.h. */
17306_ACEOF
17307cat confdefs.h >>conftest.$ac_ext
17308cat >>conftest.$ac_ext <<_ACEOF
17309/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017310
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017311#include </usr/local/v6/include/sys/v6config.h>
17312#ifdef __V6D__
17313yes
17314#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017315_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017316if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017317 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017318 ipv6type=$i;
17319 ipv6lib=v6;
17320 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017321 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017322fi
17323rm -f conftest*
17324
17325 ;;
17326 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017327 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017328/* confdefs.h. */
17329_ACEOF
17330cat confdefs.h >>conftest.$ac_ext
17331cat >>conftest.$ac_ext <<_ACEOF
17332/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017333
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017334#include <sys/param.h>
17335#ifdef _ZETA_MINAMI_INET6
17336yes
17337#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017338_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017339if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017340 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017341 ipv6type=$i;
17342 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017343 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017344fi
17345rm -f conftest*
17346
17347 ;;
17348 esac
17349 if test "$ipv6type" != "unknown"; then
17350 break
17351 fi
17352 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017353 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17354echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017355fi
17356
17357if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17358 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17359 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17360 echo "using lib$ipv6lib"
17361 else
17362 if test $ipv6trylibc = "yes"; then
17363 echo "using libc"
17364 else
17365 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17366 echo "You need to fetch lib$ipv6lib.a from appropriate"
17367 echo 'ipv6 kit and compile beforehand.'
17368 exit 1
17369 fi
17370 fi
17371fi
17372
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017373{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17374echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017375cat >conftest.$ac_ext <<_ACEOF
17376/* confdefs.h. */
17377_ACEOF
17378cat confdefs.h >>conftest.$ac_ext
17379cat >>conftest.$ac_ext <<_ACEOF
17380/* end confdefs.h. */
17381#include <Carbon/Carbon.h>
17382int
17383main ()
17384{
17385FSIORefNum fRef = 0
17386 ;
17387 return 0;
17388}
17389_ACEOF
17390rm -f conftest.$ac_objext
17391if { (ac_try="$ac_compile"
17392case "(($ac_try" in
17393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17394 *) ac_try_echo=$ac_try;;
17395esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017397 (eval "$ac_compile") 2>conftest.er1
17398 ac_status=$?
17399 grep -v '^ *+' conftest.er1 >conftest.err
17400 rm -f conftest.er1
17401 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017403 (exit $ac_status); } && {
17404 test -z "$ac_c_werror_flag" ||
17405 test ! -s conftest.err
17406 } && test -s conftest.$ac_objext; then
17407
17408cat >>confdefs.h <<\_ACEOF
17409#define HAVE_OSX105_SDK 1
17410_ACEOF
17411
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017412 { echo "$as_me:$LINENO: result: yes" >&5
17413echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017414else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017415 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017416sed 's/^/| /' conftest.$ac_ext >&5
17417
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017418 { echo "$as_me:$LINENO: result: no" >&5
17419echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017420
17421fi
17422
17423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17424
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017425# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017426{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17427echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017428
Martin v. Löwiseba40652007-08-30 20:10:57 +000017429# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017430if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017431 withval=$with_doc_strings;
17432fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017433
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017434
17435if test -z "$with_doc_strings"
17436then with_doc_strings="yes"
17437fi
17438if test "$with_doc_strings" != "no"
17439then
17440
17441cat >>confdefs.h <<\_ACEOF
17442#define WITH_DOC_STRINGS 1
17443_ACEOF
17444
17445fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017446{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17447echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017448
Neil Schemenauera35c6882001-02-27 04:45:05 +000017449# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017450{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17451echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017452
Martin v. Löwiseba40652007-08-30 20:10:57 +000017453# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017454if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017455 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017456if test "$withval" != no
17457then
17458
17459cat >>confdefs.h <<\_ACEOF
17460#define WITH_TSC 1
17461_ACEOF
17462
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017463 { echo "$as_me:$LINENO: result: yes" >&5
17464echo "${ECHO_T}yes" >&6; }
17465else { echo "$as_me:$LINENO: result: no" >&5
17466echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017467fi
17468else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017469 { echo "$as_me:$LINENO: result: no" >&5
17470echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017471fi
17472
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017473
17474# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017475{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17476echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017477
Martin v. Löwiseba40652007-08-30 20:10:57 +000017478# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017479if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017480 withval=$with_pymalloc;
17481fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017482
Neil Schemenauera35c6882001-02-27 04:45:05 +000017483
Neil Schemenauer16c22972002-03-22 15:34:49 +000017484if test -z "$with_pymalloc"
17485then with_pymalloc="yes"
17486fi
17487if test "$with_pymalloc" != "no"
17488then
Martin v. Löwis11437992002-04-12 09:54:03 +000017489
17490cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017491#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017492_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017493
17494fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017495{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17496echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017497
Barry Warsawef82cd72000-06-30 16:21:01 +000017498# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017499{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17500echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017501
Martin v. Löwiseba40652007-08-30 20:10:57 +000017502# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017503if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017504 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017505if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017506then
17507
17508cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017509#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017510_ACEOF
17511
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017512 { echo "$as_me:$LINENO: result: yes" >&5
17513echo "${ECHO_T}yes" >&6; }
17514else { echo "$as_me:$LINENO: result: no" >&5
17515echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017516fi
17517else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017518 { echo "$as_me:$LINENO: result: no" >&5
17519echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017520fi
17521
Barry Warsawef82cd72000-06-30 16:21:01 +000017522
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017523# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017524
Guido van Rossum98935bf2001-09-05 19:13:16 +000017525DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017526
Guido van Rossume97ee181999-12-20 21:27:22 +000017527# the dlopen() function means we might want to use dynload_shlib.o. some
17528# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017529
Thomas Wouters3a584202000-08-05 23:28:51 +000017530for ac_func in dlopen
17531do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017532as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17533{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17534echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017535if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017536 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017537else
Martin v. Löwis11437992002-04-12 09:54:03 +000017538 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017539/* confdefs.h. */
17540_ACEOF
17541cat confdefs.h >>conftest.$ac_ext
17542cat >>conftest.$ac_ext <<_ACEOF
17543/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017544/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17545 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17546#define $ac_func innocuous_$ac_func
17547
Guido van Rossume97ee181999-12-20 21:27:22 +000017548/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017549 which can conflict with char $ac_func (); below.
17550 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017551 <limits.h> exists even on freestanding compilers. */
17552
17553#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017554# include <limits.h>
17555#else
17556# include <assert.h>
17557#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017558
17559#undef $ac_func
17560
Martin v. Löwiseba40652007-08-30 20:10:57 +000017561/* Override any GCC internal prototype to avoid an error.
17562 Use char because int might match the return type of a GCC
17563 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017564#ifdef __cplusplus
17565extern "C"
17566#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017567char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017568/* The GNU C library defines this for functions which it implements
17569 to always fail with ENOSYS. Some functions are actually named
17570 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017571#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017572choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017573#endif
17574
Skip Montanaro6dead952003-09-25 14:50:04 +000017575int
17576main ()
17577{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017578return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017579 ;
17580 return 0;
17581}
17582_ACEOF
17583rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017584if { (ac_try="$ac_link"
17585case "(($ac_try" in
17586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17587 *) ac_try_echo=$ac_try;;
17588esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017590 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017591 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017592 grep -v '^ *+' conftest.er1 >conftest.err
17593 rm -f conftest.er1
17594 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017596 (exit $ac_status); } && {
17597 test -z "$ac_c_werror_flag" ||
17598 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017599 } && test -s conftest$ac_exeext &&
17600 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017601 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017602else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017604sed 's/^/| /' conftest.$ac_ext >&5
17605
Martin v. Löwiseba40652007-08-30 20:10:57 +000017606 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017607fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017608
17609rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017610 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017611fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017612ac_res=`eval echo '${'$as_ac_var'}'`
17613 { echo "$as_me:$LINENO: result: $ac_res" >&5
17614echo "${ECHO_T}$ac_res" >&6; }
17615if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017616 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017617#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017618_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017619
Guido van Rossume97ee181999-12-20 21:27:22 +000017620fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017621done
Guido van Rossume97ee181999-12-20 21:27:22 +000017622
Michael W. Hudson54241132001-12-07 15:38:26 +000017623
Guido van Rossume97ee181999-12-20 21:27:22 +000017624# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17625# loading of modules.
17626
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017627{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17628echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017629if test -z "$DYNLOADFILE"
17630then
17631 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017632 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17633 if test "$ac_cv_func_dlopen" = yes
17634 then DYNLOADFILE="dynload_shlib.o"
17635 else DYNLOADFILE="dynload_aix.o"
17636 fi
17637 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017638 BeOS*) DYNLOADFILE="dynload_beos.o";;
17639 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000017640 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17641 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017642 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017643 *)
17644 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17645 # out any dynamic loading
17646 if test "$ac_cv_func_dlopen" = yes
17647 then DYNLOADFILE="dynload_shlib.o"
17648 else DYNLOADFILE="dynload_stub.o"
17649 fi
17650 ;;
17651 esac
17652fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017653{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17654echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017655if test "$DYNLOADFILE" != "dynload_stub.o"
17656then
Martin v. Löwis11437992002-04-12 09:54:03 +000017657
17658cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017659#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017660_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017661
17662fi
17663
Neil Schemenauer4e425612001-06-19 15:44:15 +000017664# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17665
Michael W. Hudson54241132001-12-07 15:38:26 +000017666
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017667{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17668echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017669if test -z "$MACHDEP_OBJS"
17670then
Jack Jansene578a632001-08-15 01:27:14 +000017671 MACHDEP_OBJS=$extra_machdep_objs
17672else
17673 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017674fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017675{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17676echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017677
Guido van Rossum627b2d71993-12-24 10:39:16 +000017678# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
Martin v. Löwisd6320502004-08-12 13:45:08 +000017750
Martin v. Löwisc3001752005-01-23 09:27:24 +000017751
17752
Neal Norwitz05a45592006-03-20 06:30:08 +000017753
17754
Martin v. Löwis382abef2007-02-19 10:55:19 +000017755
17756
Christian Heimes36281872007-11-30 21:11:28 +000017757
Martin v. Löwisaef18b12008-03-24 13:31:16 +000017758
17759
Jesse Noller355b1262009-04-02 00:03:28 +000017760
17761
17762
17763
Martin v. Löwisaef18b12008-03-24 13:31:16 +000017764for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17765 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017766 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000017767 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017768 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017769 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017770 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000017771 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17772 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000017773 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000017774 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017775 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000017776 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017777do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017778as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17779{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17780echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017781if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017782 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017783else
Martin v. Löwis11437992002-04-12 09:54:03 +000017784 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017785/* confdefs.h. */
17786_ACEOF
17787cat confdefs.h >>conftest.$ac_ext
17788cat >>conftest.$ac_ext <<_ACEOF
17789/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017790/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17791 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17792#define $ac_func innocuous_$ac_func
17793
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017794/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017795 which can conflict with char $ac_func (); below.
17796 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017797 <limits.h> exists even on freestanding compilers. */
17798
17799#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017800# include <limits.h>
17801#else
17802# include <assert.h>
17803#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017804
17805#undef $ac_func
17806
Martin v. Löwiseba40652007-08-30 20:10:57 +000017807/* Override any GCC internal prototype to avoid an error.
17808 Use char because int might match the return type of a GCC
17809 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017810#ifdef __cplusplus
17811extern "C"
17812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017813char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017814/* The GNU C library defines this for functions which it implements
17815 to always fail with ENOSYS. Some functions are actually named
17816 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017817#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017818choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017819#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017820
Skip Montanaro6dead952003-09-25 14:50:04 +000017821int
17822main ()
17823{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017824return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017825 ;
17826 return 0;
17827}
17828_ACEOF
17829rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017830if { (ac_try="$ac_link"
17831case "(($ac_try" in
17832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17833 *) ac_try_echo=$ac_try;;
17834esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017836 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017838 grep -v '^ *+' conftest.er1 >conftest.err
17839 rm -f conftest.er1
17840 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017842 (exit $ac_status); } && {
17843 test -z "$ac_c_werror_flag" ||
17844 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017845 } && test -s conftest$ac_exeext &&
17846 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017847 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017848else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017850sed 's/^/| /' conftest.$ac_ext >&5
17851
Martin v. Löwiseba40652007-08-30 20:10:57 +000017852 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017854
17855rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017856 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017857fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017858ac_res=`eval echo '${'$as_ac_var'}'`
17859 { echo "$as_me:$LINENO: result: $ac_res" >&5
17860echo "${ECHO_T}$ac_res" >&6; }
17861if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017862 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017863#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017864_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017865
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017866fi
17867done
17868
Michael W. Hudson54241132001-12-07 15:38:26 +000017869
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017870# For some functions, having a definition is not sufficient, since
17871# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017872{ echo "$as_me:$LINENO: checking for chroot" >&5
17873echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017874cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017875/* confdefs.h. */
17876_ACEOF
17877cat confdefs.h >>conftest.$ac_ext
17878cat >>conftest.$ac_ext <<_ACEOF
17879/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017880#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017881int
17882main ()
17883{
17884void *x=chroot
17885 ;
17886 return 0;
17887}
17888_ACEOF
17889rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017890if { (ac_try="$ac_compile"
17891case "(($ac_try" in
17892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17893 *) ac_try_echo=$ac_try;;
17894esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017896 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017897 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017898 grep -v '^ *+' conftest.er1 >conftest.err
17899 rm -f conftest.er1
17900 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017902 (exit $ac_status); } && {
17903 test -z "$ac_c_werror_flag" ||
17904 test ! -s conftest.err
17905 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017906
17907cat >>confdefs.h <<\_ACEOF
17908#define HAVE_CHROOT 1
17909_ACEOF
17910
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017911 { echo "$as_me:$LINENO: result: yes" >&5
17912echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017913else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017915sed 's/^/| /' conftest.$ac_ext >&5
17916
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017917 { echo "$as_me:$LINENO: result: no" >&5
17918echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017919
17920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017921
17922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017923{ echo "$as_me:$LINENO: checking for link" >&5
17924echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017925cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017926/* confdefs.h. */
17927_ACEOF
17928cat confdefs.h >>conftest.$ac_ext
17929cat >>conftest.$ac_ext <<_ACEOF
17930/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017931#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017932int
17933main ()
17934{
17935void *x=link
17936 ;
17937 return 0;
17938}
17939_ACEOF
17940rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017941if { (ac_try="$ac_compile"
17942case "(($ac_try" in
17943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17944 *) ac_try_echo=$ac_try;;
17945esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017947 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017949 grep -v '^ *+' conftest.er1 >conftest.err
17950 rm -f conftest.er1
17951 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017953 (exit $ac_status); } && {
17954 test -z "$ac_c_werror_flag" ||
17955 test ! -s conftest.err
17956 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017957
17958cat >>confdefs.h <<\_ACEOF
17959#define HAVE_LINK 1
17960_ACEOF
17961
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017962 { echo "$as_me:$LINENO: result: yes" >&5
17963echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +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
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017968 { echo "$as_me:$LINENO: result: no" >&5
17969echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017970
17971fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017972
17973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017974{ echo "$as_me:$LINENO: checking for symlink" >&5
17975echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017976cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017977/* confdefs.h. */
17978_ACEOF
17979cat confdefs.h >>conftest.$ac_ext
17980cat >>conftest.$ac_ext <<_ACEOF
17981/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017982#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017983int
17984main ()
17985{
17986void *x=symlink
17987 ;
17988 return 0;
17989}
17990_ACEOF
17991rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017992if { (ac_try="$ac_compile"
17993case "(($ac_try" in
17994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17995 *) ac_try_echo=$ac_try;;
17996esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017998 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017999 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018000 grep -v '^ *+' conftest.er1 >conftest.err
18001 rm -f conftest.er1
18002 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018004 (exit $ac_status); } && {
18005 test -z "$ac_c_werror_flag" ||
18006 test ! -s conftest.err
18007 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018008
18009cat >>confdefs.h <<\_ACEOF
18010#define HAVE_SYMLINK 1
18011_ACEOF
18012
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018013 { echo "$as_me:$LINENO: result: yes" >&5
18014echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018015else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018017sed 's/^/| /' conftest.$ac_ext >&5
18018
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018019 { echo "$as_me:$LINENO: result: no" >&5
18020echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018021
18022fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018023
18024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018025{ echo "$as_me:$LINENO: checking for fchdir" >&5
18026echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018027cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018028/* confdefs.h. */
18029_ACEOF
18030cat confdefs.h >>conftest.$ac_ext
18031cat >>conftest.$ac_ext <<_ACEOF
18032/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018033#include <unistd.h>
18034int
18035main ()
18036{
18037void *x=fchdir
18038 ;
18039 return 0;
18040}
18041_ACEOF
18042rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018043if { (ac_try="$ac_compile"
18044case "(($ac_try" in
18045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18046 *) ac_try_echo=$ac_try;;
18047esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018049 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018051 grep -v '^ *+' conftest.er1 >conftest.err
18052 rm -f conftest.er1
18053 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018055 (exit $ac_status); } && {
18056 test -z "$ac_c_werror_flag" ||
18057 test ! -s conftest.err
18058 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018059
18060cat >>confdefs.h <<\_ACEOF
18061#define HAVE_FCHDIR 1
18062_ACEOF
18063
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018064 { echo "$as_me:$LINENO: result: yes" >&5
18065echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018066else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018067 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018068sed 's/^/| /' conftest.$ac_ext >&5
18069
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018070 { echo "$as_me:$LINENO: result: no" >&5
18071echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018072
18073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018074
18075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018076{ echo "$as_me:$LINENO: checking for fsync" >&5
18077echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018078cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018079/* confdefs.h. */
18080_ACEOF
18081cat confdefs.h >>conftest.$ac_ext
18082cat >>conftest.$ac_ext <<_ACEOF
18083/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018084#include <unistd.h>
18085int
18086main ()
18087{
18088void *x=fsync
18089 ;
18090 return 0;
18091}
18092_ACEOF
18093rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018094if { (ac_try="$ac_compile"
18095case "(($ac_try" in
18096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18097 *) ac_try_echo=$ac_try;;
18098esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018100 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018101 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018102 grep -v '^ *+' conftest.er1 >conftest.err
18103 rm -f conftest.er1
18104 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018106 (exit $ac_status); } && {
18107 test -z "$ac_c_werror_flag" ||
18108 test ! -s conftest.err
18109 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018110
18111cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018112#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018113_ACEOF
18114
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018115 { echo "$as_me:$LINENO: result: yes" >&5
18116echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018117else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018118 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018119sed 's/^/| /' conftest.$ac_ext >&5
18120
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018121 { echo "$as_me:$LINENO: result: no" >&5
18122echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018123
18124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018125
18126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018127{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18128echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018129cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018130/* confdefs.h. */
18131_ACEOF
18132cat confdefs.h >>conftest.$ac_ext
18133cat >>conftest.$ac_ext <<_ACEOF
18134/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018135#include <unistd.h>
18136int
18137main ()
18138{
18139void *x=fdatasync
18140 ;
18141 return 0;
18142}
18143_ACEOF
18144rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018145if { (ac_try="$ac_compile"
18146case "(($ac_try" in
18147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18148 *) ac_try_echo=$ac_try;;
18149esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018151 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018152 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018153 grep -v '^ *+' conftest.er1 >conftest.err
18154 rm -f conftest.er1
18155 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018157 (exit $ac_status); } && {
18158 test -z "$ac_c_werror_flag" ||
18159 test ! -s conftest.err
18160 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018161
18162cat >>confdefs.h <<\_ACEOF
18163#define HAVE_FDATASYNC 1
18164_ACEOF
18165
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018166 { echo "$as_me:$LINENO: result: yes" >&5
18167echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018168else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018170sed 's/^/| /' conftest.$ac_ext >&5
18171
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018172 { echo "$as_me:$LINENO: result: no" >&5
18173echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018174
18175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018176
18177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018178{ echo "$as_me:$LINENO: checking for epoll" >&5
18179echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018180cat >conftest.$ac_ext <<_ACEOF
18181/* confdefs.h. */
18182_ACEOF
18183cat confdefs.h >>conftest.$ac_ext
18184cat >>conftest.$ac_ext <<_ACEOF
18185/* end confdefs.h. */
18186#include <sys/epoll.h>
18187int
18188main ()
18189{
18190void *x=epoll_create
18191 ;
18192 return 0;
18193}
18194_ACEOF
18195rm -f conftest.$ac_objext
18196if { (ac_try="$ac_compile"
18197case "(($ac_try" in
18198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18199 *) ac_try_echo=$ac_try;;
18200esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018202 (eval "$ac_compile") 2>conftest.er1
18203 ac_status=$?
18204 grep -v '^ *+' conftest.er1 >conftest.err
18205 rm -f conftest.er1
18206 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018208 (exit $ac_status); } && {
18209 test -z "$ac_c_werror_flag" ||
18210 test ! -s conftest.err
18211 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018212
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018213cat >>confdefs.h <<\_ACEOF
18214#define HAVE_EPOLL 1
18215_ACEOF
18216
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018217 { echo "$as_me:$LINENO: result: yes" >&5
18218echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018219else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018220 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018221sed 's/^/| /' conftest.$ac_ext >&5
18222
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018223 { echo "$as_me:$LINENO: result: no" >&5
18224echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018225
18226fi
18227
18228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018229{ echo "$as_me:$LINENO: checking for kqueue" >&5
18230echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018231cat >conftest.$ac_ext <<_ACEOF
18232/* confdefs.h. */
18233_ACEOF
18234cat confdefs.h >>conftest.$ac_ext
18235cat >>conftest.$ac_ext <<_ACEOF
18236/* end confdefs.h. */
18237
18238#include <sys/types.h>
18239#include <sys/event.h>
18240
18241int
18242main ()
18243{
18244int x=kqueue()
18245 ;
18246 return 0;
18247}
18248_ACEOF
18249rm -f conftest.$ac_objext
18250if { (ac_try="$ac_compile"
18251case "(($ac_try" in
18252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18253 *) ac_try_echo=$ac_try;;
18254esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018256 (eval "$ac_compile") 2>conftest.er1
18257 ac_status=$?
18258 grep -v '^ *+' conftest.er1 >conftest.err
18259 rm -f conftest.er1
18260 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018262 (exit $ac_status); } && {
18263 test -z "$ac_c_werror_flag" ||
18264 test ! -s conftest.err
18265 } && test -s conftest.$ac_objext; then
18266
18267cat >>confdefs.h <<\_ACEOF
18268#define HAVE_KQUEUE 1
18269_ACEOF
18270
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018271 { echo "$as_me:$LINENO: result: yes" >&5
18272echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018273else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018274 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018275sed 's/^/| /' conftest.$ac_ext >&5
18276
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018277 { echo "$as_me:$LINENO: result: no" >&5
18278echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018279
18280fi
18281
18282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018283# On some systems (eg. FreeBSD 5), we would find a definition of the
18284# functions ctermid_r, setgroups in the library, but no prototype
18285# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18286# address to avoid compiler warnings and potential miscompilations
18287# because of the missing prototypes.
18288
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018289{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18290echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018291cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018292/* confdefs.h. */
18293_ACEOF
18294cat confdefs.h >>conftest.$ac_ext
18295cat >>conftest.$ac_ext <<_ACEOF
18296/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018297
18298#include "confdefs.h"
18299#include <stdio.h>
18300
Martin v. Löwisd5843682002-11-21 20:41:28 +000018301int
18302main ()
18303{
18304void* p = ctermid_r
18305 ;
18306 return 0;
18307}
18308_ACEOF
18309rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018310if { (ac_try="$ac_compile"
18311case "(($ac_try" in
18312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18313 *) ac_try_echo=$ac_try;;
18314esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018316 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018317 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018318 grep -v '^ *+' conftest.er1 >conftest.err
18319 rm -f conftest.er1
18320 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018322 (exit $ac_status); } && {
18323 test -z "$ac_c_werror_flag" ||
18324 test ! -s conftest.err
18325 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018326
18327cat >>confdefs.h <<\_ACEOF
18328#define HAVE_CTERMID_R 1
18329_ACEOF
18330
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018331 { echo "$as_me:$LINENO: result: yes" >&5
18332echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018333else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018335sed 's/^/| /' conftest.$ac_ext >&5
18336
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018337 { echo "$as_me:$LINENO: result: no" >&5
18338echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018339
18340fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018341
Martin v. Löwiseba40652007-08-30 20:10:57 +000018342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18343
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018344{ echo "$as_me:$LINENO: checking for flock" >&5
18345echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018346cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018347/* confdefs.h. */
18348_ACEOF
18349cat confdefs.h >>conftest.$ac_ext
18350cat >>conftest.$ac_ext <<_ACEOF
18351/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018352
18353#include "confdefs.h"
18354#include <sys/file.h>
18355
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018356int
18357main ()
18358{
18359void* p = flock
18360 ;
18361 return 0;
18362}
18363_ACEOF
18364rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018365if { (ac_try="$ac_compile"
18366case "(($ac_try" in
18367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18368 *) ac_try_echo=$ac_try;;
18369esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018371 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018372 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018373 grep -v '^ *+' conftest.er1 >conftest.err
18374 rm -f conftest.er1
18375 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018377 (exit $ac_status); } && {
18378 test -z "$ac_c_werror_flag" ||
18379 test ! -s conftest.err
18380 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018381
18382cat >>confdefs.h <<\_ACEOF
18383#define HAVE_FLOCK 1
18384_ACEOF
18385
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018386 { echo "$as_me:$LINENO: result: yes" >&5
18387echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018388else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018389 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018390sed 's/^/| /' conftest.$ac_ext >&5
18391
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018392 { echo "$as_me:$LINENO: result: no" >&5
18393echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018394
18395fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018396
Martin v. Löwiseba40652007-08-30 20:10:57 +000018397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18398
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018399{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18400echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018401cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018402/* confdefs.h. */
18403_ACEOF
18404cat confdefs.h >>conftest.$ac_ext
18405cat >>conftest.$ac_ext <<_ACEOF
18406/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018407
18408#include "confdefs.h"
18409#include <unistd.h>
18410
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018411int
18412main ()
18413{
18414void* p = getpagesize
18415 ;
18416 return 0;
18417}
18418_ACEOF
18419rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018420if { (ac_try="$ac_compile"
18421case "(($ac_try" in
18422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18423 *) ac_try_echo=$ac_try;;
18424esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018426 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018427 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018428 grep -v '^ *+' conftest.er1 >conftest.err
18429 rm -f conftest.er1
18430 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018432 (exit $ac_status); } && {
18433 test -z "$ac_c_werror_flag" ||
18434 test ! -s conftest.err
18435 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018436
18437cat >>confdefs.h <<\_ACEOF
18438#define HAVE_GETPAGESIZE 1
18439_ACEOF
18440
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018441 { echo "$as_me:$LINENO: result: yes" >&5
18442echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018443else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018445sed 's/^/| /' conftest.$ac_ext >&5
18446
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018447 { echo "$as_me:$LINENO: result: no" >&5
18448echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018449
18450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018451
18452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018453
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018454for ac_prog in true
18455do
18456 # Extract the first word of "$ac_prog", so it can be a program name with args.
18457set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018458{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18459echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018460if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018461 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018462else
18463 if test -n "$TRUE"; then
18464 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18465else
18466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18467for as_dir in $PATH
18468do
18469 IFS=$as_save_IFS
18470 test -z "$as_dir" && as_dir=.
18471 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018472 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 +000018473 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018474 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018475 break 2
18476 fi
18477done
18478done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018479IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018480
18481fi
18482fi
18483TRUE=$ac_cv_prog_TRUE
18484if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018485 { echo "$as_me:$LINENO: result: $TRUE" >&5
18486echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018487else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018488 { echo "$as_me:$LINENO: result: no" >&5
18489echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018490fi
18491
Martin v. Löwiseba40652007-08-30 20:10:57 +000018492
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018493 test -n "$TRUE" && break
18494done
18495test -n "$TRUE" || TRUE="/bin/true"
18496
18497
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018498{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18499echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018500if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018501 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018502else
18503 ac_check_lib_save_LIBS=$LIBS
18504LIBS="-lc $LIBS"
18505cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018506/* confdefs.h. */
18507_ACEOF
18508cat confdefs.h >>conftest.$ac_ext
18509cat >>conftest.$ac_ext <<_ACEOF
18510/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018511
Martin v. Löwiseba40652007-08-30 20:10:57 +000018512/* Override any GCC internal prototype to avoid an error.
18513 Use char because int might match the return type of a GCC
18514 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018515#ifdef __cplusplus
18516extern "C"
18517#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018518char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018519int
18520main ()
18521{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018522return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018523 ;
18524 return 0;
18525}
18526_ACEOF
18527rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018528if { (ac_try="$ac_link"
18529case "(($ac_try" in
18530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18531 *) ac_try_echo=$ac_try;;
18532esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018534 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018535 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018536 grep -v '^ *+' conftest.er1 >conftest.err
18537 rm -f conftest.er1
18538 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018540 (exit $ac_status); } && {
18541 test -z "$ac_c_werror_flag" ||
18542 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018543 } && test -s conftest$ac_exeext &&
18544 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018545 ac_cv_lib_c_inet_aton=yes
18546else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018548sed 's/^/| /' conftest.$ac_ext >&5
18549
Martin v. Löwiseba40652007-08-30 20:10:57 +000018550 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018552
18553rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018554 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018555LIBS=$ac_check_lib_save_LIBS
18556fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018557{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18558echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18559if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018560 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018561else
18562
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018563{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18564echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018565if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018566 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018567else
18568 ac_check_lib_save_LIBS=$LIBS
18569LIBS="-lresolv $LIBS"
18570cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018571/* confdefs.h. */
18572_ACEOF
18573cat confdefs.h >>conftest.$ac_ext
18574cat >>conftest.$ac_ext <<_ACEOF
18575/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018576
Martin v. Löwiseba40652007-08-30 20:10:57 +000018577/* Override any GCC internal prototype to avoid an error.
18578 Use char because int might match the return type of a GCC
18579 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018580#ifdef __cplusplus
18581extern "C"
18582#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018583char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018584int
18585main ()
18586{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018587return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018588 ;
18589 return 0;
18590}
18591_ACEOF
18592rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018593if { (ac_try="$ac_link"
18594case "(($ac_try" in
18595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18596 *) ac_try_echo=$ac_try;;
18597esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018599 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018600 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018601 grep -v '^ *+' conftest.er1 >conftest.err
18602 rm -f conftest.er1
18603 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018605 (exit $ac_status); } && {
18606 test -z "$ac_c_werror_flag" ||
18607 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018608 } && test -s conftest$ac_exeext &&
18609 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018610 ac_cv_lib_resolv_inet_aton=yes
18611else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018613sed 's/^/| /' conftest.$ac_ext >&5
18614
Martin v. Löwiseba40652007-08-30 20:10:57 +000018615 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018617
18618rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018619 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018620LIBS=$ac_check_lib_save_LIBS
18621fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018622{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18623echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18624if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018625 cat >>confdefs.h <<_ACEOF
18626#define HAVE_LIBRESOLV 1
18627_ACEOF
18628
18629 LIBS="-lresolv $LIBS"
18630
18631fi
18632
18633
18634fi
18635
18636
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018637# On Tru64, chflags seems to be present, but calling it will
18638# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018639{ echo "$as_me:$LINENO: checking for chflags" >&5
18640echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018641if test "${ac_cv_have_chflags+set}" = set; then
18642 echo $ECHO_N "(cached) $ECHO_C" >&6
18643else
18644 if test "$cross_compiling" = yes; then
18645 ac_cv_have_chflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018646else
18647 cat >conftest.$ac_ext <<_ACEOF
18648/* confdefs.h. */
18649_ACEOF
18650cat confdefs.h >>conftest.$ac_ext
18651cat >>conftest.$ac_ext <<_ACEOF
18652/* end confdefs.h. */
18653
18654#include <sys/stat.h>
18655#include <unistd.h>
18656int main(int argc, char*argv[])
18657{
18658 if(chflags(argv[0], 0) != 0)
18659 return 1;
18660 return 0;
18661}
18662
18663_ACEOF
18664rm -f conftest$ac_exeext
18665if { (ac_try="$ac_link"
18666case "(($ac_try" in
18667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18668 *) ac_try_echo=$ac_try;;
18669esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018671 (eval "$ac_link") 2>&5
18672 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018674 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18675 { (case "(($ac_try" in
18676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18677 *) ac_try_echo=$ac_try;;
18678esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018680 (eval "$ac_try") 2>&5
18681 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018683 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018684 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018685else
18686 echo "$as_me: program exited with status $ac_status" >&5
18687echo "$as_me: failed program was:" >&5
18688sed 's/^/| /' conftest.$ac_ext >&5
18689
18690( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018691ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018692fi
18693rm -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 +000018694fi
18695
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018696
18697
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018698fi
18699
18700{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18701echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
18702if test $ac_cv_have_chflags = yes
18703then
18704
18705cat >>confdefs.h <<\_ACEOF
18706#define HAVE_CHFLAGS 1
18707_ACEOF
18708
18709fi
18710
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018711{ echo "$as_me:$LINENO: checking for lchflags" >&5
18712echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018713if test "${ac_cv_have_lchflags+set}" = set; then
18714 echo $ECHO_N "(cached) $ECHO_C" >&6
18715else
18716 if test "$cross_compiling" = yes; then
18717 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018718else
18719 cat >conftest.$ac_ext <<_ACEOF
18720/* confdefs.h. */
18721_ACEOF
18722cat confdefs.h >>conftest.$ac_ext
18723cat >>conftest.$ac_ext <<_ACEOF
18724/* end confdefs.h. */
18725
18726#include <sys/stat.h>
18727#include <unistd.h>
18728int main(int argc, char*argv[])
18729{
18730 if(lchflags(argv[0], 0) != 0)
18731 return 1;
18732 return 0;
18733}
18734
18735_ACEOF
18736rm -f conftest$ac_exeext
18737if { (ac_try="$ac_link"
18738case "(($ac_try" in
18739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18740 *) ac_try_echo=$ac_try;;
18741esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018743 (eval "$ac_link") 2>&5
18744 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018746 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18747 { (case "(($ac_try" in
18748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18749 *) ac_try_echo=$ac_try;;
18750esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018752 (eval "$ac_try") 2>&5
18753 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018755 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018756 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018757else
18758 echo "$as_me: program exited with status $ac_status" >&5
18759echo "$as_me: failed program was:" >&5
18760sed 's/^/| /' conftest.$ac_ext >&5
18761
18762( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018763ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018764fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018765rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18766fi
18767
18768
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018769
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018770fi
18771
18772{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18773echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
18774if test $ac_cv_have_lchflags = yes
18775then
18776
18777cat >>confdefs.h <<\_ACEOF
18778#define HAVE_LCHFLAGS 1
18779_ACEOF
18780
18781fi
18782
Ronald Oussorenf8752642006-07-06 10:13:35 +000018783case $ac_sys_system/$ac_sys_release in
18784Darwin/*)
18785 _CUR_CFLAGS="${CFLAGS}"
18786 _CUR_LDFLAGS="${LDFLAGS}"
18787 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18788 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18789 ;;
18790esac
18791
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018792{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18793echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018794if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018795 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018796else
18797 ac_check_lib_save_LIBS=$LIBS
18798LIBS="-lz $LIBS"
18799cat >conftest.$ac_ext <<_ACEOF
18800/* confdefs.h. */
18801_ACEOF
18802cat confdefs.h >>conftest.$ac_ext
18803cat >>conftest.$ac_ext <<_ACEOF
18804/* end confdefs.h. */
18805
Martin v. Löwiseba40652007-08-30 20:10:57 +000018806/* Override any GCC internal prototype to avoid an error.
18807 Use char because int might match the return type of a GCC
18808 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018809#ifdef __cplusplus
18810extern "C"
18811#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018812char inflateCopy ();
18813int
18814main ()
18815{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018816return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018817 ;
18818 return 0;
18819}
18820_ACEOF
18821rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018822if { (ac_try="$ac_link"
18823case "(($ac_try" in
18824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18825 *) ac_try_echo=$ac_try;;
18826esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018828 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018829 ac_status=$?
18830 grep -v '^ *+' conftest.er1 >conftest.err
18831 rm -f conftest.er1
18832 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018834 (exit $ac_status); } && {
18835 test -z "$ac_c_werror_flag" ||
18836 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018837 } && test -s conftest$ac_exeext &&
18838 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018839 ac_cv_lib_z_inflateCopy=yes
18840else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018841 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018842sed 's/^/| /' conftest.$ac_ext >&5
18843
Martin v. Löwiseba40652007-08-30 20:10:57 +000018844 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018846
18847rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018848 conftest$ac_exeext conftest.$ac_ext
18849LIBS=$ac_check_lib_save_LIBS
18850fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018851{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18852echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18853if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018854
18855cat >>confdefs.h <<\_ACEOF
18856#define HAVE_ZLIB_COPY 1
18857_ACEOF
18858
18859fi
18860
18861
Ronald Oussorenf8752642006-07-06 10:13:35 +000018862case $ac_sys_system/$ac_sys_release in
18863Darwin/*)
18864 CFLAGS="${_CUR_CFLAGS}"
18865 LDFLAGS="${_CUR_LDFLAGS}"
18866 ;;
18867esac
18868
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018869{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18870echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018871cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018872/* confdefs.h. */
18873_ACEOF
18874cat confdefs.h >>conftest.$ac_ext
18875cat >>conftest.$ac_ext <<_ACEOF
18876/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018877
18878#include "confdefs.h"
18879#include <netdb.h>
18880
Martin v. Löwise9416172003-05-03 10:12:45 +000018881int
18882main ()
18883{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018884void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018885 ;
18886 return 0;
18887}
18888_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018889rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018890if { (ac_try="$ac_link"
18891case "(($ac_try" in
18892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18893 *) ac_try_echo=$ac_try;;
18894esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018896 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018897 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018898 grep -v '^ *+' conftest.er1 >conftest.err
18899 rm -f conftest.er1
18900 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018902 (exit $ac_status); } && {
18903 test -z "$ac_c_werror_flag" ||
18904 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018905 } && test -s conftest$ac_exeext &&
18906 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018907
18908cat >>confdefs.h <<\_ACEOF
18909#define HAVE_HSTRERROR 1
18910_ACEOF
18911
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018912 { echo "$as_me:$LINENO: result: yes" >&5
18913echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018914else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018915 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018916sed 's/^/| /' conftest.$ac_ext >&5
18917
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018918 { echo "$as_me:$LINENO: result: no" >&5
18919echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018920
18921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018922
18923rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018924 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018925
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018926{ echo "$as_me:$LINENO: checking for inet_aton" >&5
18927echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018928cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018929/* confdefs.h. */
18930_ACEOF
18931cat confdefs.h >>conftest.$ac_ext
18932cat >>conftest.$ac_ext <<_ACEOF
18933/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018934
18935#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000018936#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018937#include <sys/socket.h>
18938#include <netinet/in.h>
18939#include <arpa/inet.h>
18940
Martin v. Löwise9416172003-05-03 10:12:45 +000018941int
18942main ()
18943{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018944void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018945 ;
18946 return 0;
18947}
18948_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018949rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018950if { (ac_try="$ac_link"
18951case "(($ac_try" in
18952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18953 *) ac_try_echo=$ac_try;;
18954esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018956 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018957 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018958 grep -v '^ *+' conftest.er1 >conftest.err
18959 rm -f conftest.er1
18960 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018962 (exit $ac_status); } && {
18963 test -z "$ac_c_werror_flag" ||
18964 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018965 } && test -s conftest$ac_exeext &&
18966 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018967
18968cat >>confdefs.h <<\_ACEOF
18969#define HAVE_INET_ATON 1
18970_ACEOF
18971
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018972 { echo "$as_me:$LINENO: result: yes" >&5
18973echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018974else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018975 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018976sed 's/^/| /' conftest.$ac_ext >&5
18977
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018978 { echo "$as_me:$LINENO: result: no" >&5
18979echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018980
18981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018982
18983rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018984 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018985
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018986{ echo "$as_me:$LINENO: checking for inet_pton" >&5
18987echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018988cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018989/* confdefs.h. */
18990_ACEOF
18991cat confdefs.h >>conftest.$ac_ext
18992cat >>conftest.$ac_ext <<_ACEOF
18993/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018994
18995#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018996#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018997#include <sys/socket.h>
18998#include <netinet/in.h>
18999#include <arpa/inet.h>
19000
Martin v. Löwise9416172003-05-03 10:12:45 +000019001int
19002main ()
19003{
19004void* p = inet_pton
19005 ;
19006 return 0;
19007}
19008_ACEOF
19009rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019010if { (ac_try="$ac_compile"
19011case "(($ac_try" in
19012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19013 *) ac_try_echo=$ac_try;;
19014esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019016 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019018 grep -v '^ *+' conftest.er1 >conftest.err
19019 rm -f conftest.er1
19020 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019022 (exit $ac_status); } && {
19023 test -z "$ac_c_werror_flag" ||
19024 test ! -s conftest.err
19025 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019026
19027cat >>confdefs.h <<\_ACEOF
19028#define HAVE_INET_PTON 1
19029_ACEOF
19030
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019031 { echo "$as_me:$LINENO: result: yes" >&5
19032echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019033else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019035sed 's/^/| /' conftest.$ac_ext >&5
19036
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019037 { echo "$as_me:$LINENO: result: no" >&5
19038echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019039
19040fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019041
19042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019043
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019044# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019045{ echo "$as_me:$LINENO: checking for setgroups" >&5
19046echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019047cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019048/* confdefs.h. */
19049_ACEOF
19050cat confdefs.h >>conftest.$ac_ext
19051cat >>conftest.$ac_ext <<_ACEOF
19052/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019053
19054#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019055#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019056#ifdef HAVE_GRP_H
19057#include <grp.h>
19058#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019059
Martin v. Löwisd5843682002-11-21 20:41:28 +000019060int
19061main ()
19062{
19063void* p = setgroups
19064 ;
19065 return 0;
19066}
19067_ACEOF
19068rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019069if { (ac_try="$ac_compile"
19070case "(($ac_try" in
19071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19072 *) ac_try_echo=$ac_try;;
19073esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019075 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019077 grep -v '^ *+' conftest.er1 >conftest.err
19078 rm -f conftest.er1
19079 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019081 (exit $ac_status); } && {
19082 test -z "$ac_c_werror_flag" ||
19083 test ! -s conftest.err
19084 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019085
19086cat >>confdefs.h <<\_ACEOF
19087#define HAVE_SETGROUPS 1
19088_ACEOF
19089
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019090 { echo "$as_me:$LINENO: result: yes" >&5
19091echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019092else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019093 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019094sed 's/^/| /' conftest.$ac_ext >&5
19095
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019096 { echo "$as_me:$LINENO: result: no" >&5
19097echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019098
19099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019100
19101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019102
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019103# check for openpty and forkpty
19104
Martin v. Löwis11437992002-04-12 09:54:03 +000019105
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019106for ac_func in openpty
19107do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019108as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19109{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19110echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019111if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019112 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019113else
Martin v. Löwis11437992002-04-12 09:54:03 +000019114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019115/* confdefs.h. */
19116_ACEOF
19117cat confdefs.h >>conftest.$ac_ext
19118cat >>conftest.$ac_ext <<_ACEOF
19119/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019120/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19121 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19122#define $ac_func innocuous_$ac_func
19123
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019124/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019125 which can conflict with char $ac_func (); below.
19126 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019127 <limits.h> exists even on freestanding compilers. */
19128
19129#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019130# include <limits.h>
19131#else
19132# include <assert.h>
19133#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019134
19135#undef $ac_func
19136
Martin v. Löwiseba40652007-08-30 20:10:57 +000019137/* Override any GCC internal prototype to avoid an error.
19138 Use char because int might match the return type of a GCC
19139 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019140#ifdef __cplusplus
19141extern "C"
19142#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019143char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019144/* The GNU C library defines this for functions which it implements
19145 to always fail with ENOSYS. Some functions are actually named
19146 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019147#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019148choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019149#endif
19150
Skip Montanaro6dead952003-09-25 14:50:04 +000019151int
19152main ()
19153{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019154return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019155 ;
19156 return 0;
19157}
19158_ACEOF
19159rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019160if { (ac_try="$ac_link"
19161case "(($ac_try" in
19162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19163 *) ac_try_echo=$ac_try;;
19164esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019166 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019167 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019168 grep -v '^ *+' conftest.er1 >conftest.err
19169 rm -f conftest.er1
19170 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019172 (exit $ac_status); } && {
19173 test -z "$ac_c_werror_flag" ||
19174 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019175 } && test -s conftest$ac_exeext &&
19176 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019177 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019178else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019180sed 's/^/| /' conftest.$ac_ext >&5
19181
Martin v. Löwiseba40652007-08-30 20:10:57 +000019182 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019184
19185rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019186 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019187fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019188ac_res=`eval echo '${'$as_ac_var'}'`
19189 { echo "$as_me:$LINENO: result: $ac_res" >&5
19190echo "${ECHO_T}$ac_res" >&6; }
19191if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019192 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019193#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019194_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019195
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019196else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019197 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19198echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019199if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019200 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019201else
Martin v. Löwis11437992002-04-12 09:54:03 +000019202 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019203LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019204cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019205/* confdefs.h. */
19206_ACEOF
19207cat confdefs.h >>conftest.$ac_ext
19208cat >>conftest.$ac_ext <<_ACEOF
19209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019210
Martin v. Löwiseba40652007-08-30 20:10:57 +000019211/* Override any GCC internal prototype to avoid an error.
19212 Use char because int might match the return type of a GCC
19213 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019214#ifdef __cplusplus
19215extern "C"
19216#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019217char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019218int
19219main ()
19220{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019221return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019222 ;
19223 return 0;
19224}
19225_ACEOF
19226rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019227if { (ac_try="$ac_link"
19228case "(($ac_try" in
19229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19230 *) ac_try_echo=$ac_try;;
19231esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019233 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019234 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019235 grep -v '^ *+' conftest.er1 >conftest.err
19236 rm -f conftest.er1
19237 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019239 (exit $ac_status); } && {
19240 test -z "$ac_c_werror_flag" ||
19241 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019242 } && test -s conftest$ac_exeext &&
19243 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019244 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019245else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019247sed 's/^/| /' conftest.$ac_ext >&5
19248
Martin v. Löwiseba40652007-08-30 20:10:57 +000019249 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019250fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019251
19252rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019253 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019254LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019255fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019256{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19257echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19258if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019259 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019260#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019261_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019262 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019263else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019264 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19265echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019266if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019267 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019268else
19269 ac_check_lib_save_LIBS=$LIBS
19270LIBS="-lbsd $LIBS"
19271cat >conftest.$ac_ext <<_ACEOF
19272/* confdefs.h. */
19273_ACEOF
19274cat confdefs.h >>conftest.$ac_ext
19275cat >>conftest.$ac_ext <<_ACEOF
19276/* end confdefs.h. */
19277
Martin v. Löwiseba40652007-08-30 20:10:57 +000019278/* Override any GCC internal prototype to avoid an error.
19279 Use char because int might match the return type of a GCC
19280 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019281#ifdef __cplusplus
19282extern "C"
19283#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019284char openpty ();
19285int
19286main ()
19287{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019288return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019289 ;
19290 return 0;
19291}
19292_ACEOF
19293rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019294if { (ac_try="$ac_link"
19295case "(($ac_try" in
19296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19297 *) ac_try_echo=$ac_try;;
19298esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019300 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019301 ac_status=$?
19302 grep -v '^ *+' conftest.er1 >conftest.err
19303 rm -f conftest.er1
19304 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019306 (exit $ac_status); } && {
19307 test -z "$ac_c_werror_flag" ||
19308 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019309 } && test -s conftest$ac_exeext &&
19310 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019311 ac_cv_lib_bsd_openpty=yes
19312else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019313 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019314sed 's/^/| /' conftest.$ac_ext >&5
19315
Martin v. Löwiseba40652007-08-30 20:10:57 +000019316 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019318
19319rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019320 conftest$ac_exeext conftest.$ac_ext
19321LIBS=$ac_check_lib_save_LIBS
19322fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019323{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19324echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19325if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019326 cat >>confdefs.h <<\_ACEOF
19327#define HAVE_OPENPTY 1
19328_ACEOF
19329 LIBS="$LIBS -lbsd"
19330fi
19331
19332
19333fi
19334
Fred Drake8cef4cf2000-06-28 16:40:38 +000019335
19336fi
19337done
19338
Martin v. Löwis11437992002-04-12 09:54:03 +000019339
Fred Drake8cef4cf2000-06-28 16:40:38 +000019340for ac_func in forkpty
19341do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019342as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19343{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19344echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019345if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019346 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019347else
Martin v. Löwis11437992002-04-12 09:54:03 +000019348 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019349/* confdefs.h. */
19350_ACEOF
19351cat confdefs.h >>conftest.$ac_ext
19352cat >>conftest.$ac_ext <<_ACEOF
19353/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019354/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19355 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19356#define $ac_func innocuous_$ac_func
19357
Fred Drake8cef4cf2000-06-28 16:40:38 +000019358/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019359 which can conflict with char $ac_func (); below.
19360 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019361 <limits.h> exists even on freestanding compilers. */
19362
19363#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019364# include <limits.h>
19365#else
19366# include <assert.h>
19367#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019368
19369#undef $ac_func
19370
Martin v. Löwiseba40652007-08-30 20:10:57 +000019371/* Override any GCC internal prototype to avoid an error.
19372 Use char because int might match the return type of a GCC
19373 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019374#ifdef __cplusplus
19375extern "C"
19376#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019377char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019378/* The GNU C library defines this for functions which it implements
19379 to always fail with ENOSYS. Some functions are actually named
19380 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019381#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019382choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019383#endif
19384
Skip Montanaro6dead952003-09-25 14:50:04 +000019385int
19386main ()
19387{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019388return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019389 ;
19390 return 0;
19391}
19392_ACEOF
19393rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019394if { (ac_try="$ac_link"
19395case "(($ac_try" in
19396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19397 *) ac_try_echo=$ac_try;;
19398esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019400 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019402 grep -v '^ *+' conftest.er1 >conftest.err
19403 rm -f conftest.er1
19404 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019406 (exit $ac_status); } && {
19407 test -z "$ac_c_werror_flag" ||
19408 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019409 } && test -s conftest$ac_exeext &&
19410 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019411 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019412else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019414sed 's/^/| /' conftest.$ac_ext >&5
19415
Martin v. Löwiseba40652007-08-30 20:10:57 +000019416 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019418
19419rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019420 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019421fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019422ac_res=`eval echo '${'$as_ac_var'}'`
19423 { echo "$as_me:$LINENO: result: $ac_res" >&5
19424echo "${ECHO_T}$ac_res" >&6; }
19425if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019426 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019427#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019428_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019429
Fred Drake8cef4cf2000-06-28 16:40:38 +000019430else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019431 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19432echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019433if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019434 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019435else
Martin v. Löwis11437992002-04-12 09:54:03 +000019436 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019437LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019438cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019439/* confdefs.h. */
19440_ACEOF
19441cat confdefs.h >>conftest.$ac_ext
19442cat >>conftest.$ac_ext <<_ACEOF
19443/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019444
Martin v. Löwiseba40652007-08-30 20:10:57 +000019445/* Override any GCC internal prototype to avoid an error.
19446 Use char because int might match the return type of a GCC
19447 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019448#ifdef __cplusplus
19449extern "C"
19450#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019451char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019452int
19453main ()
19454{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019455return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019456 ;
19457 return 0;
19458}
19459_ACEOF
19460rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019461if { (ac_try="$ac_link"
19462case "(($ac_try" in
19463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19464 *) ac_try_echo=$ac_try;;
19465esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019467 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019468 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019469 grep -v '^ *+' conftest.er1 >conftest.err
19470 rm -f conftest.er1
19471 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019473 (exit $ac_status); } && {
19474 test -z "$ac_c_werror_flag" ||
19475 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019476 } && test -s conftest$ac_exeext &&
19477 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019478 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019479else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019481sed 's/^/| /' conftest.$ac_ext >&5
19482
Martin v. Löwiseba40652007-08-30 20:10:57 +000019483 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019484fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019485
19486rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019487 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019488LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019489fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019490{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19491echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19492if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019493 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019494#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019495_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019496 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019497else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019498 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19499echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019500if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019501 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019502else
19503 ac_check_lib_save_LIBS=$LIBS
19504LIBS="-lbsd $LIBS"
19505cat >conftest.$ac_ext <<_ACEOF
19506/* confdefs.h. */
19507_ACEOF
19508cat confdefs.h >>conftest.$ac_ext
19509cat >>conftest.$ac_ext <<_ACEOF
19510/* end confdefs.h. */
19511
Martin v. Löwiseba40652007-08-30 20:10:57 +000019512/* Override any GCC internal prototype to avoid an error.
19513 Use char because int might match the return type of a GCC
19514 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019515#ifdef __cplusplus
19516extern "C"
19517#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019518char forkpty ();
19519int
19520main ()
19521{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019522return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019523 ;
19524 return 0;
19525}
19526_ACEOF
19527rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019528if { (ac_try="$ac_link"
19529case "(($ac_try" in
19530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19531 *) ac_try_echo=$ac_try;;
19532esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019534 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019535 ac_status=$?
19536 grep -v '^ *+' conftest.er1 >conftest.err
19537 rm -f conftest.er1
19538 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019540 (exit $ac_status); } && {
19541 test -z "$ac_c_werror_flag" ||
19542 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019543 } && test -s conftest$ac_exeext &&
19544 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019545 ac_cv_lib_bsd_forkpty=yes
19546else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019547 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019548sed 's/^/| /' conftest.$ac_ext >&5
19549
Martin v. Löwiseba40652007-08-30 20:10:57 +000019550 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019552
19553rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019554 conftest$ac_exeext conftest.$ac_ext
19555LIBS=$ac_check_lib_save_LIBS
19556fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019557{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19558echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19559if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019560 cat >>confdefs.h <<\_ACEOF
19561#define HAVE_FORKPTY 1
19562_ACEOF
19563 LIBS="$LIBS -lbsd"
19564fi
19565
19566
19567fi
19568
Fred Drake8cef4cf2000-06-28 16:40:38 +000019569
19570fi
19571done
19572
Jack Jansendd19cf82001-12-06 22:36:17 +000019573
Brett Cannonaa5778d2008-03-18 04:09:00 +000019574# Stuff for expat.
19575
19576for ac_func in memmove
19577do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019578as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19579{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19580echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000019581if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019582 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000019583else
19584 cat >conftest.$ac_ext <<_ACEOF
19585/* confdefs.h. */
19586_ACEOF
19587cat confdefs.h >>conftest.$ac_ext
19588cat >>conftest.$ac_ext <<_ACEOF
19589/* end confdefs.h. */
19590/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19591 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19592#define $ac_func innocuous_$ac_func
19593
19594/* System header to define __stub macros and hopefully few prototypes,
19595 which can conflict with char $ac_func (); below.
19596 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19597 <limits.h> exists even on freestanding compilers. */
19598
19599#ifdef __STDC__
19600# include <limits.h>
19601#else
19602# include <assert.h>
19603#endif
19604
19605#undef $ac_func
19606
19607/* Override any GCC internal prototype to avoid an error.
19608 Use char because int might match the return type of a GCC
19609 builtin and then its argument prototype would still apply. */
19610#ifdef __cplusplus
19611extern "C"
19612#endif
19613char $ac_func ();
19614/* The GNU C library defines this for functions which it implements
19615 to always fail with ENOSYS. Some functions are actually named
19616 something starting with __ and the normal name is an alias. */
19617#if defined __stub_$ac_func || defined __stub___$ac_func
19618choke me
19619#endif
19620
19621int
19622main ()
19623{
19624return $ac_func ();
19625 ;
19626 return 0;
19627}
19628_ACEOF
19629rm -f conftest.$ac_objext conftest$ac_exeext
19630if { (ac_try="$ac_link"
19631case "(($ac_try" in
19632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19633 *) ac_try_echo=$ac_try;;
19634esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019636 (eval "$ac_link") 2>conftest.er1
19637 ac_status=$?
19638 grep -v '^ *+' conftest.er1 >conftest.err
19639 rm -f conftest.er1
19640 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019642 (exit $ac_status); } && {
19643 test -z "$ac_c_werror_flag" ||
19644 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019645 } && test -s conftest$ac_exeext &&
19646 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000019647 eval "$as_ac_var=yes"
19648else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019649 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019650sed 's/^/| /' conftest.$ac_ext >&5
19651
19652 eval "$as_ac_var=no"
19653fi
19654
19655rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19656 conftest$ac_exeext conftest.$ac_ext
19657fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019658ac_res=`eval echo '${'$as_ac_var'}'`
19659 { echo "$as_me:$LINENO: result: $ac_res" >&5
19660echo "${ECHO_T}$ac_res" >&6; }
19661if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000019662 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019663#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000019664_ACEOF
19665
19666fi
19667done
19668
19669
Michael W. Hudson54241132001-12-07 15:38:26 +000019670# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019671
19672
19673
19674
19675
19676
Fred Drake8cef4cf2000-06-28 16:40:38 +000019677for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19678do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019679as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19680{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19681echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019682if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019683 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019684else
Martin v. Löwis11437992002-04-12 09:54:03 +000019685 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019686/* confdefs.h. */
19687_ACEOF
19688cat confdefs.h >>conftest.$ac_ext
19689cat >>conftest.$ac_ext <<_ACEOF
19690/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019691/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19692 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19693#define $ac_func innocuous_$ac_func
19694
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019695/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019696 which can conflict with char $ac_func (); below.
19697 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019698 <limits.h> exists even on freestanding compilers. */
19699
19700#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019701# include <limits.h>
19702#else
19703# include <assert.h>
19704#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019705
19706#undef $ac_func
19707
Martin v. Löwiseba40652007-08-30 20:10:57 +000019708/* Override any GCC internal prototype to avoid an error.
19709 Use char because int might match the return type of a GCC
19710 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019711#ifdef __cplusplus
19712extern "C"
19713#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019714char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019715/* The GNU C library defines this for functions which it implements
19716 to always fail with ENOSYS. Some functions are actually named
19717 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019718#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019719choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019720#endif
19721
Skip Montanaro6dead952003-09-25 14:50:04 +000019722int
19723main ()
19724{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019725return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019726 ;
19727 return 0;
19728}
19729_ACEOF
19730rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019731if { (ac_try="$ac_link"
19732case "(($ac_try" in
19733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19734 *) ac_try_echo=$ac_try;;
19735esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019737 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019739 grep -v '^ *+' conftest.er1 >conftest.err
19740 rm -f conftest.er1
19741 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019743 (exit $ac_status); } && {
19744 test -z "$ac_c_werror_flag" ||
19745 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019746 } && test -s conftest$ac_exeext &&
19747 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019748 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019749else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019750 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019751sed 's/^/| /' conftest.$ac_ext >&5
19752
Martin v. Löwiseba40652007-08-30 20:10:57 +000019753 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019754fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019755
19756rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019757 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019758fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019759ac_res=`eval echo '${'$as_ac_var'}'`
19760 { echo "$as_me:$LINENO: result: $ac_res" >&5
19761echo "${ECHO_T}$ac_res" >&6; }
19762if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019763 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019764#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019765_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019766
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019767fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019768done
19769
Michael W. Hudson54241132001-12-07 15:38:26 +000019770
Martin v. Löwis11437992002-04-12 09:54:03 +000019771
19772
19773
Brett Cannonaa5778d2008-03-18 04:09:00 +000019774for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019775do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019776as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19777{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19778echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019779if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019780 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019781else
Martin v. Löwis11437992002-04-12 09:54:03 +000019782 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019783/* confdefs.h. */
19784_ACEOF
19785cat confdefs.h >>conftest.$ac_ext
19786cat >>conftest.$ac_ext <<_ACEOF
19787/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019788/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19789 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19790#define $ac_func innocuous_$ac_func
19791
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019792/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019793 which can conflict with char $ac_func (); below.
19794 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019795 <limits.h> exists even on freestanding compilers. */
19796
19797#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019798# include <limits.h>
19799#else
19800# include <assert.h>
19801#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019802
19803#undef $ac_func
19804
Martin v. Löwiseba40652007-08-30 20:10:57 +000019805/* Override any GCC internal prototype to avoid an error.
19806 Use char because int might match the return type of a GCC
19807 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019808#ifdef __cplusplus
19809extern "C"
19810#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019811char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019812/* The GNU C library defines this for functions which it implements
19813 to always fail with ENOSYS. Some functions are actually named
19814 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019815#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019816choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019817#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019818
Skip Montanaro6dead952003-09-25 14:50:04 +000019819int
19820main ()
19821{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019822return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019823 ;
19824 return 0;
19825}
19826_ACEOF
19827rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019828if { (ac_try="$ac_link"
19829case "(($ac_try" in
19830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19831 *) ac_try_echo=$ac_try;;
19832esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019834 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019836 grep -v '^ *+' conftest.er1 >conftest.err
19837 rm -f conftest.er1
19838 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019840 (exit $ac_status); } && {
19841 test -z "$ac_c_werror_flag" ||
19842 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019843 } && test -s conftest$ac_exeext &&
19844 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019845 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019846else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019848sed 's/^/| /' conftest.$ac_ext >&5
19849
Martin v. Löwiseba40652007-08-30 20:10:57 +000019850 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019851fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019852
19853rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019854 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019855fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019856ac_res=`eval echo '${'$as_ac_var'}'`
19857 { echo "$as_me:$LINENO: result: $ac_res" >&5
19858echo "${ECHO_T}$ac_res" >&6; }
19859if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019860 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019861#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019862_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019863
Martin v. Löwis1142de32002-03-29 16:28:31 +000019864else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019865 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019866 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019867 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19868 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019869esac
19870
Martin v. Löwis1142de32002-03-29 16:28:31 +000019871fi
19872done
19873
19874
Martin v. Löwis11437992002-04-12 09:54:03 +000019875
Martin v. Löwis1142de32002-03-29 16:28:31 +000019876for ac_func in getpgrp
19877do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019878as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19879{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19880echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019881if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019882 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019883else
Martin v. Löwis11437992002-04-12 09:54:03 +000019884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019885/* confdefs.h. */
19886_ACEOF
19887cat confdefs.h >>conftest.$ac_ext
19888cat >>conftest.$ac_ext <<_ACEOF
19889/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019890/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19891 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19892#define $ac_func innocuous_$ac_func
19893
Martin v. Löwis1142de32002-03-29 16:28:31 +000019894/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019895 which can conflict with char $ac_func (); below.
19896 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019897 <limits.h> exists even on freestanding compilers. */
19898
19899#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019900# include <limits.h>
19901#else
19902# include <assert.h>
19903#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019904
19905#undef $ac_func
19906
Martin v. Löwiseba40652007-08-30 20:10:57 +000019907/* Override any GCC internal prototype to avoid an error.
19908 Use char because int might match the return type of a GCC
19909 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019910#ifdef __cplusplus
19911extern "C"
19912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019913char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019914/* The GNU C library defines this for functions which it implements
19915 to always fail with ENOSYS. Some functions are actually named
19916 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019917#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000019918choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000019919#endif
19920
Skip Montanaro6dead952003-09-25 14:50:04 +000019921int
19922main ()
19923{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019924return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019925 ;
19926 return 0;
19927}
19928_ACEOF
19929rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019930if { (ac_try="$ac_link"
19931case "(($ac_try" in
19932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19933 *) ac_try_echo=$ac_try;;
19934esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019936 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019937 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019938 grep -v '^ *+' conftest.er1 >conftest.err
19939 rm -f conftest.er1
19940 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019942 (exit $ac_status); } && {
19943 test -z "$ac_c_werror_flag" ||
19944 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019945 } && test -s conftest$ac_exeext &&
19946 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019947 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019948else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019950sed 's/^/| /' conftest.$ac_ext >&5
19951
Martin v. Löwiseba40652007-08-30 20:10:57 +000019952 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019953fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019954
19955rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019956 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019957fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019958ac_res=`eval echo '${'$as_ac_var'}'`
19959 { echo "$as_me:$LINENO: result: $ac_res" >&5
19960echo "${ECHO_T}$ac_res" >&6; }
19961if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019962 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019963#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019964_ACEOF
19965 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019966/* confdefs.h. */
19967_ACEOF
19968cat confdefs.h >>conftest.$ac_ext
19969cat >>conftest.$ac_ext <<_ACEOF
19970/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019971#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019972int
19973main ()
19974{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019975getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019976 ;
19977 return 0;
19978}
19979_ACEOF
19980rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019981if { (ac_try="$ac_compile"
19982case "(($ac_try" in
19983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19984 *) ac_try_echo=$ac_try;;
19985esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019987 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019989 grep -v '^ *+' conftest.er1 >conftest.err
19990 rm -f conftest.er1
19991 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019993 (exit $ac_status); } && {
19994 test -z "$ac_c_werror_flag" ||
19995 test ! -s conftest.err
19996 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019997
19998cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019999#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020000_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020001
Martin v. Löwis11437992002-04-12 09:54:03 +000020002
Guido van Rossumf78abae1997-01-21 22:02:36 +000020003else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020005sed 's/^/| /' conftest.$ac_ext >&5
20006
Martin v. Löwiseba40652007-08-30 20:10:57 +000020007
Guido van Rossum627b2d71993-12-24 10:39:16 +000020008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020009
20010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020011
Guido van Rossum627b2d71993-12-24 10:39:16 +000020012fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020013done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020014
Jack Jansen150753c2003-03-29 22:07:47 +000020015
20016for ac_func in setpgrp
20017do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020018as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20019{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20020echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020021if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020022 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020023else
Martin v. Löwis11437992002-04-12 09:54:03 +000020024 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020025/* confdefs.h. */
20026_ACEOF
20027cat confdefs.h >>conftest.$ac_ext
20028cat >>conftest.$ac_ext <<_ACEOF
20029/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020030/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20031 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20032#define $ac_func innocuous_$ac_func
20033
Jack Jansen150753c2003-03-29 22:07:47 +000020034/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020035 which can conflict with char $ac_func (); below.
20036 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020037 <limits.h> exists even on freestanding compilers. */
20038
20039#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020040# include <limits.h>
20041#else
20042# include <assert.h>
20043#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020044
20045#undef $ac_func
20046
Martin v. Löwiseba40652007-08-30 20:10:57 +000020047/* Override any GCC internal prototype to avoid an error.
20048 Use char because int might match the return type of a GCC
20049 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020050#ifdef __cplusplus
20051extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020052#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020053char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020054/* The GNU C library defines this for functions which it implements
20055 to always fail with ENOSYS. Some functions are actually named
20056 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020057#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020058choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020059#endif
20060
Skip Montanaro6dead952003-09-25 14:50:04 +000020061int
20062main ()
20063{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020064return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020065 ;
20066 return 0;
20067}
20068_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020069rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020070if { (ac_try="$ac_link"
20071case "(($ac_try" in
20072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20073 *) ac_try_echo=$ac_try;;
20074esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020076 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020077 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020078 grep -v '^ *+' conftest.er1 >conftest.err
20079 rm -f conftest.er1
20080 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020082 (exit $ac_status); } && {
20083 test -z "$ac_c_werror_flag" ||
20084 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020085 } && test -s conftest$ac_exeext &&
20086 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020087 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020088else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020090sed 's/^/| /' conftest.$ac_ext >&5
20091
Martin v. Löwiseba40652007-08-30 20:10:57 +000020092 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020093fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020094
20095rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020096 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020097fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020098ac_res=`eval echo '${'$as_ac_var'}'`
20099 { echo "$as_me:$LINENO: result: $ac_res" >&5
20100echo "${ECHO_T}$ac_res" >&6; }
20101if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020102 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020103#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020104_ACEOF
20105 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020106/* confdefs.h. */
20107_ACEOF
20108cat confdefs.h >>conftest.$ac_ext
20109cat >>conftest.$ac_ext <<_ACEOF
20110/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020111#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020112int
20113main ()
20114{
20115setpgrp(0,0);
20116 ;
20117 return 0;
20118}
20119_ACEOF
20120rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020121if { (ac_try="$ac_compile"
20122case "(($ac_try" in
20123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20124 *) ac_try_echo=$ac_try;;
20125esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020127 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020128 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020129 grep -v '^ *+' conftest.er1 >conftest.err
20130 rm -f conftest.er1
20131 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020133 (exit $ac_status); } && {
20134 test -z "$ac_c_werror_flag" ||
20135 test ! -s conftest.err
20136 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020137
20138cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020139#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020140_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020141
Jack Jansen150753c2003-03-29 22:07:47 +000020142
20143else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020145sed 's/^/| /' conftest.$ac_ext >&5
20146
Martin v. Löwiseba40652007-08-30 20:10:57 +000020147
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020149
20150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020151
20152fi
20153done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020154
Martin v. Löwis11437992002-04-12 09:54:03 +000020155
Thomas Wouters3a584202000-08-05 23:28:51 +000020156for ac_func in gettimeofday
20157do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020158as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20159{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20160echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020161if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020162 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020163else
Martin v. Löwis11437992002-04-12 09:54:03 +000020164 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020165/* confdefs.h. */
20166_ACEOF
20167cat confdefs.h >>conftest.$ac_ext
20168cat >>conftest.$ac_ext <<_ACEOF
20169/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020170/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20171 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20172#define $ac_func innocuous_$ac_func
20173
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020174/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020175 which can conflict with char $ac_func (); below.
20176 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020177 <limits.h> exists even on freestanding compilers. */
20178
20179#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020180# include <limits.h>
20181#else
20182# include <assert.h>
20183#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020184
20185#undef $ac_func
20186
Martin v. Löwiseba40652007-08-30 20:10:57 +000020187/* Override any GCC internal prototype to avoid an error.
20188 Use char because int might match the return type of a GCC
20189 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020190#ifdef __cplusplus
20191extern "C"
20192#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020193char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020194/* The GNU C library defines this for functions which it implements
20195 to always fail with ENOSYS. Some functions are actually named
20196 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020197#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020198choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020199#endif
20200
Skip Montanaro6dead952003-09-25 14:50:04 +000020201int
20202main ()
20203{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020204return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020205 ;
20206 return 0;
20207}
20208_ACEOF
20209rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020210if { (ac_try="$ac_link"
20211case "(($ac_try" in
20212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20213 *) ac_try_echo=$ac_try;;
20214esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020216 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020217 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020218 grep -v '^ *+' conftest.er1 >conftest.err
20219 rm -f conftest.er1
20220 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020222 (exit $ac_status); } && {
20223 test -z "$ac_c_werror_flag" ||
20224 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020225 } && test -s conftest$ac_exeext &&
20226 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020227 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020228else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020229 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020230sed 's/^/| /' conftest.$ac_ext >&5
20231
Martin v. Löwiseba40652007-08-30 20:10:57 +000020232 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020233fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020234
20235rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020236 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020237fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020238ac_res=`eval echo '${'$as_ac_var'}'`
20239 { echo "$as_me:$LINENO: result: $ac_res" >&5
20240echo "${ECHO_T}$ac_res" >&6; }
20241if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020242 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020243#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020244_ACEOF
20245 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020246/* confdefs.h. */
20247_ACEOF
20248cat confdefs.h >>conftest.$ac_ext
20249cat >>conftest.$ac_ext <<_ACEOF
20250/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020251#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020252int
20253main ()
20254{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020255gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020256 ;
20257 return 0;
20258}
20259_ACEOF
20260rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020261if { (ac_try="$ac_compile"
20262case "(($ac_try" in
20263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20264 *) ac_try_echo=$ac_try;;
20265esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020267 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020268 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020269 grep -v '^ *+' conftest.er1 >conftest.err
20270 rm -f conftest.er1
20271 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020273 (exit $ac_status); } && {
20274 test -z "$ac_c_werror_flag" ||
20275 test ! -s conftest.err
20276 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020277 :
20278else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020279 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020280sed 's/^/| /' conftest.$ac_ext >&5
20281
Martin v. Löwis11437992002-04-12 09:54:03 +000020282
20283cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020284#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020285_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020286
Martin v. Löwis11437992002-04-12 09:54:03 +000020287
Guido van Rossum627b2d71993-12-24 10:39:16 +000020288fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020289
20290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020291
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020292fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020293done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020294
Michael W. Hudson54241132001-12-07 15:38:26 +000020295
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020296{ echo "$as_me:$LINENO: checking for major" >&5
20297echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020298cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020299/* confdefs.h. */
20300_ACEOF
20301cat confdefs.h >>conftest.$ac_ext
20302cat >>conftest.$ac_ext <<_ACEOF
20303/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020304
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020305#if defined(MAJOR_IN_MKDEV)
20306#include <sys/mkdev.h>
20307#elif defined(MAJOR_IN_SYSMACROS)
20308#include <sys/sysmacros.h>
20309#else
20310#include <sys/types.h>
20311#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020312
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020313int
20314main ()
20315{
20316
20317 makedev(major(0),minor(0));
20318
20319 ;
20320 return 0;
20321}
20322_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020323rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020324if { (ac_try="$ac_link"
20325case "(($ac_try" in
20326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20327 *) ac_try_echo=$ac_try;;
20328esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020330 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020331 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020332 grep -v '^ *+' conftest.er1 >conftest.err
20333 rm -f conftest.er1
20334 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020336 (exit $ac_status); } && {
20337 test -z "$ac_c_werror_flag" ||
20338 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020339 } && test -s conftest$ac_exeext &&
20340 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020341
20342
20343cat >>confdefs.h <<\_ACEOF
20344#define HAVE_DEVICE_MACROS 1
20345_ACEOF
20346
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020347 { echo "$as_me:$LINENO: result: yes" >&5
20348echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020349
20350else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020352sed 's/^/| /' conftest.$ac_ext >&5
20353
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020354
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020355 { echo "$as_me:$LINENO: result: no" >&5
20356echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020357
20358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020359
20360rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020361 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020362
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020363# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020364# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020365{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20366echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020367cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020368/* confdefs.h. */
20369_ACEOF
20370cat confdefs.h >>conftest.$ac_ext
20371cat >>conftest.$ac_ext <<_ACEOF
20372/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020373
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020374#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020375#include <sys/socket.h>
20376#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020377#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020378
Martin v. Löwis11437992002-04-12 09:54:03 +000020379int
20380main ()
20381{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020382getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020383 ;
20384 return 0;
20385}
20386_ACEOF
20387rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020388if { (ac_try="$ac_link"
20389case "(($ac_try" in
20390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20391 *) ac_try_echo=$ac_try;;
20392esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020394 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020396 grep -v '^ *+' conftest.er1 >conftest.err
20397 rm -f conftest.er1
20398 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020400 (exit $ac_status); } && {
20401 test -z "$ac_c_werror_flag" ||
20402 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020403 } && test -s conftest$ac_exeext &&
20404 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020405 have_getaddrinfo=yes
20406else
20407 echo "$as_me: failed program was:" >&5
20408sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020409
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020410 have_getaddrinfo=no
20411fi
20412
20413rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20414 conftest$ac_exeext conftest.$ac_ext
20415{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20416echo "${ECHO_T}$have_getaddrinfo" >&6; }
20417if test $have_getaddrinfo = yes
20418then
20419 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020420echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020421 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
20422 echo $ECHO_N "(cached) $ECHO_C" >&6
20423else
20424 if test "$cross_compiling" = yes; then
20425 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020426else
Martin v. Löwis11437992002-04-12 09:54:03 +000020427 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020428/* confdefs.h. */
20429_ACEOF
20430cat confdefs.h >>conftest.$ac_ext
20431cat >>conftest.$ac_ext <<_ACEOF
20432/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020433
20434#include <sys/types.h>
20435#include <netdb.h>
20436#include <string.h>
20437#include <sys/socket.h>
20438#include <netinet/in.h>
20439
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020440int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020441{
20442 int passive, gaierr, inet4 = 0, inet6 = 0;
20443 struct addrinfo hints, *ai, *aitop;
20444 char straddr[INET6_ADDRSTRLEN], strport[16];
20445
20446 for (passive = 0; passive <= 1; passive++) {
20447 memset(&hints, 0, sizeof(hints));
20448 hints.ai_family = AF_UNSPEC;
20449 hints.ai_flags = passive ? AI_PASSIVE : 0;
20450 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020451 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020452 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20453 (void)gai_strerror(gaierr);
20454 goto bad;
20455 }
20456 for (ai = aitop; ai; ai = ai->ai_next) {
20457 if (ai->ai_addr == NULL ||
20458 ai->ai_addrlen == 0 ||
20459 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20460 straddr, sizeof(straddr), strport, sizeof(strport),
20461 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20462 goto bad;
20463 }
20464 switch (ai->ai_family) {
20465 case AF_INET:
20466 if (strcmp(strport, "54321") != 0) {
20467 goto bad;
20468 }
20469 if (passive) {
20470 if (strcmp(straddr, "0.0.0.0") != 0) {
20471 goto bad;
20472 }
20473 } else {
20474 if (strcmp(straddr, "127.0.0.1") != 0) {
20475 goto bad;
20476 }
20477 }
20478 inet4++;
20479 break;
20480 case AF_INET6:
20481 if (strcmp(strport, "54321") != 0) {
20482 goto bad;
20483 }
20484 if (passive) {
20485 if (strcmp(straddr, "::") != 0) {
20486 goto bad;
20487 }
20488 } else {
20489 if (strcmp(straddr, "::1") != 0) {
20490 goto bad;
20491 }
20492 }
20493 inet6++;
20494 break;
20495 case AF_UNSPEC:
20496 goto bad;
20497 break;
20498 default:
20499 /* another family support? */
20500 break;
20501 }
20502 }
20503 }
20504
20505 if (!(inet4 == 0 || inet4 == 2))
20506 goto bad;
20507 if (!(inet6 == 0 || inet6 == 2))
20508 goto bad;
20509
20510 if (aitop)
20511 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020512 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020513
20514 bad:
20515 if (aitop)
20516 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020517 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020518}
20519
Martin v. Löwis11437992002-04-12 09:54:03 +000020520_ACEOF
20521rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020522if { (ac_try="$ac_link"
20523case "(($ac_try" in
20524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20525 *) ac_try_echo=$ac_try;;
20526esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020528 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020529 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020531 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000020532 { (case "(($ac_try" in
20533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20534 *) ac_try_echo=$ac_try;;
20535esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020537 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020538 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020540 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020541 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020542else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020543 echo "$as_me: program exited with status $ac_status" >&5
20544echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020545sed 's/^/| /' conftest.$ac_ext >&5
20546
Martin v. Löwis11437992002-04-12 09:54:03 +000020547( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020548ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020549fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020550rm -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 +000020551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020552
20553
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020554fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020555
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020556fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020557
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020558if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20559then
20560 if test $ipv6 = yes
20561 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020562 echo 'Fatal: You must get working getaddrinfo() function.'
20563 echo ' or you can specify "--disable-ipv6"'.
20564 exit 1
20565 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020566else
Martin v. Löwis11437992002-04-12 09:54:03 +000020567
20568cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020569#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020570_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020571
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020572fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020573
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020574for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020575do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020576as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20577{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20578echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020579if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020580 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020581else
Martin v. Löwis11437992002-04-12 09:54:03 +000020582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020583/* confdefs.h. */
20584_ACEOF
20585cat confdefs.h >>conftest.$ac_ext
20586cat >>conftest.$ac_ext <<_ACEOF
20587/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020588/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20589 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20590#define $ac_func innocuous_$ac_func
20591
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020592/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020593 which can conflict with char $ac_func (); below.
20594 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020595 <limits.h> exists even on freestanding compilers. */
20596
20597#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020598# include <limits.h>
20599#else
20600# include <assert.h>
20601#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020602
20603#undef $ac_func
20604
Martin v. Löwiseba40652007-08-30 20:10:57 +000020605/* Override any GCC internal prototype to avoid an error.
20606 Use char because int might match the return type of a GCC
20607 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020608#ifdef __cplusplus
20609extern "C"
20610#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020611char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020612/* The GNU C library defines this for functions which it implements
20613 to always fail with ENOSYS. Some functions are actually named
20614 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020615#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020616choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020617#endif
20618
Skip Montanaro6dead952003-09-25 14:50:04 +000020619int
20620main ()
20621{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020622return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020623 ;
20624 return 0;
20625}
20626_ACEOF
20627rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020628if { (ac_try="$ac_link"
20629case "(($ac_try" in
20630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20631 *) ac_try_echo=$ac_try;;
20632esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020634 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020635 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020636 grep -v '^ *+' conftest.er1 >conftest.err
20637 rm -f conftest.er1
20638 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020640 (exit $ac_status); } && {
20641 test -z "$ac_c_werror_flag" ||
20642 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020643 } && test -s conftest$ac_exeext &&
20644 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020645 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020646else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020648sed 's/^/| /' conftest.$ac_ext >&5
20649
Martin v. Löwiseba40652007-08-30 20:10:57 +000020650 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020652
20653rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020654 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020655fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020656ac_res=`eval echo '${'$as_ac_var'}'`
20657 { echo "$as_me:$LINENO: result: $ac_res" >&5
20658echo "${ECHO_T}$ac_res" >&6; }
20659if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020660 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020661#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020662_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020663
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020664fi
20665done
20666
Michael W. Hudson54241132001-12-07 15:38:26 +000020667
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020668# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020669{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20670echo $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 +000020671if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020672 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020673else
Martin v. Löwis11437992002-04-12 09:54:03 +000020674 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020675/* confdefs.h. */
20676_ACEOF
20677cat confdefs.h >>conftest.$ac_ext
20678cat >>conftest.$ac_ext <<_ACEOF
20679/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020680#include <sys/types.h>
20681#include <sys/time.h>
20682#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020683
Martin v. Löwis11437992002-04-12 09:54:03 +000020684int
20685main ()
20686{
20687if ((struct tm *) 0)
20688return 0;
20689 ;
20690 return 0;
20691}
20692_ACEOF
20693rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020694if { (ac_try="$ac_compile"
20695case "(($ac_try" in
20696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20697 *) ac_try_echo=$ac_try;;
20698esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020700 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020701 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020702 grep -v '^ *+' conftest.er1 >conftest.err
20703 rm -f conftest.er1
20704 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020706 (exit $ac_status); } && {
20707 test -z "$ac_c_werror_flag" ||
20708 test ! -s conftest.err
20709 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020710 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020711else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020713sed 's/^/| /' conftest.$ac_ext >&5
20714
Martin v. Löwiseba40652007-08-30 20:10:57 +000020715 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020717
20718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020719fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020720{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20721echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020722if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020723
20724cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020725#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020726_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020727
20728fi
20729
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020730{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20731echo $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 +000020732if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020733 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020734else
Martin v. Löwis11437992002-04-12 09:54:03 +000020735 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020736/* confdefs.h. */
20737_ACEOF
20738cat confdefs.h >>conftest.$ac_ext
20739cat >>conftest.$ac_ext <<_ACEOF
20740/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020741#include <sys/types.h>
20742#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020743
Martin v. Löwis11437992002-04-12 09:54:03 +000020744int
20745main ()
20746{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020747struct tm tm;
20748 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020749 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020750 ;
20751 return 0;
20752}
20753_ACEOF
20754rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020755if { (ac_try="$ac_compile"
20756case "(($ac_try" in
20757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20758 *) ac_try_echo=$ac_try;;
20759esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020761 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020763 grep -v '^ *+' conftest.er1 >conftest.err
20764 rm -f conftest.er1
20765 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020767 (exit $ac_status); } && {
20768 test -z "$ac_c_werror_flag" ||
20769 test ! -s conftest.err
20770 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020771 ac_cv_struct_tm=time.h
20772else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020774sed 's/^/| /' conftest.$ac_ext >&5
20775
Martin v. Löwiseba40652007-08-30 20:10:57 +000020776 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020777fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020778
20779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020780fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020781{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20782echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020783if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020784
20785cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020786#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020787_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020788
20789fi
20790
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020791{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20792echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020793if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020794 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020795else
Martin v. Löwis11437992002-04-12 09:54:03 +000020796 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020797/* confdefs.h. */
20798_ACEOF
20799cat confdefs.h >>conftest.$ac_ext
20800cat >>conftest.$ac_ext <<_ACEOF
20801/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020802#include <sys/types.h>
20803#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020804
20805
Martin v. Löwis11437992002-04-12 09:54:03 +000020806int
20807main ()
20808{
20809static struct tm ac_aggr;
20810if (ac_aggr.tm_zone)
20811return 0;
20812 ;
20813 return 0;
20814}
20815_ACEOF
20816rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020817if { (ac_try="$ac_compile"
20818case "(($ac_try" in
20819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20820 *) ac_try_echo=$ac_try;;
20821esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020823 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020824 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020825 grep -v '^ *+' conftest.er1 >conftest.err
20826 rm -f conftest.er1
20827 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020829 (exit $ac_status); } && {
20830 test -z "$ac_c_werror_flag" ||
20831 test ! -s conftest.err
20832 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020833 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020834else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020836sed 's/^/| /' conftest.$ac_ext >&5
20837
Martin v. Löwiseba40652007-08-30 20:10:57 +000020838 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020839/* confdefs.h. */
20840_ACEOF
20841cat confdefs.h >>conftest.$ac_ext
20842cat >>conftest.$ac_ext <<_ACEOF
20843/* end confdefs.h. */
20844#include <sys/types.h>
20845#include <$ac_cv_struct_tm>
20846
20847
20848int
20849main ()
20850{
20851static struct tm ac_aggr;
20852if (sizeof ac_aggr.tm_zone)
20853return 0;
20854 ;
20855 return 0;
20856}
20857_ACEOF
20858rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020859if { (ac_try="$ac_compile"
20860case "(($ac_try" in
20861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20862 *) ac_try_echo=$ac_try;;
20863esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020865 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020866 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020867 grep -v '^ *+' conftest.er1 >conftest.err
20868 rm -f conftest.er1
20869 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020871 (exit $ac_status); } && {
20872 test -z "$ac_c_werror_flag" ||
20873 test ! -s conftest.err
20874 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020875 ac_cv_member_struct_tm_tm_zone=yes
20876else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020877 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020878sed 's/^/| /' conftest.$ac_ext >&5
20879
Martin v. Löwiseba40652007-08-30 20:10:57 +000020880 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020881fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020882
20883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020885
20886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020887fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020888{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20889echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
20890if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020891
20892cat >>confdefs.h <<_ACEOF
20893#define HAVE_STRUCT_TM_TM_ZONE 1
20894_ACEOF
20895
20896
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020897fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020898
Martin v. Löwis11437992002-04-12 09:54:03 +000020899if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20900
20901cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020902#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020903_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020904
20905else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020906 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
20907echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020908if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020909 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000020910else
20911 cat >conftest.$ac_ext <<_ACEOF
20912/* confdefs.h. */
20913_ACEOF
20914cat confdefs.h >>conftest.$ac_ext
20915cat >>conftest.$ac_ext <<_ACEOF
20916/* end confdefs.h. */
20917#include <time.h>
20918
20919int
20920main ()
20921{
20922#ifndef tzname
20923 (void) tzname;
20924#endif
20925
20926 ;
20927 return 0;
20928}
20929_ACEOF
20930rm -f conftest.$ac_objext
20931if { (ac_try="$ac_compile"
20932case "(($ac_try" in
20933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20934 *) ac_try_echo=$ac_try;;
20935esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020937 (eval "$ac_compile") 2>conftest.er1
20938 ac_status=$?
20939 grep -v '^ *+' conftest.er1 >conftest.err
20940 rm -f conftest.er1
20941 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020943 (exit $ac_status); } && {
20944 test -z "$ac_c_werror_flag" ||
20945 test ! -s conftest.err
20946 } && test -s conftest.$ac_objext; then
20947 ac_cv_have_decl_tzname=yes
20948else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020949 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020950sed 's/^/| /' conftest.$ac_ext >&5
20951
20952 ac_cv_have_decl_tzname=no
20953fi
20954
20955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20956fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020957{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
20958echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
20959if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020960
20961cat >>confdefs.h <<_ACEOF
20962#define HAVE_DECL_TZNAME 1
20963_ACEOF
20964
20965
20966else
20967 cat >>confdefs.h <<_ACEOF
20968#define HAVE_DECL_TZNAME 0
20969_ACEOF
20970
20971
20972fi
20973
20974
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020975 { echo "$as_me:$LINENO: checking for tzname" >&5
20976echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020977if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020978 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020979else
Martin v. Löwis11437992002-04-12 09:54:03 +000020980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020981/* confdefs.h. */
20982_ACEOF
20983cat confdefs.h >>conftest.$ac_ext
20984cat >>conftest.$ac_ext <<_ACEOF
20985/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020986#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000020987#if !HAVE_DECL_TZNAME
20988extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000020989#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020990
Martin v. Löwis11437992002-04-12 09:54:03 +000020991int
20992main ()
20993{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020994return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000020995 ;
20996 return 0;
20997}
20998_ACEOF
20999rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021000if { (ac_try="$ac_link"
21001case "(($ac_try" in
21002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21003 *) ac_try_echo=$ac_try;;
21004esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021006 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021007 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021008 grep -v '^ *+' conftest.er1 >conftest.err
21009 rm -f conftest.er1
21010 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021012 (exit $ac_status); } && {
21013 test -z "$ac_c_werror_flag" ||
21014 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021015 } && test -s conftest$ac_exeext &&
21016 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021017 ac_cv_var_tzname=yes
21018else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021019 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021020sed 's/^/| /' conftest.$ac_ext >&5
21021
Martin v. Löwiseba40652007-08-30 20:10:57 +000021022 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021023fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021024
21025rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021026 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021027fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021028{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21029echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021030 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021031
21032cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021033#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021034_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021035
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021036 fi
21037fi
21038
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021039{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21040echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021041if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021042 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021043else
21044 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021045/* confdefs.h. */
21046_ACEOF
21047cat confdefs.h >>conftest.$ac_ext
21048cat >>conftest.$ac_ext <<_ACEOF
21049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021050$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021051int
21052main ()
21053{
21054static struct stat ac_aggr;
21055if (ac_aggr.st_rdev)
21056return 0;
21057 ;
21058 return 0;
21059}
21060_ACEOF
21061rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021062if { (ac_try="$ac_compile"
21063case "(($ac_try" in
21064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21065 *) ac_try_echo=$ac_try;;
21066esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021068 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021069 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021070 grep -v '^ *+' conftest.er1 >conftest.err
21071 rm -f conftest.er1
21072 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021074 (exit $ac_status); } && {
21075 test -z "$ac_c_werror_flag" ||
21076 test ! -s conftest.err
21077 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021078 ac_cv_member_struct_stat_st_rdev=yes
21079else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021081sed 's/^/| /' conftest.$ac_ext >&5
21082
Martin v. Löwiseba40652007-08-30 20:10:57 +000021083 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021084/* confdefs.h. */
21085_ACEOF
21086cat confdefs.h >>conftest.$ac_ext
21087cat >>conftest.$ac_ext <<_ACEOF
21088/* end confdefs.h. */
21089$ac_includes_default
21090int
21091main ()
21092{
21093static struct stat ac_aggr;
21094if (sizeof ac_aggr.st_rdev)
21095return 0;
21096 ;
21097 return 0;
21098}
21099_ACEOF
21100rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021101if { (ac_try="$ac_compile"
21102case "(($ac_try" in
21103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21104 *) ac_try_echo=$ac_try;;
21105esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021107 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021109 grep -v '^ *+' conftest.er1 >conftest.err
21110 rm -f conftest.er1
21111 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021113 (exit $ac_status); } && {
21114 test -z "$ac_c_werror_flag" ||
21115 test ! -s conftest.err
21116 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021117 ac_cv_member_struct_stat_st_rdev=yes
21118else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021119 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021120sed 's/^/| /' conftest.$ac_ext >&5
21121
Martin v. Löwiseba40652007-08-30 20:10:57 +000021122 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021123fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021124
21125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021126fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021127
21128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021129fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021130{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21131echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21132if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021133
21134cat >>confdefs.h <<_ACEOF
21135#define HAVE_STRUCT_STAT_ST_RDEV 1
21136_ACEOF
21137
21138
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021139fi
21140
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021141{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21142echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021143if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021144 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021145else
Martin v. Löwis11437992002-04-12 09:54:03 +000021146 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021147/* confdefs.h. */
21148_ACEOF
21149cat confdefs.h >>conftest.$ac_ext
21150cat >>conftest.$ac_ext <<_ACEOF
21151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021152$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021153int
21154main ()
21155{
21156static struct stat ac_aggr;
21157if (ac_aggr.st_blksize)
21158return 0;
21159 ;
21160 return 0;
21161}
21162_ACEOF
21163rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021164if { (ac_try="$ac_compile"
21165case "(($ac_try" in
21166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21167 *) ac_try_echo=$ac_try;;
21168esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021170 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021172 grep -v '^ *+' conftest.er1 >conftest.err
21173 rm -f conftest.er1
21174 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021176 (exit $ac_status); } && {
21177 test -z "$ac_c_werror_flag" ||
21178 test ! -s conftest.err
21179 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021180 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021181else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021183sed 's/^/| /' conftest.$ac_ext >&5
21184
Martin v. Löwiseba40652007-08-30 20:10:57 +000021185 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021186/* confdefs.h. */
21187_ACEOF
21188cat confdefs.h >>conftest.$ac_ext
21189cat >>conftest.$ac_ext <<_ACEOF
21190/* end confdefs.h. */
21191$ac_includes_default
21192int
21193main ()
21194{
21195static struct stat ac_aggr;
21196if (sizeof ac_aggr.st_blksize)
21197return 0;
21198 ;
21199 return 0;
21200}
21201_ACEOF
21202rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021203if { (ac_try="$ac_compile"
21204case "(($ac_try" in
21205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21206 *) ac_try_echo=$ac_try;;
21207esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021209 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021211 grep -v '^ *+' conftest.er1 >conftest.err
21212 rm -f conftest.er1
21213 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021215 (exit $ac_status); } && {
21216 test -z "$ac_c_werror_flag" ||
21217 test ! -s conftest.err
21218 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021219 ac_cv_member_struct_stat_st_blksize=yes
21220else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021222sed 's/^/| /' conftest.$ac_ext >&5
21223
Martin v. Löwiseba40652007-08-30 20:10:57 +000021224 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021226
21227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021229
21230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021231fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021232{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21233echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21234if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021235
Martin v. Löwis11437992002-04-12 09:54:03 +000021236cat >>confdefs.h <<_ACEOF
21237#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21238_ACEOF
21239
21240
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021241fi
21242
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021243{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21244echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021245if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021246 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021247else
21248 cat >conftest.$ac_ext <<_ACEOF
21249/* confdefs.h. */
21250_ACEOF
21251cat confdefs.h >>conftest.$ac_ext
21252cat >>conftest.$ac_ext <<_ACEOF
21253/* end confdefs.h. */
21254$ac_includes_default
21255int
21256main ()
21257{
21258static struct stat ac_aggr;
21259if (ac_aggr.st_flags)
21260return 0;
21261 ;
21262 return 0;
21263}
21264_ACEOF
21265rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021266if { (ac_try="$ac_compile"
21267case "(($ac_try" in
21268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21269 *) ac_try_echo=$ac_try;;
21270esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021272 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021273 ac_status=$?
21274 grep -v '^ *+' conftest.er1 >conftest.err
21275 rm -f conftest.er1
21276 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021278 (exit $ac_status); } && {
21279 test -z "$ac_c_werror_flag" ||
21280 test ! -s conftest.err
21281 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021282 ac_cv_member_struct_stat_st_flags=yes
21283else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021284 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021285sed 's/^/| /' conftest.$ac_ext >&5
21286
Martin v. Löwiseba40652007-08-30 20:10:57 +000021287 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021288/* confdefs.h. */
21289_ACEOF
21290cat confdefs.h >>conftest.$ac_ext
21291cat >>conftest.$ac_ext <<_ACEOF
21292/* end confdefs.h. */
21293$ac_includes_default
21294int
21295main ()
21296{
21297static struct stat ac_aggr;
21298if (sizeof ac_aggr.st_flags)
21299return 0;
21300 ;
21301 return 0;
21302}
21303_ACEOF
21304rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021305if { (ac_try="$ac_compile"
21306case "(($ac_try" in
21307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21308 *) ac_try_echo=$ac_try;;
21309esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021311 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021312 ac_status=$?
21313 grep -v '^ *+' conftest.er1 >conftest.err
21314 rm -f conftest.er1
21315 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021317 (exit $ac_status); } && {
21318 test -z "$ac_c_werror_flag" ||
21319 test ! -s conftest.err
21320 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021321 ac_cv_member_struct_stat_st_flags=yes
21322else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021323 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021324sed 's/^/| /' conftest.$ac_ext >&5
21325
Martin v. Löwiseba40652007-08-30 20:10:57 +000021326 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021327fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021328
21329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021330fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021331
21332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021333fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021334{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21335echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21336if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021337
21338cat >>confdefs.h <<_ACEOF
21339#define HAVE_STRUCT_STAT_ST_FLAGS 1
21340_ACEOF
21341
21342
21343fi
21344
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021345{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21346echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021347if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021348 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021349else
21350 cat >conftest.$ac_ext <<_ACEOF
21351/* confdefs.h. */
21352_ACEOF
21353cat confdefs.h >>conftest.$ac_ext
21354cat >>conftest.$ac_ext <<_ACEOF
21355/* end confdefs.h. */
21356$ac_includes_default
21357int
21358main ()
21359{
21360static struct stat ac_aggr;
21361if (ac_aggr.st_gen)
21362return 0;
21363 ;
21364 return 0;
21365}
21366_ACEOF
21367rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021368if { (ac_try="$ac_compile"
21369case "(($ac_try" in
21370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21371 *) ac_try_echo=$ac_try;;
21372esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021374 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021375 ac_status=$?
21376 grep -v '^ *+' conftest.er1 >conftest.err
21377 rm -f conftest.er1
21378 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021380 (exit $ac_status); } && {
21381 test -z "$ac_c_werror_flag" ||
21382 test ! -s conftest.err
21383 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021384 ac_cv_member_struct_stat_st_gen=yes
21385else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021386 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021387sed 's/^/| /' conftest.$ac_ext >&5
21388
Martin v. Löwiseba40652007-08-30 20:10:57 +000021389 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021390/* confdefs.h. */
21391_ACEOF
21392cat confdefs.h >>conftest.$ac_ext
21393cat >>conftest.$ac_ext <<_ACEOF
21394/* end confdefs.h. */
21395$ac_includes_default
21396int
21397main ()
21398{
21399static struct stat ac_aggr;
21400if (sizeof ac_aggr.st_gen)
21401return 0;
21402 ;
21403 return 0;
21404}
21405_ACEOF
21406rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021407if { (ac_try="$ac_compile"
21408case "(($ac_try" in
21409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21410 *) ac_try_echo=$ac_try;;
21411esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021413 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021414 ac_status=$?
21415 grep -v '^ *+' conftest.er1 >conftest.err
21416 rm -f conftest.er1
21417 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021419 (exit $ac_status); } && {
21420 test -z "$ac_c_werror_flag" ||
21421 test ! -s conftest.err
21422 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021423 ac_cv_member_struct_stat_st_gen=yes
21424else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021425 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021426sed 's/^/| /' conftest.$ac_ext >&5
21427
Martin v. Löwiseba40652007-08-30 20:10:57 +000021428 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021429fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021430
21431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021432fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021433
21434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021435fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021436{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21437echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21438if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021439
21440cat >>confdefs.h <<_ACEOF
21441#define HAVE_STRUCT_STAT_ST_GEN 1
21442_ACEOF
21443
21444
21445fi
21446
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021447{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21448echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021449if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021450 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021451else
21452 cat >conftest.$ac_ext <<_ACEOF
21453/* confdefs.h. */
21454_ACEOF
21455cat confdefs.h >>conftest.$ac_ext
21456cat >>conftest.$ac_ext <<_ACEOF
21457/* end confdefs.h. */
21458$ac_includes_default
21459int
21460main ()
21461{
21462static struct stat ac_aggr;
21463if (ac_aggr.st_birthtime)
21464return 0;
21465 ;
21466 return 0;
21467}
21468_ACEOF
21469rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021470if { (ac_try="$ac_compile"
21471case "(($ac_try" in
21472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21473 *) ac_try_echo=$ac_try;;
21474esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021476 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021477 ac_status=$?
21478 grep -v '^ *+' conftest.er1 >conftest.err
21479 rm -f conftest.er1
21480 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021482 (exit $ac_status); } && {
21483 test -z "$ac_c_werror_flag" ||
21484 test ! -s conftest.err
21485 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021486 ac_cv_member_struct_stat_st_birthtime=yes
21487else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021488 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021489sed 's/^/| /' conftest.$ac_ext >&5
21490
Martin v. Löwiseba40652007-08-30 20:10:57 +000021491 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021492/* confdefs.h. */
21493_ACEOF
21494cat confdefs.h >>conftest.$ac_ext
21495cat >>conftest.$ac_ext <<_ACEOF
21496/* end confdefs.h. */
21497$ac_includes_default
21498int
21499main ()
21500{
21501static struct stat ac_aggr;
21502if (sizeof ac_aggr.st_birthtime)
21503return 0;
21504 ;
21505 return 0;
21506}
21507_ACEOF
21508rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021509if { (ac_try="$ac_compile"
21510case "(($ac_try" in
21511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21512 *) ac_try_echo=$ac_try;;
21513esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021515 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021516 ac_status=$?
21517 grep -v '^ *+' conftest.er1 >conftest.err
21518 rm -f conftest.er1
21519 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021521 (exit $ac_status); } && {
21522 test -z "$ac_c_werror_flag" ||
21523 test ! -s conftest.err
21524 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021525 ac_cv_member_struct_stat_st_birthtime=yes
21526else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021527 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021528sed 's/^/| /' conftest.$ac_ext >&5
21529
Martin v. Löwiseba40652007-08-30 20:10:57 +000021530 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021531fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021532
21533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021535
21536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021537fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021538{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21539echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21540if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021541
21542cat >>confdefs.h <<_ACEOF
21543#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21544_ACEOF
21545
21546
21547fi
21548
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021549{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21550echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021551if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021552 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021553else
Martin v. Löwis11437992002-04-12 09:54:03 +000021554 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021555/* confdefs.h. */
21556_ACEOF
21557cat confdefs.h >>conftest.$ac_ext
21558cat >>conftest.$ac_ext <<_ACEOF
21559/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021560$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021561int
21562main ()
21563{
21564static struct stat ac_aggr;
21565if (ac_aggr.st_blocks)
21566return 0;
21567 ;
21568 return 0;
21569}
21570_ACEOF
21571rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021572if { (ac_try="$ac_compile"
21573case "(($ac_try" in
21574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21575 *) ac_try_echo=$ac_try;;
21576esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021578 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021580 grep -v '^ *+' conftest.er1 >conftest.err
21581 rm -f conftest.er1
21582 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021584 (exit $ac_status); } && {
21585 test -z "$ac_c_werror_flag" ||
21586 test ! -s conftest.err
21587 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021588 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021589else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021591sed 's/^/| /' conftest.$ac_ext >&5
21592
Martin v. Löwiseba40652007-08-30 20:10:57 +000021593 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021594/* confdefs.h. */
21595_ACEOF
21596cat confdefs.h >>conftest.$ac_ext
21597cat >>conftest.$ac_ext <<_ACEOF
21598/* end confdefs.h. */
21599$ac_includes_default
21600int
21601main ()
21602{
21603static struct stat ac_aggr;
21604if (sizeof ac_aggr.st_blocks)
21605return 0;
21606 ;
21607 return 0;
21608}
21609_ACEOF
21610rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021611if { (ac_try="$ac_compile"
21612case "(($ac_try" in
21613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21614 *) ac_try_echo=$ac_try;;
21615esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021617 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021619 grep -v '^ *+' conftest.er1 >conftest.err
21620 rm -f conftest.er1
21621 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021623 (exit $ac_status); } && {
21624 test -z "$ac_c_werror_flag" ||
21625 test ! -s conftest.err
21626 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021627 ac_cv_member_struct_stat_st_blocks=yes
21628else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021630sed 's/^/| /' conftest.$ac_ext >&5
21631
Martin v. Löwiseba40652007-08-30 20:10:57 +000021632 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021634
21635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021636fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021637
21638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021639fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021640{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21641echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21642if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021643
Martin v. Löwis11437992002-04-12 09:54:03 +000021644cat >>confdefs.h <<_ACEOF
21645#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21646_ACEOF
21647
21648
21649cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021650#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021651_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021652
21653else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021654 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021655 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021656 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21657 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021658esac
21659
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021660fi
21661
Michael W. Hudson54241132001-12-07 15:38:26 +000021662
Martin v. Löwis11437992002-04-12 09:54:03 +000021663
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021664{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21665echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021666if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021667 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021668else
Martin v. Löwis11437992002-04-12 09:54:03 +000021669 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021670/* confdefs.h. */
21671_ACEOF
21672cat confdefs.h >>conftest.$ac_ext
21673cat >>conftest.$ac_ext <<_ACEOF
21674/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021675#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021676int
21677main ()
21678{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021679return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021680 ;
21681 return 0;
21682}
21683_ACEOF
21684rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021685if { (ac_try="$ac_compile"
21686case "(($ac_try" in
21687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21688 *) ac_try_echo=$ac_try;;
21689esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021691 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021692 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021693 grep -v '^ *+' conftest.er1 >conftest.err
21694 rm -f conftest.er1
21695 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021697 (exit $ac_status); } && {
21698 test -z "$ac_c_werror_flag" ||
21699 test ! -s conftest.err
21700 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021701 ac_cv_header_time_altzone=yes
21702else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021703 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021704sed 's/^/| /' conftest.$ac_ext >&5
21705
Martin v. Löwiseba40652007-08-30 20:10:57 +000021706 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021707fi
21708
Martin v. Löwiseba40652007-08-30 20:10:57 +000021709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21710fi
21711
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021712{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21713echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021714if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021715
21716cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021717#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021718_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021719
21720fi
21721
Guido van Rossumda88dad1995-01-26 00:46:29 +000021722was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021723{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21724echo $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 +000021725cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021726/* confdefs.h. */
21727_ACEOF
21728cat confdefs.h >>conftest.$ac_ext
21729cat >>conftest.$ac_ext <<_ACEOF
21730/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021731
21732#include <sys/types.h>
21733#include <sys/select.h>
21734#include <sys/time.h>
21735
Martin v. Löwis11437992002-04-12 09:54:03 +000021736int
21737main ()
21738{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021739;
Martin v. Löwis11437992002-04-12 09:54:03 +000021740 ;
21741 return 0;
21742}
21743_ACEOF
21744rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021745if { (ac_try="$ac_compile"
21746case "(($ac_try" in
21747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21748 *) ac_try_echo=$ac_try;;
21749esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021751 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021752 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021753 grep -v '^ *+' conftest.er1 >conftest.err
21754 rm -f conftest.er1
21755 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021757 (exit $ac_status); } && {
21758 test -z "$ac_c_werror_flag" ||
21759 test ! -s conftest.err
21760 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021761
21762
21763cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021764#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021765_ACEOF
21766
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021767 was_it_defined=yes
21768
Guido van Rossumf78abae1997-01-21 22:02:36 +000021769else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021771sed 's/^/| /' conftest.$ac_ext >&5
21772
Brett Cannon19fab762007-06-02 03:02:29 +000021773
Martin v. Löwiseba40652007-08-30 20:10:57 +000021774fi
21775
21776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021777{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21778echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021779
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021780{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21781echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021782if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021783 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +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. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021791
21792# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021793int
21794main ()
21795{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021796struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021797 ;
21798 return 0;
21799}
21800_ACEOF
21801rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021802if { (ac_try="$ac_compile"
21803case "(($ac_try" in
21804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21805 *) ac_try_echo=$ac_try;;
21806esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021808 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021809 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021810 grep -v '^ *+' conftest.er1 >conftest.err
21811 rm -f conftest.er1
21812 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021814 (exit $ac_status); } && {
21815 test -z "$ac_c_werror_flag" ||
21816 test ! -s conftest.err
21817 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021818 ac_cv_struct_addrinfo=yes
21819else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021821sed 's/^/| /' conftest.$ac_ext >&5
21822
Martin v. Löwiseba40652007-08-30 20:10:57 +000021823 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021824fi
21825
Martin v. Löwiseba40652007-08-30 20:10:57 +000021826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21827fi
21828
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021829{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21830echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021831if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021832
21833cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021834#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021835_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021836
21837fi
21838
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021839{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21840echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021841if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021842 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021843else
Martin v. Löwis11437992002-04-12 09:54:03 +000021844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021845/* confdefs.h. */
21846_ACEOF
21847cat confdefs.h >>conftest.$ac_ext
21848cat >>conftest.$ac_ext <<_ACEOF
21849/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021850
21851# include <sys/types.h>
21852# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021853int
21854main ()
21855{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021856struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021857 ;
21858 return 0;
21859}
21860_ACEOF
21861rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021862if { (ac_try="$ac_compile"
21863case "(($ac_try" in
21864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21865 *) ac_try_echo=$ac_try;;
21866esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021868 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021870 grep -v '^ *+' conftest.er1 >conftest.err
21871 rm -f conftest.er1
21872 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021874 (exit $ac_status); } && {
21875 test -z "$ac_c_werror_flag" ||
21876 test ! -s conftest.err
21877 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021878 ac_cv_struct_sockaddr_storage=yes
21879else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021881sed 's/^/| /' conftest.$ac_ext >&5
21882
Martin v. Löwiseba40652007-08-30 20:10:57 +000021883 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021884fi
21885
Martin v. Löwiseba40652007-08-30 20:10:57 +000021886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21887fi
21888
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021889{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21890echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021891if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021892
21893cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021894#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021895_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021896
21897fi
21898
Guido van Rossum627b2d71993-12-24 10:39:16 +000021899# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021900
Michael W. Hudson54241132001-12-07 15:38:26 +000021901
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021902{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21903echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021904if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021905 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021906else
Martin v. Löwis11437992002-04-12 09:54:03 +000021907 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021908/* confdefs.h. */
21909_ACEOF
21910cat confdefs.h >>conftest.$ac_ext
21911cat >>conftest.$ac_ext <<_ACEOF
21912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021913$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021914int
21915main ()
21916{
21917static int test_array [1 - 2 * !(((char) -1) < 0)];
21918test_array [0] = 0
21919
21920 ;
21921 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021922}
Martin v. Löwis11437992002-04-12 09:54:03 +000021923_ACEOF
21924rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021925if { (ac_try="$ac_compile"
21926case "(($ac_try" in
21927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21928 *) ac_try_echo=$ac_try;;
21929esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021931 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021932 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021933 grep -v '^ *+' conftest.er1 >conftest.err
21934 rm -f conftest.er1
21935 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021937 (exit $ac_status); } && {
21938 test -z "$ac_c_werror_flag" ||
21939 test ! -s conftest.err
21940 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021941 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021942else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021943 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021944sed 's/^/| /' conftest.$ac_ext >&5
21945
Martin v. Löwiseba40652007-08-30 20:10:57 +000021946 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021948
21949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021950fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021951{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21952echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021953if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021954 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021955#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021956_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021957
21958fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021959
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021960{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21961echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021962if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021963 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021964else
21965 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021966/* confdefs.h. */
21967_ACEOF
21968cat confdefs.h >>conftest.$ac_ext
21969cat >>conftest.$ac_ext <<_ACEOF
21970/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021971
Martin v. Löwis11437992002-04-12 09:54:03 +000021972int
21973main ()
21974{
21975/* FIXME: Include the comments suggested by Paul. */
21976#ifndef __cplusplus
21977 /* Ultrix mips cc rejects this. */
21978 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000021979 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000021980 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021981 char const *const *pcpcc;
21982 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021983 /* NEC SVR4.0.2 mips cc rejects this. */
21984 struct point {int x, y;};
21985 static struct point const zero = {0,0};
21986 /* AIX XL C 1.02.0.0 rejects this.
21987 It does not let you subtract one const X* pointer from another in
21988 an arm of an if-expression whose if-part is not a constant
21989 expression */
21990 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000021991 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000021992 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021993 ++pcpcc;
21994 ppc = (char**) pcpcc;
21995 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021996 { /* SCO 3.2v4 cc rejects this. */
21997 char *t;
21998 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021999
Martin v. Löwis11437992002-04-12 09:54:03 +000022000 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022001 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022002 }
22003 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22004 int x[] = {25, 17};
22005 const int *foo = &x[0];
22006 ++foo;
22007 }
22008 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22009 typedef const int *iptr;
22010 iptr p = 0;
22011 ++p;
22012 }
22013 { /* AIX XL C 1.02.0.0 rejects this saying
22014 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22015 struct s { int j; const int *ap[3]; };
22016 struct s *b; b->j = 5;
22017 }
22018 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22019 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022020 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022021 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022022 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022023#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022024
Martin v. Löwis11437992002-04-12 09:54:03 +000022025 ;
22026 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022027}
Martin v. Löwis11437992002-04-12 09:54:03 +000022028_ACEOF
22029rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022030if { (ac_try="$ac_compile"
22031case "(($ac_try" in
22032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22033 *) ac_try_echo=$ac_try;;
22034esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022036 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022037 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022038 grep -v '^ *+' conftest.er1 >conftest.err
22039 rm -f conftest.er1
22040 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022042 (exit $ac_status); } && {
22043 test -z "$ac_c_werror_flag" ||
22044 test ! -s conftest.err
22045 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022046 ac_cv_c_const=yes
22047else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022048 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022049sed 's/^/| /' conftest.$ac_ext >&5
22050
Martin v. Löwiseba40652007-08-30 20:10:57 +000022051 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022052fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022053
22054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022055fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022056{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22057echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022058if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022059
22060cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022061#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022062_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022063
22064fi
22065
Michael W. Hudson54241132001-12-07 15:38:26 +000022066
Guido van Rossumda88dad1995-01-26 00:46:29 +000022067works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022068{ echo "$as_me:$LINENO: checking for working volatile" >&5
22069echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022070cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022071/* confdefs.h. */
22072_ACEOF
22073cat confdefs.h >>conftest.$ac_ext
22074cat >>conftest.$ac_ext <<_ACEOF
22075/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022076
Martin v. Löwis11437992002-04-12 09:54:03 +000022077int
22078main ()
22079{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022080volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022081 ;
22082 return 0;
22083}
22084_ACEOF
22085rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022086if { (ac_try="$ac_compile"
22087case "(($ac_try" in
22088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22089 *) ac_try_echo=$ac_try;;
22090esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022092 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022093 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022094 grep -v '^ *+' conftest.er1 >conftest.err
22095 rm -f conftest.er1
22096 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022098 (exit $ac_status); } && {
22099 test -z "$ac_c_werror_flag" ||
22100 test ! -s conftest.err
22101 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022102 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022103else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022105sed 's/^/| /' conftest.$ac_ext >&5
22106
Martin v. Löwis11437992002-04-12 09:54:03 +000022107
22108cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022109#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022110_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022111
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022112
Guido van Rossum627b2d71993-12-24 10:39:16 +000022113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022114
22115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022116{ echo "$as_me:$LINENO: result: $works" >&5
22117echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022118
Guido van Rossumda88dad1995-01-26 00:46:29 +000022119works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022120{ echo "$as_me:$LINENO: checking for working signed char" >&5
22121echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022122cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022123/* confdefs.h. */
22124_ACEOF
22125cat confdefs.h >>conftest.$ac_ext
22126cat >>conftest.$ac_ext <<_ACEOF
22127/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022128
Martin v. Löwis11437992002-04-12 09:54:03 +000022129int
22130main ()
22131{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022132signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022133 ;
22134 return 0;
22135}
22136_ACEOF
22137rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022138if { (ac_try="$ac_compile"
22139case "(($ac_try" in
22140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22141 *) ac_try_echo=$ac_try;;
22142esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022144 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022145 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022146 grep -v '^ *+' conftest.er1 >conftest.err
22147 rm -f conftest.er1
22148 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022150 (exit $ac_status); } && {
22151 test -z "$ac_c_werror_flag" ||
22152 test ! -s conftest.err
22153 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022154 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022155else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022157sed 's/^/| /' conftest.$ac_ext >&5
22158
Martin v. Löwis11437992002-04-12 09:54:03 +000022159
22160cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022161#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022162_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022163
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022164
Guido van Rossum7f43da71994-08-01 12:15:30 +000022165fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022166
22167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022168{ echo "$as_me:$LINENO: result: $works" >&5
22169echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022170
Guido van Rossumda88dad1995-01-26 00:46:29 +000022171have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022172{ echo "$as_me:$LINENO: checking for prototypes" >&5
22173echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022174cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022175/* confdefs.h. */
22176_ACEOF
22177cat confdefs.h >>conftest.$ac_ext
22178cat >>conftest.$ac_ext <<_ACEOF
22179/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022180int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022181int
22182main ()
22183{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022184return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022185 ;
22186 return 0;
22187}
22188_ACEOF
22189rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022190if { (ac_try="$ac_compile"
22191case "(($ac_try" in
22192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22193 *) ac_try_echo=$ac_try;;
22194esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022196 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022198 grep -v '^ *+' conftest.er1 >conftest.err
22199 rm -f conftest.er1
22200 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022202 (exit $ac_status); } && {
22203 test -z "$ac_c_werror_flag" ||
22204 test ! -s conftest.err
22205 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022206
22207
22208cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022209#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022210_ACEOF
22211
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022212 have_prototypes=yes
22213
Guido van Rossumf78abae1997-01-21 22:02:36 +000022214else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022215 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022216sed 's/^/| /' conftest.$ac_ext >&5
22217
Martin v. Löwiseba40652007-08-30 20:10:57 +000022218
Guido van Rossum7f43da71994-08-01 12:15:30 +000022219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022220
22221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022222{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22223echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022224
Guido van Rossumda88dad1995-01-26 00:46:29 +000022225works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022226{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22227echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022228cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022229/* confdefs.h. */
22230_ACEOF
22231cat confdefs.h >>conftest.$ac_ext
22232cat >>conftest.$ac_ext <<_ACEOF
22233/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022234
22235#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022236int foo(int x, ...) {
22237 va_list va;
22238 va_start(va, x);
22239 va_arg(va, int);
22240 va_arg(va, char *);
22241 va_arg(va, double);
22242 return 0;
22243}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022244
Martin v. Löwis11437992002-04-12 09:54:03 +000022245int
22246main ()
22247{
Guido van Rossum90eea071996-08-30 20:58:57 +000022248return foo(10, "", 3.14);
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
Martin v. Löwis11437992002-04-12 09:54:03 +000022270
22271
22272cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022273#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022274_ACEOF
22275
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022276 works=yes
22277
Guido van Rossumf78abae1997-01-21 22:02:36 +000022278else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022279 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022280sed 's/^/| /' conftest.$ac_ext >&5
22281
Martin v. Löwiseba40652007-08-30 20:10:57 +000022282
Guido van Rossum627b2d71993-12-24 10:39:16 +000022283fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022284
22285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022286{ echo "$as_me:$LINENO: result: $works" >&5
22287echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022288
Martin v. Löwisd6320502004-08-12 13:45:08 +000022289# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022290{ echo "$as_me:$LINENO: checking for socketpair" >&5
22291echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022292cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022293/* confdefs.h. */
22294_ACEOF
22295cat confdefs.h >>conftest.$ac_ext
22296cat >>conftest.$ac_ext <<_ACEOF
22297/* end confdefs.h. */
22298
22299#include <sys/types.h>
22300#include <sys/socket.h>
22301
22302int
22303main ()
22304{
22305void *x=socketpair
22306 ;
22307 return 0;
22308}
22309_ACEOF
22310rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022311if { (ac_try="$ac_compile"
22312case "(($ac_try" in
22313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22314 *) ac_try_echo=$ac_try;;
22315esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022317 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022319 grep -v '^ *+' conftest.er1 >conftest.err
22320 rm -f conftest.er1
22321 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022323 (exit $ac_status); } && {
22324 test -z "$ac_c_werror_flag" ||
22325 test ! -s conftest.err
22326 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022327
22328cat >>confdefs.h <<\_ACEOF
22329#define HAVE_SOCKETPAIR 1
22330_ACEOF
22331
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022332 { echo "$as_me:$LINENO: result: yes" >&5
22333echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022334else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022335 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022336sed 's/^/| /' conftest.$ac_ext >&5
22337
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022338 { echo "$as_me:$LINENO: result: no" >&5
22339echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022340
22341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022342
22343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022344
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022345# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022346{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22347echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022348cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022349/* confdefs.h. */
22350_ACEOF
22351cat confdefs.h >>conftest.$ac_ext
22352cat >>conftest.$ac_ext <<_ACEOF
22353/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022354#include <sys/types.h>
22355#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022356int
22357main ()
22358{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022359struct sockaddr x;
22360x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022361 ;
22362 return 0;
22363}
22364_ACEOF
22365rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022366if { (ac_try="$ac_compile"
22367case "(($ac_try" in
22368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22369 *) ac_try_echo=$ac_try;;
22370esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022372 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022373 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022374 grep -v '^ *+' conftest.er1 >conftest.err
22375 rm -f conftest.er1
22376 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022378 (exit $ac_status); } && {
22379 test -z "$ac_c_werror_flag" ||
22380 test ! -s conftest.err
22381 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022382 { echo "$as_me:$LINENO: result: yes" >&5
22383echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022384
22385cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022386#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022387_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022388
22389else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022391sed 's/^/| /' conftest.$ac_ext >&5
22392
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022393 { echo "$as_me:$LINENO: result: no" >&5
22394echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022396
22397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022398
Guido van Rossumda88dad1995-01-26 00:46:29 +000022399va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022400{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22401echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022402cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022403/* confdefs.h. */
22404_ACEOF
22405cat confdefs.h >>conftest.$ac_ext
22406cat >>conftest.$ac_ext <<_ACEOF
22407/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022408
22409#ifdef HAVE_STDARG_PROTOTYPES
22410#include <stdarg.h>
22411#else
22412#include <varargs.h>
22413#endif
22414
Martin v. Löwis11437992002-04-12 09:54:03 +000022415int
22416main ()
22417{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022418va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022419 ;
22420 return 0;
22421}
22422_ACEOF
22423rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022424if { (ac_try="$ac_compile"
22425case "(($ac_try" in
22426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22427 *) ac_try_echo=$ac_try;;
22428esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022430 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022431 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022432 grep -v '^ *+' conftest.er1 >conftest.err
22433 rm -f conftest.er1
22434 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022436 (exit $ac_status); } && {
22437 test -z "$ac_c_werror_flag" ||
22438 test ! -s conftest.err
22439 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022440 :
22441else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022443sed 's/^/| /' conftest.$ac_ext >&5
22444
Martin v. Löwis11437992002-04-12 09:54:03 +000022445
22446
22447cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022448#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022449_ACEOF
22450
Guido van Rossumda88dad1995-01-26 00:46:29 +000022451 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022452
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022454
22455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022456{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22457echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022458
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022459# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022460
22461
22462
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022463{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22464echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022465if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022466 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022467else
Martin v. Löwis11437992002-04-12 09:54:03 +000022468 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022469/* confdefs.h. */
22470_ACEOF
22471cat confdefs.h >>conftest.$ac_ext
22472cat >>conftest.$ac_ext <<_ACEOF
22473/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022474/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22475 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22476#define gethostbyname_r innocuous_gethostbyname_r
22477
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022478/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022479 which can conflict with char gethostbyname_r (); below.
22480 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022481 <limits.h> exists even on freestanding compilers. */
22482
22483#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022484# include <limits.h>
22485#else
22486# include <assert.h>
22487#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022488
22489#undef gethostbyname_r
22490
Martin v. Löwiseba40652007-08-30 20:10:57 +000022491/* Override any GCC internal prototype to avoid an error.
22492 Use char because int might match the return type of a GCC
22493 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022494#ifdef __cplusplus
22495extern "C"
22496#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022497char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022498/* The GNU C library defines this for functions which it implements
22499 to always fail with ENOSYS. Some functions are actually named
22500 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022501#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022502choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022503#endif
22504
Skip Montanaro6dead952003-09-25 14:50:04 +000022505int
22506main ()
22507{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022508return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022509 ;
22510 return 0;
22511}
22512_ACEOF
22513rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022514if { (ac_try="$ac_link"
22515case "(($ac_try" in
22516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22517 *) ac_try_echo=$ac_try;;
22518esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022520 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022521 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022522 grep -v '^ *+' conftest.er1 >conftest.err
22523 rm -f conftest.er1
22524 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022526 (exit $ac_status); } && {
22527 test -z "$ac_c_werror_flag" ||
22528 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022529 } && test -s conftest$ac_exeext &&
22530 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022531 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022532else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022533 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022534sed 's/^/| /' conftest.$ac_ext >&5
22535
Martin v. Löwiseba40652007-08-30 20:10:57 +000022536 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022537fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022538
22539rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022540 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022541fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022542{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22543echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22544if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022545
Martin v. Löwis11437992002-04-12 09:54:03 +000022546 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022547#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022548_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022549
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022550 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22551echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022552 OLD_CFLAGS=$CFLAGS
22553 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022554 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022555/* confdefs.h. */
22556_ACEOF
22557cat confdefs.h >>conftest.$ac_ext
22558cat >>conftest.$ac_ext <<_ACEOF
22559/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022560
22561# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022562
Martin v. Löwis11437992002-04-12 09:54:03 +000022563int
22564main ()
22565{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022566
22567 char *name;
22568 struct hostent *he, *res;
22569 char buffer[2048];
22570 int buflen = 2048;
22571 int h_errnop;
22572
22573 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022574
22575 ;
22576 return 0;
22577}
22578_ACEOF
22579rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022580if { (ac_try="$ac_compile"
22581case "(($ac_try" in
22582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22583 *) ac_try_echo=$ac_try;;
22584esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022586 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022587 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022588 grep -v '^ *+' conftest.er1 >conftest.err
22589 rm -f conftest.er1
22590 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022592 (exit $ac_status); } && {
22593 test -z "$ac_c_werror_flag" ||
22594 test ! -s conftest.err
22595 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022596
22597 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022598#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022599_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022600
Martin v. Löwis11437992002-04-12 09:54:03 +000022601
22602cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022603#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022604_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022605
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022606 { echo "$as_me:$LINENO: result: yes" >&5
22607echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022608
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022609else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022610 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022611sed 's/^/| /' conftest.$ac_ext >&5
22612
Martin v. Löwis11437992002-04-12 09:54:03 +000022613
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022614 { echo "$as_me:$LINENO: result: no" >&5
22615echo "${ECHO_T}no" >&6; }
22616 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22617echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022618 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022619/* confdefs.h. */
22620_ACEOF
22621cat confdefs.h >>conftest.$ac_ext
22622cat >>conftest.$ac_ext <<_ACEOF
22623/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022624
22625# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022626
Martin v. Löwis11437992002-04-12 09:54:03 +000022627int
22628main ()
22629{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022630
22631 char *name;
22632 struct hostent *he;
22633 char buffer[2048];
22634 int buflen = 2048;
22635 int h_errnop;
22636
22637 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022638
22639 ;
22640 return 0;
22641}
22642_ACEOF
22643rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022644if { (ac_try="$ac_compile"
22645case "(($ac_try" in
22646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22647 *) ac_try_echo=$ac_try;;
22648esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022650 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022651 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022652 grep -v '^ *+' conftest.er1 >conftest.err
22653 rm -f conftest.er1
22654 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022656 (exit $ac_status); } && {
22657 test -z "$ac_c_werror_flag" ||
22658 test ! -s conftest.err
22659 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022660
22661 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022662#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022663_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022664
Martin v. Löwis11437992002-04-12 09:54:03 +000022665
22666cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022667#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022668_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022669
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022670 { echo "$as_me:$LINENO: result: yes" >&5
22671echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022672
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022673else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022674 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022675sed 's/^/| /' conftest.$ac_ext >&5
22676
Martin v. Löwis11437992002-04-12 09:54:03 +000022677
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022678 { echo "$as_me:$LINENO: result: no" >&5
22679echo "${ECHO_T}no" >&6; }
22680 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22681echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022682 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022683/* confdefs.h. */
22684_ACEOF
22685cat confdefs.h >>conftest.$ac_ext
22686cat >>conftest.$ac_ext <<_ACEOF
22687/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022688
22689# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022690
Martin v. Löwis11437992002-04-12 09:54:03 +000022691int
22692main ()
22693{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022694
22695 char *name;
22696 struct hostent *he;
22697 struct hostent_data data;
22698
22699 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022700
22701 ;
22702 return 0;
22703}
22704_ACEOF
22705rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022706if { (ac_try="$ac_compile"
22707case "(($ac_try" in
22708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22709 *) ac_try_echo=$ac_try;;
22710esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022712 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022713 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022714 grep -v '^ *+' conftest.er1 >conftest.err
22715 rm -f conftest.er1
22716 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022718 (exit $ac_status); } && {
22719 test -z "$ac_c_werror_flag" ||
22720 test ! -s conftest.err
22721 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022722
22723 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022724#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022725_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022726
Martin v. Löwis11437992002-04-12 09:54:03 +000022727
22728cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022729#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022730_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022731
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022732 { echo "$as_me:$LINENO: result: yes" >&5
22733echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022734
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022735else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022737sed 's/^/| /' conftest.$ac_ext >&5
22738
Martin v. Löwis11437992002-04-12 09:54:03 +000022739
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022740 { echo "$as_me:$LINENO: result: no" >&5
22741echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022742
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022743fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022744
22745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022746
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022748
22749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022750
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022752
22753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022754 CFLAGS=$OLD_CFLAGS
22755
22756else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022757
Martin v. Löwis11437992002-04-12 09:54:03 +000022758
22759for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022760do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022761as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22762{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22763echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022764if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022765 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022766else
Martin v. Löwis11437992002-04-12 09:54:03 +000022767 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022768/* confdefs.h. */
22769_ACEOF
22770cat confdefs.h >>conftest.$ac_ext
22771cat >>conftest.$ac_ext <<_ACEOF
22772/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022773/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22774 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22775#define $ac_func innocuous_$ac_func
22776
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022777/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022778 which can conflict with char $ac_func (); below.
22779 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022780 <limits.h> exists even on freestanding compilers. */
22781
22782#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022783# include <limits.h>
22784#else
22785# include <assert.h>
22786#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022787
22788#undef $ac_func
22789
Martin v. Löwiseba40652007-08-30 20:10:57 +000022790/* Override any GCC internal prototype to avoid an error.
22791 Use char because int might match the return type of a GCC
22792 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022793#ifdef __cplusplus
22794extern "C"
22795#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022796char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022797/* The GNU C library defines this for functions which it implements
22798 to always fail with ENOSYS. Some functions are actually named
22799 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022800#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022801choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022802#endif
22803
Skip Montanaro6dead952003-09-25 14:50:04 +000022804int
22805main ()
22806{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022807return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022808 ;
22809 return 0;
22810}
22811_ACEOF
22812rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022813if { (ac_try="$ac_link"
22814case "(($ac_try" in
22815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22816 *) ac_try_echo=$ac_try;;
22817esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022819 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022820 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022821 grep -v '^ *+' conftest.er1 >conftest.err
22822 rm -f conftest.er1
22823 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022825 (exit $ac_status); } && {
22826 test -z "$ac_c_werror_flag" ||
22827 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022828 } && test -s conftest$ac_exeext &&
22829 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022830 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022831else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022833sed 's/^/| /' conftest.$ac_ext >&5
22834
Martin v. Löwiseba40652007-08-30 20:10:57 +000022835 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022836fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022837
22838rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022839 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022840fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022841ac_res=`eval echo '${'$as_ac_var'}'`
22842 { echo "$as_me:$LINENO: result: $ac_res" >&5
22843echo "${ECHO_T}$ac_res" >&6; }
22844if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022845 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022846#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022847_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022848
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022849fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022850done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022851
Michael W. Hudson54241132001-12-07 15:38:26 +000022852
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022853fi
22854
Michael W. Hudson54241132001-12-07 15:38:26 +000022855
22856
22857
22858
22859
22860
Guido van Rossum627b2d71993-12-24 10:39:16 +000022861# checks for system services
22862# (none yet)
22863
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022864# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022865{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22866echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022867if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022868 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022869else
Martin v. Löwis11437992002-04-12 09:54:03 +000022870 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022871/* confdefs.h. */
22872_ACEOF
22873cat confdefs.h >>conftest.$ac_ext
22874cat >>conftest.$ac_ext <<_ACEOF
22875/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022876/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22877 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22878#define __fpu_control innocuous___fpu_control
22879
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022880/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022881 which can conflict with char __fpu_control (); below.
22882 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022883 <limits.h> exists even on freestanding compilers. */
22884
22885#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022886# include <limits.h>
22887#else
22888# include <assert.h>
22889#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022890
22891#undef __fpu_control
22892
Martin v. Löwiseba40652007-08-30 20:10:57 +000022893/* Override any GCC internal prototype to avoid an error.
22894 Use char because int might match the return type of a GCC
22895 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022896#ifdef __cplusplus
22897extern "C"
22898#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022899char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022900/* The GNU C library defines this for functions which it implements
22901 to always fail with ENOSYS. Some functions are actually named
22902 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022903#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022904choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022905#endif
22906
Skip Montanaro6dead952003-09-25 14:50:04 +000022907int
22908main ()
22909{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022910return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022911 ;
22912 return 0;
22913}
22914_ACEOF
22915rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022916if { (ac_try="$ac_link"
22917case "(($ac_try" in
22918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22919 *) ac_try_echo=$ac_try;;
22920esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022922 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022923 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022924 grep -v '^ *+' conftest.er1 >conftest.err
22925 rm -f conftest.er1
22926 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022928 (exit $ac_status); } && {
22929 test -z "$ac_c_werror_flag" ||
22930 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022931 } && test -s conftest$ac_exeext &&
22932 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022933 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022934else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022935 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022936sed 's/^/| /' conftest.$ac_ext >&5
22937
Martin v. Löwiseba40652007-08-30 20:10:57 +000022938 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022939fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022940
22941rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022942 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022943fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022944{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22945echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
22946if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022947 :
22948else
Martin v. Löwis11437992002-04-12 09:54:03 +000022949
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022950{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22951echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022952if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022953 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022954else
Martin v. Löwis11437992002-04-12 09:54:03 +000022955 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022956LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022957cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022958/* confdefs.h. */
22959_ACEOF
22960cat confdefs.h >>conftest.$ac_ext
22961cat >>conftest.$ac_ext <<_ACEOF
22962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022963
Martin v. Löwiseba40652007-08-30 20:10:57 +000022964/* Override any GCC internal prototype to avoid an error.
22965 Use char because int might match the return type of a GCC
22966 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022967#ifdef __cplusplus
22968extern "C"
22969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022970char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022971int
22972main ()
22973{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022974return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022975 ;
22976 return 0;
22977}
22978_ACEOF
22979rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022980if { (ac_try="$ac_link"
22981case "(($ac_try" in
22982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22983 *) ac_try_echo=$ac_try;;
22984esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022986 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022987 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022988 grep -v '^ *+' conftest.er1 >conftest.err
22989 rm -f conftest.er1
22990 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022992 (exit $ac_status); } && {
22993 test -z "$ac_c_werror_flag" ||
22994 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022995 } && test -s conftest$ac_exeext &&
22996 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022997 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022998else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023000sed 's/^/| /' conftest.$ac_ext >&5
23001
Martin v. Löwiseba40652007-08-30 20:10:57 +000023002 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023004
23005rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023006 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023007LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023008fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023009{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23010echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23011if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023012 cat >>confdefs.h <<_ACEOF
23013#define HAVE_LIBIEEE 1
23014_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023015
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023016 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023017
Guido van Rossum627b2d71993-12-24 10:39:16 +000023018fi
23019
Michael W. Hudson54241132001-12-07 15:38:26 +000023020
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023021fi
23022
Michael W. Hudson54241132001-12-07 15:38:26 +000023023
Guido van Rossum7f253911997-05-09 02:42:48 +000023024# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023025{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23026echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023027
Martin v. Löwiseba40652007-08-30 20:10:57 +000023028# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023029if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023030 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023031if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023032then
23033
23034cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023035#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023036_ACEOF
23037
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023038 { echo "$as_me:$LINENO: result: yes" >&5
23039echo "${ECHO_T}yes" >&6; }
23040else { echo "$as_me:$LINENO: result: no" >&5
23041echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023042fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023043else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023044 { echo "$as_me:$LINENO: result: no" >&5
23045echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023046fi
23047
Guido van Rossum7f253911997-05-09 02:42:48 +000023048
Guido van Rossum7f43da71994-08-01 12:15:30 +000023049# check for --with-libm=...
23050
Guido van Rossum563e7081996-09-10 18:20:48 +000023051case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023052Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023053BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023054*) LIBM=-lm
23055esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023056{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23057echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023058
Martin v. Löwiseba40652007-08-30 20:10:57 +000023059# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023060if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023061 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023062if test "$withval" = no
23063then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023064 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23065echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023066elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023067then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023068 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23069echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23070else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23071echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023072 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023073fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023074else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023075 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23076echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023077fi
23078
Guido van Rossum7f43da71994-08-01 12:15:30 +000023079
23080# check for --with-libc=...
23081
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023082{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23083echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023084
Martin v. Löwiseba40652007-08-30 20:10:57 +000023085# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023086if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023087 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023088if test "$withval" = no
23089then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023090 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23091echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023092elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023093then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023094 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23095echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23096else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23097echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023098 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023099fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023100else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023101 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23102echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023103fi
23104
Guido van Rossum7f43da71994-08-01 12:15:30 +000023105
Christian Heimes0a8143f2007-12-18 23:22:54 +000023106# ************************************
23107# * Check for mathematical functions *
23108# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023109
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023110LIBS_SAVE=$LIBS
23111LIBS="$LIBS $LIBM"
23112
Mark Dickinson04b27232009-01-04 12:29:36 +000023113# Detect whether system arithmetic is subject to x87-style double
23114# rounding issues. The result of this test has little meaning on non
23115# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23116# mode is round-to-nearest and double rounding issues are present, and
23117# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023118{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23119echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000023120if test "${ac_cv_x87_double_rounding+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023121 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson04b27232009-01-04 12:29:36 +000023122else
23123
23124if test "$cross_compiling" = yes; then
23125 ac_cv_x87_double_rounding=no
23126else
23127 cat >conftest.$ac_ext <<_ACEOF
23128/* confdefs.h. */
23129_ACEOF
23130cat confdefs.h >>conftest.$ac_ext
23131cat >>conftest.$ac_ext <<_ACEOF
23132/* end confdefs.h. */
23133
23134#include <stdlib.h>
23135#include <math.h>
23136int main() {
23137 volatile double x, y, z;
23138 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23139 x = 0.99999999999999989; /* 1-2**-53 */
23140 y = 1./x;
23141 if (y != 1.)
23142 exit(0);
23143 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23144 x = 1e16;
23145 y = 2.99999;
23146 z = x + y;
23147 if (z != 1e16+4.)
23148 exit(0);
23149 /* both tests show evidence of double rounding */
23150 exit(1);
23151}
23152
23153_ACEOF
23154rm -f conftest$ac_exeext
23155if { (ac_try="$ac_link"
23156case "(($ac_try" in
23157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23158 *) ac_try_echo=$ac_try;;
23159esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023161 (eval "$ac_link") 2>&5
23162 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023164 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23165 { (case "(($ac_try" in
23166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23167 *) ac_try_echo=$ac_try;;
23168esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023170 (eval "$ac_try") 2>&5
23171 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023173 (exit $ac_status); }; }; then
23174 ac_cv_x87_double_rounding=no
23175else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023176 echo "$as_me: program exited with status $ac_status" >&5
23177echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023178sed 's/^/| /' conftest.$ac_ext >&5
23179
23180( exit $ac_status )
23181ac_cv_x87_double_rounding=yes
23182fi
23183rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23184fi
23185
23186
23187fi
23188
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023189{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23190echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000023191if test "$ac_cv_x87_double_rounding" = yes
23192then
23193
23194cat >>confdefs.h <<\_ACEOF
23195#define X87_DOUBLE_ROUNDING 1
23196_ACEOF
23197
23198fi
23199
Jesse Noller355b1262009-04-02 00:03:28 +000023200# Multiprocessing check for broken sem_getvalue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023201{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23202echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023203if test "${ac_cv_broken_sem_getvalue+set}" = set; then
23204 echo $ECHO_N "(cached) $ECHO_C" >&6
23205else
23206 if test "$cross_compiling" = yes; then
23207 ac_cv_broken_sem_getvalue=yes
Jesse Noller355b1262009-04-02 00:03:28 +000023208else
23209 cat >conftest.$ac_ext <<_ACEOF
23210/* confdefs.h. */
23211_ACEOF
23212cat confdefs.h >>conftest.$ac_ext
23213cat >>conftest.$ac_ext <<_ACEOF
23214/* end confdefs.h. */
23215
23216#include <unistd.h>
23217#include <fcntl.h>
23218#include <stdio.h>
23219#include <semaphore.h>
23220#include <sys/stat.h>
23221
23222int main(void){
23223 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23224 int count;
23225 int res;
23226 if(a==SEM_FAILED){
23227 perror("sem_open");
23228 return 1;
23229
23230 }
23231 res = sem_getvalue(a, &count);
23232 sem_close(a);
23233 return res==-1 ? 1 : 0;
23234}
23235
Jesse Noller355b1262009-04-02 00:03:28 +000023236_ACEOF
23237rm -f conftest$ac_exeext
23238if { (ac_try="$ac_link"
23239case "(($ac_try" in
23240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23241 *) ac_try_echo=$ac_try;;
23242esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023244 (eval "$ac_link") 2>&5
23245 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023247 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23248 { (case "(($ac_try" in
23249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23250 *) ac_try_echo=$ac_try;;
23251esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023253 (eval "$ac_try") 2>&5
23254 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023256 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023257 ac_cv_broken_sem_getvalue=no
Jesse Noller355b1262009-04-02 00:03:28 +000023258else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023259 echo "$as_me: program exited with status $ac_status" >&5
23260echo "$as_me: failed program was:" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023261sed 's/^/| /' conftest.$ac_ext >&5
23262
23263( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023264ac_cv_broken_sem_getvalue=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000023265fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023266rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23267fi
23268
23269
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000023270
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023271fi
23272
23273{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23274echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
23275if test $ac_cv_broken_sem_getvalue = yes
23276then
23277
23278cat >>confdefs.h <<\_ACEOF
23279#define HAVE_BROKEN_SEM_GETVALUE 1
23280_ACEOF
23281
23282fi
23283
Mark Dickinson265d7382008-04-21 22:32:24 +000023284# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23285# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023286{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23287echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000023288if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023289 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000023290else
23291
23292if test "$cross_compiling" = yes; then
23293 ac_cv_tanh_preserves_zero_sign=no
23294else
23295 cat >conftest.$ac_ext <<_ACEOF
23296/* confdefs.h. */
23297_ACEOF
23298cat confdefs.h >>conftest.$ac_ext
23299cat >>conftest.$ac_ext <<_ACEOF
23300/* end confdefs.h. */
23301
23302#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023303#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000023304int main() {
23305 /* return 0 if either negative zeros don't exist
23306 on this platform or if negative zeros exist
23307 and tanh(-0.) == -0. */
23308 if (atan2(0., -1.) == atan2(-0., -1.) ||
23309 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23310 else exit(1);
23311}
23312
23313_ACEOF
23314rm -f conftest$ac_exeext
23315if { (ac_try="$ac_link"
23316case "(($ac_try" in
23317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23318 *) ac_try_echo=$ac_try;;
23319esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023321 (eval "$ac_link") 2>&5
23322 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023324 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23325 { (case "(($ac_try" in
23326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23327 *) ac_try_echo=$ac_try;;
23328esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023330 (eval "$ac_try") 2>&5
23331 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023333 (exit $ac_status); }; }; then
23334 ac_cv_tanh_preserves_zero_sign=yes
23335else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023336 echo "$as_me: program exited with status $ac_status" >&5
23337echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023338sed 's/^/| /' conftest.$ac_ext >&5
23339
23340( exit $ac_status )
23341ac_cv_tanh_preserves_zero_sign=no
23342fi
23343rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23344fi
23345
23346
23347fi
23348
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023349{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23350echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000023351if test "$ac_cv_tanh_preserves_zero_sign" = yes
23352then
23353
23354cat >>confdefs.h <<\_ACEOF
23355#define TANH_PRESERVES_ZERO_SIGN 1
23356_ACEOF
23357
23358fi
23359
Martin v. Löwis11437992002-04-12 09:54:03 +000023360
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023361
Michael W. Hudson54241132001-12-07 15:38:26 +000023362
Christian Heimes0a8143f2007-12-18 23:22:54 +000023363
23364
23365
23366
23367
Mark Dickinson8e5446f2009-04-18 14:41:37 +000023368
23369for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
Christian Heimes0a8143f2007-12-18 23:22:54 +000023370do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023371as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23372{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23373echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000023374if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023375 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000023376else
23377 cat >conftest.$ac_ext <<_ACEOF
23378/* confdefs.h. */
23379_ACEOF
23380cat confdefs.h >>conftest.$ac_ext
23381cat >>conftest.$ac_ext <<_ACEOF
23382/* end confdefs.h. */
23383/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23384 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23385#define $ac_func innocuous_$ac_func
23386
23387/* System header to define __stub macros and hopefully few prototypes,
23388 which can conflict with char $ac_func (); below.
23389 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23390 <limits.h> exists even on freestanding compilers. */
23391
23392#ifdef __STDC__
23393# include <limits.h>
23394#else
23395# include <assert.h>
23396#endif
23397
23398#undef $ac_func
23399
23400/* Override any GCC internal prototype to avoid an error.
23401 Use char because int might match the return type of a GCC
23402 builtin and then its argument prototype would still apply. */
23403#ifdef __cplusplus
23404extern "C"
23405#endif
23406char $ac_func ();
23407/* The GNU C library defines this for functions which it implements
23408 to always fail with ENOSYS. Some functions are actually named
23409 something starting with __ and the normal name is an alias. */
23410#if defined __stub_$ac_func || defined __stub___$ac_func
23411choke me
23412#endif
23413
23414int
23415main ()
23416{
23417return $ac_func ();
23418 ;
23419 return 0;
23420}
23421_ACEOF
23422rm -f conftest.$ac_objext conftest$ac_exeext
23423if { (ac_try="$ac_link"
23424case "(($ac_try" in
23425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23426 *) ac_try_echo=$ac_try;;
23427esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000023429 (eval "$ac_link") 2>conftest.er1
23430 ac_status=$?
23431 grep -v '^ *+' conftest.er1 >conftest.err
23432 rm -f conftest.er1
23433 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000023435 (exit $ac_status); } && {
23436 test -z "$ac_c_werror_flag" ||
23437 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023438 } && test -s conftest$ac_exeext &&
23439 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000023440 eval "$as_ac_var=yes"
23441else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023442 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000023443sed 's/^/| /' conftest.$ac_ext >&5
23444
23445 eval "$as_ac_var=no"
23446fi
23447
23448rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23449 conftest$ac_exeext conftest.$ac_ext
23450fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023451ac_res=`eval echo '${'$as_ac_var'}'`
23452 { echo "$as_me:$LINENO: result: $ac_res" >&5
23453echo "${ECHO_T}$ac_res" >&6; }
23454if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000023455 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023456#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000023457_ACEOF
23458
23459fi
23460done
23461
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023462{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23463echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023464if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023465 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023466else
23467 cat >conftest.$ac_ext <<_ACEOF
23468/* confdefs.h. */
23469_ACEOF
23470cat confdefs.h >>conftest.$ac_ext
23471cat >>conftest.$ac_ext <<_ACEOF
23472/* end confdefs.h. */
23473#include <math.h>
23474
23475int
23476main ()
23477{
23478#ifndef isinf
23479 (void) isinf;
23480#endif
23481
23482 ;
23483 return 0;
23484}
23485_ACEOF
23486rm -f conftest.$ac_objext
23487if { (ac_try="$ac_compile"
23488case "(($ac_try" in
23489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23490 *) ac_try_echo=$ac_try;;
23491esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023493 (eval "$ac_compile") 2>conftest.er1
23494 ac_status=$?
23495 grep -v '^ *+' conftest.er1 >conftest.err
23496 rm -f conftest.er1
23497 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023499 (exit $ac_status); } && {
23500 test -z "$ac_c_werror_flag" ||
23501 test ! -s conftest.err
23502 } && test -s conftest.$ac_objext; then
23503 ac_cv_have_decl_isinf=yes
23504else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023505 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023506sed 's/^/| /' conftest.$ac_ext >&5
23507
23508 ac_cv_have_decl_isinf=no
23509fi
23510
23511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23512fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023513{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23514echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23515if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023516
23517cat >>confdefs.h <<_ACEOF
23518#define HAVE_DECL_ISINF 1
23519_ACEOF
23520
23521
23522else
23523 cat >>confdefs.h <<_ACEOF
23524#define HAVE_DECL_ISINF 0
23525_ACEOF
23526
23527
23528fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023529{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23530echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023531if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023532 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023533else
23534 cat >conftest.$ac_ext <<_ACEOF
23535/* confdefs.h. */
23536_ACEOF
23537cat confdefs.h >>conftest.$ac_ext
23538cat >>conftest.$ac_ext <<_ACEOF
23539/* end confdefs.h. */
23540#include <math.h>
23541
23542int
23543main ()
23544{
23545#ifndef isnan
23546 (void) isnan;
23547#endif
23548
23549 ;
23550 return 0;
23551}
23552_ACEOF
23553rm -f conftest.$ac_objext
23554if { (ac_try="$ac_compile"
23555case "(($ac_try" in
23556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23557 *) ac_try_echo=$ac_try;;
23558esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023560 (eval "$ac_compile") 2>conftest.er1
23561 ac_status=$?
23562 grep -v '^ *+' conftest.er1 >conftest.err
23563 rm -f conftest.er1
23564 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023566 (exit $ac_status); } && {
23567 test -z "$ac_c_werror_flag" ||
23568 test ! -s conftest.err
23569 } && test -s conftest.$ac_objext; then
23570 ac_cv_have_decl_isnan=yes
23571else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023572 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023573sed 's/^/| /' conftest.$ac_ext >&5
23574
23575 ac_cv_have_decl_isnan=no
23576fi
23577
23578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23579fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023580{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23581echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23582if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023583
23584cat >>confdefs.h <<_ACEOF
23585#define HAVE_DECL_ISNAN 1
23586_ACEOF
23587
23588
23589else
23590 cat >>confdefs.h <<_ACEOF
23591#define HAVE_DECL_ISNAN 0
23592_ACEOF
23593
23594
23595fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023596{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23597echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023598if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023599 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023600else
23601 cat >conftest.$ac_ext <<_ACEOF
23602/* confdefs.h. */
23603_ACEOF
23604cat confdefs.h >>conftest.$ac_ext
23605cat >>conftest.$ac_ext <<_ACEOF
23606/* end confdefs.h. */
23607#include <math.h>
23608
23609int
23610main ()
23611{
23612#ifndef isfinite
23613 (void) isfinite;
23614#endif
23615
23616 ;
23617 return 0;
23618}
23619_ACEOF
23620rm -f conftest.$ac_objext
23621if { (ac_try="$ac_compile"
23622case "(($ac_try" in
23623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23624 *) ac_try_echo=$ac_try;;
23625esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023627 (eval "$ac_compile") 2>conftest.er1
23628 ac_status=$?
23629 grep -v '^ *+' conftest.er1 >conftest.err
23630 rm -f conftest.er1
23631 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023633 (exit $ac_status); } && {
23634 test -z "$ac_c_werror_flag" ||
23635 test ! -s conftest.err
23636 } && test -s conftest.$ac_objext; then
23637 ac_cv_have_decl_isfinite=yes
23638else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023639 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023640sed 's/^/| /' conftest.$ac_ext >&5
23641
23642 ac_cv_have_decl_isfinite=no
23643fi
23644
23645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23646fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023647{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23648echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
23649if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023650
23651cat >>confdefs.h <<_ACEOF
23652#define HAVE_DECL_ISFINITE 1
23653_ACEOF
23654
23655
23656else
23657 cat >>confdefs.h <<_ACEOF
23658#define HAVE_DECL_ISFINITE 0
23659_ACEOF
23660
23661
23662fi
23663
23664
Christian Heimes0a8143f2007-12-18 23:22:54 +000023665
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023666LIBS=$LIBS_SAVE
23667
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023668# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023669{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23670echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023671# Check whether --enable-big-digits was given.
23672if test "${enable_big_digits+set}" = set; then
23673 enableval=$enable_big_digits; case $enable_big_digits in
23674yes)
23675 enable_big_digits=30 ;;
23676no)
23677 enable_big_digits=15 ;;
2367815|30)
23679 ;;
23680*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023681 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23682echo "$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 +000023683 { (exit 1); exit 1; }; } ;;
23684esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023685{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23686echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023687
23688cat >>confdefs.h <<_ACEOF
23689#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23690_ACEOF
23691
23692
23693else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023694 { echo "$as_me:$LINENO: result: no value specified" >&5
23695echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023696fi
23697
23698
Guido van Rossumef2255b2000-03-10 22:30:29 +000023699# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023700if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023701 { echo "$as_me:$LINENO: checking for wchar.h" >&5
23702echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023703if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023704 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023705fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023706{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23707echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023708else
Martin v. Löwis11437992002-04-12 09:54:03 +000023709 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023710{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
23711echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023712cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023713/* confdefs.h. */
23714_ACEOF
23715cat confdefs.h >>conftest.$ac_ext
23716cat >>conftest.$ac_ext <<_ACEOF
23717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023718$ac_includes_default
23719#include <wchar.h>
23720_ACEOF
23721rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023722if { (ac_try="$ac_compile"
23723case "(($ac_try" in
23724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23725 *) ac_try_echo=$ac_try;;
23726esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023728 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023730 grep -v '^ *+' conftest.er1 >conftest.err
23731 rm -f conftest.er1
23732 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023734 (exit $ac_status); } && {
23735 test -z "$ac_c_werror_flag" ||
23736 test ! -s conftest.err
23737 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023738 ac_header_compiler=yes
23739else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023741sed 's/^/| /' conftest.$ac_ext >&5
23742
Martin v. Löwiseba40652007-08-30 20:10:57 +000023743 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023745
23746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023747{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23748echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023749
23750# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023751{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
23752echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023753cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023754/* confdefs.h. */
23755_ACEOF
23756cat confdefs.h >>conftest.$ac_ext
23757cat >>conftest.$ac_ext <<_ACEOF
23758/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023759#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023760_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023761if { (ac_try="$ac_cpp conftest.$ac_ext"
23762case "(($ac_try" in
23763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23764 *) ac_try_echo=$ac_try;;
23765esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023767 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023768 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023769 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023770 rm -f conftest.er1
23771 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023773 (exit $ac_status); } >/dev/null && {
23774 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23775 test ! -s conftest.err
23776 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023777 ac_header_preproc=yes
23778else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023780sed 's/^/| /' conftest.$ac_ext >&5
23781
Martin v. Löwis11437992002-04-12 09:54:03 +000023782 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023784
Martin v. Löwis11437992002-04-12 09:54:03 +000023785rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023786{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23787echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023788
23789# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023790case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23791 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023792 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23793echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23794 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23795echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023796 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023797 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023798 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023799 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23800echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23801 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23802echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23803 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23804echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
23805 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
23806echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
23807 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
23808echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
23809 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
23810echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000023811 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000023812## -------------------------------------- ##
23813## Report this to http://bugs.python.org/ ##
23814## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000023815_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000023816 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000023817 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023818esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023819{ echo "$as_me:$LINENO: checking for wchar.h" >&5
23820echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023821if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023822 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023823else
23824 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000023825fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023826{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23827echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023828
23829fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023830if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023831
23832
23833cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023834#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023835_ACEOF
23836
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023837 wchar_h="yes"
23838
Guido van Rossumef2255b2000-03-10 22:30:29 +000023839else
Martin v. Löwis11437992002-04-12 09:54:03 +000023840 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000023841
23842fi
23843
Michael W. Hudson54241132001-12-07 15:38:26 +000023844
Martin v. Löwis11437992002-04-12 09:54:03 +000023845
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023846# determine wchar_t size
23847if test "$wchar_h" = yes
23848then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023849 { echo "$as_me:$LINENO: checking for wchar_t" >&5
23850echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
23851if test "${ac_cv_type_wchar_t+set}" = set; then
23852 echo $ECHO_N "(cached) $ECHO_C" >&6
23853else
23854 cat >conftest.$ac_ext <<_ACEOF
23855/* confdefs.h. */
23856_ACEOF
23857cat confdefs.h >>conftest.$ac_ext
23858cat >>conftest.$ac_ext <<_ACEOF
23859/* end confdefs.h. */
23860#include <wchar.h>
23861
23862typedef wchar_t ac__type_new_;
23863int
23864main ()
23865{
23866if ((ac__type_new_ *) 0)
23867 return 0;
23868if (sizeof (ac__type_new_))
23869 return 0;
23870 ;
23871 return 0;
23872}
23873_ACEOF
23874rm -f conftest.$ac_objext
23875if { (ac_try="$ac_compile"
23876case "(($ac_try" in
23877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23878 *) ac_try_echo=$ac_try;;
23879esac
23880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23881 (eval "$ac_compile") 2>conftest.er1
23882 ac_status=$?
23883 grep -v '^ *+' conftest.er1 >conftest.err
23884 rm -f conftest.er1
23885 cat conftest.err >&5
23886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23887 (exit $ac_status); } && {
23888 test -z "$ac_c_werror_flag" ||
23889 test ! -s conftest.err
23890 } && test -s conftest.$ac_objext; then
23891 ac_cv_type_wchar_t=yes
23892else
23893 echo "$as_me: failed program was:" >&5
23894sed 's/^/| /' conftest.$ac_ext >&5
23895
23896 ac_cv_type_wchar_t=no
23897fi
23898
23899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23900fi
23901{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
23902echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
23903
23904# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000023905# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23906# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23907# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023908{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
23909echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023910if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023911 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023912else
Martin v. Löwis11437992002-04-12 09:54:03 +000023913 if test "$cross_compiling" = yes; then
23914 # Depending upon the size, compute the lo and hi bounds.
23915cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023916/* confdefs.h. */
23917_ACEOF
23918cat confdefs.h >>conftest.$ac_ext
23919cat >>conftest.$ac_ext <<_ACEOF
23920/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023921#include <wchar.h>
23922
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023923 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023924int
23925main ()
23926{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023927static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023928test_array [0] = 0
23929
23930 ;
23931 return 0;
23932}
23933_ACEOF
23934rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023935if { (ac_try="$ac_compile"
23936case "(($ac_try" in
23937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23938 *) ac_try_echo=$ac_try;;
23939esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023941 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023943 grep -v '^ *+' conftest.er1 >conftest.err
23944 rm -f conftest.er1
23945 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023947 (exit $ac_status); } && {
23948 test -z "$ac_c_werror_flag" ||
23949 test ! -s conftest.err
23950 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023951 ac_lo=0 ac_mid=0
23952 while :; do
23953 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023954/* confdefs.h. */
23955_ACEOF
23956cat confdefs.h >>conftest.$ac_ext
23957cat >>conftest.$ac_ext <<_ACEOF
23958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023959#include <wchar.h>
23960
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023961 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023962int
23963main ()
23964{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023965static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023966test_array [0] = 0
23967
23968 ;
23969 return 0;
23970}
23971_ACEOF
23972rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023973if { (ac_try="$ac_compile"
23974case "(($ac_try" in
23975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23976 *) ac_try_echo=$ac_try;;
23977esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023979 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023981 grep -v '^ *+' conftest.er1 >conftest.err
23982 rm -f conftest.er1
23983 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023985 (exit $ac_status); } && {
23986 test -z "$ac_c_werror_flag" ||
23987 test ! -s conftest.err
23988 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023989 ac_hi=$ac_mid; break
23990else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023992sed 's/^/| /' conftest.$ac_ext >&5
23993
Martin v. Löwiseba40652007-08-30 20:10:57 +000023994 ac_lo=`expr $ac_mid + 1`
23995 if test $ac_lo -le $ac_mid; then
23996 ac_lo= ac_hi=
23997 break
23998 fi
23999 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024001
24002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024003 done
24004else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024006sed 's/^/| /' conftest.$ac_ext >&5
24007
Martin v. Löwiseba40652007-08-30 20:10:57 +000024008 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024009/* confdefs.h. */
24010_ACEOF
24011cat confdefs.h >>conftest.$ac_ext
24012cat >>conftest.$ac_ext <<_ACEOF
24013/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024014#include <wchar.h>
24015
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024016 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024017int
24018main ()
24019{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024020static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024021test_array [0] = 0
24022
24023 ;
24024 return 0;
24025}
24026_ACEOF
24027rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024028if { (ac_try="$ac_compile"
24029case "(($ac_try" in
24030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24031 *) ac_try_echo=$ac_try;;
24032esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024034 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024035 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024036 grep -v '^ *+' conftest.er1 >conftest.err
24037 rm -f conftest.er1
24038 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024040 (exit $ac_status); } && {
24041 test -z "$ac_c_werror_flag" ||
24042 test ! -s conftest.err
24043 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024044 ac_hi=-1 ac_mid=-1
24045 while :; do
24046 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024047/* confdefs.h. */
24048_ACEOF
24049cat confdefs.h >>conftest.$ac_ext
24050cat >>conftest.$ac_ext <<_ACEOF
24051/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024052#include <wchar.h>
24053
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024054 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024055int
24056main ()
24057{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024058static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024059test_array [0] = 0
24060
24061 ;
24062 return 0;
24063}
24064_ACEOF
24065rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024066if { (ac_try="$ac_compile"
24067case "(($ac_try" in
24068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24069 *) ac_try_echo=$ac_try;;
24070esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024072 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024073 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024074 grep -v '^ *+' conftest.er1 >conftest.err
24075 rm -f conftest.er1
24076 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024078 (exit $ac_status); } && {
24079 test -z "$ac_c_werror_flag" ||
24080 test ! -s conftest.err
24081 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024082 ac_lo=$ac_mid; break
24083else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024085sed 's/^/| /' conftest.$ac_ext >&5
24086
Martin v. Löwiseba40652007-08-30 20:10:57 +000024087 ac_hi=`expr '(' $ac_mid ')' - 1`
24088 if test $ac_mid -le $ac_hi; then
24089 ac_lo= ac_hi=
24090 break
24091 fi
24092 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024093fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024094
24095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024096 done
24097else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024099sed 's/^/| /' conftest.$ac_ext >&5
24100
Martin v. Löwiseba40652007-08-30 20:10:57 +000024101 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024103
24104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024106
24107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024108# Binary search between lo and hi bounds.
24109while test "x$ac_lo" != "x$ac_hi"; do
24110 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24111 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024112/* confdefs.h. */
24113_ACEOF
24114cat confdefs.h >>conftest.$ac_ext
24115cat >>conftest.$ac_ext <<_ACEOF
24116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024117#include <wchar.h>
24118
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024119 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024120int
24121main ()
24122{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024123static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024124test_array [0] = 0
24125
24126 ;
24127 return 0;
24128}
24129_ACEOF
24130rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024131if { (ac_try="$ac_compile"
24132case "(($ac_try" in
24133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24134 *) ac_try_echo=$ac_try;;
24135esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024137 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024138 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024139 grep -v '^ *+' conftest.er1 >conftest.err
24140 rm -f conftest.er1
24141 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024143 (exit $ac_status); } && {
24144 test -z "$ac_c_werror_flag" ||
24145 test ! -s conftest.err
24146 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024147 ac_hi=$ac_mid
24148else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024150sed 's/^/| /' conftest.$ac_ext >&5
24151
Martin v. Löwiseba40652007-08-30 20:10:57 +000024152 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024154
24155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024156done
24157case $ac_lo in
24158?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024159'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024160 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024161See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024162echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024163See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024164 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024165 else
24166 ac_cv_sizeof_wchar_t=0
24167 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024168esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024169else
Martin v. Löwis11437992002-04-12 09:54:03 +000024170 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024171/* confdefs.h. */
24172_ACEOF
24173cat confdefs.h >>conftest.$ac_ext
24174cat >>conftest.$ac_ext <<_ACEOF
24175/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024176#include <wchar.h>
24177
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024178 typedef wchar_t ac__type_sizeof_;
24179static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24180static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024181#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024182#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024183int
24184main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024185{
Martin v. Löwis11437992002-04-12 09:54:03 +000024186
24187 FILE *f = fopen ("conftest.val", "w");
24188 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024189 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024190 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024191 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000024192 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024193 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000024194 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024195 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024196 }
24197 else
24198 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000024199 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024200 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000024201 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024202 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024203 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024204 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024205
24206 ;
24207 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024208}
Martin v. Löwis11437992002-04-12 09:54:03 +000024209_ACEOF
24210rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024211if { (ac_try="$ac_link"
24212case "(($ac_try" in
24213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24214 *) ac_try_echo=$ac_try;;
24215esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024217 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024218 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024220 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024221 { (case "(($ac_try" in
24222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24223 *) ac_try_echo=$ac_try;;
24224esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024226 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024227 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024229 (exit $ac_status); }; }; then
24230 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024231else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024232 echo "$as_me: program exited with status $ac_status" >&5
24233echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024234sed 's/^/| /' conftest.$ac_ext >&5
24235
Martin v. Löwis11437992002-04-12 09:54:03 +000024236( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000024237if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024238 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024239See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024240echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024241See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024242 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024243 else
24244 ac_cv_sizeof_wchar_t=0
24245 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024246fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024247rm -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 +000024248fi
24249rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024250fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024251{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24252echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024253
24254
24255
Martin v. Löwis11437992002-04-12 09:54:03 +000024256cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024257#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024258_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024259
Michael W. Hudson54241132001-12-07 15:38:26 +000024260
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024261fi
24262
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024263{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24264echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024265have_ucs4_tcl=no
24266cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024267/* confdefs.h. */
24268_ACEOF
24269cat confdefs.h >>conftest.$ac_ext
24270cat >>conftest.$ac_ext <<_ACEOF
24271/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024272
24273#include <tcl.h>
24274#if TCL_UTF_MAX != 6
24275# error "NOT UCS4_TCL"
24276#endif
24277int
24278main ()
24279{
24280
24281 ;
24282 return 0;
24283}
24284_ACEOF
24285rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024286if { (ac_try="$ac_compile"
24287case "(($ac_try" in
24288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24289 *) ac_try_echo=$ac_try;;
24290esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024292 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024294 grep -v '^ *+' conftest.er1 >conftest.err
24295 rm -f conftest.er1
24296 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024298 (exit $ac_status); } && {
24299 test -z "$ac_c_werror_flag" ||
24300 test ! -s conftest.err
24301 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024302
24303
24304cat >>confdefs.h <<\_ACEOF
24305#define HAVE_UCS4_TCL 1
24306_ACEOF
24307
24308 have_ucs4_tcl=yes
24309
24310else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024312sed 's/^/| /' conftest.$ac_ext >&5
24313
Martin v. Löwiseba40652007-08-30 20:10:57 +000024314
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024315fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024316
24317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024318{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24319echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024320
Skip Montanaro6dead952003-09-25 14:50:04 +000024321# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024322if test "$wchar_h" = yes
24323then
24324 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024325 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24326echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024327 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024328 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024329else
24330
24331 if test "$cross_compiling" = yes; then
24332 ac_cv_wchar_t_signed=yes
24333else
24334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024335/* confdefs.h. */
24336_ACEOF
24337cat confdefs.h >>conftest.$ac_ext
24338cat >>conftest.$ac_ext <<_ACEOF
24339/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024340
24341 #include <wchar.h>
24342 int main()
24343 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000024344 /* Success: exit code 0 */
24345 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024346 }
24347
24348_ACEOF
24349rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024350if { (ac_try="$ac_link"
24351case "(($ac_try" in
24352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24353 *) ac_try_echo=$ac_try;;
24354esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024356 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024357 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024359 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024360 { (case "(($ac_try" in
24361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24362 *) ac_try_echo=$ac_try;;
24363esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024365 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024366 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024368 (exit $ac_status); }; }; then
24369 ac_cv_wchar_t_signed=yes
24370else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024371 echo "$as_me: program exited with status $ac_status" >&5
24372echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024373sed 's/^/| /' conftest.$ac_ext >&5
24374
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024375( exit $ac_status )
24376ac_cv_wchar_t_signed=no
24377fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024378rm -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 +000024379fi
24380
Martin v. Löwiseba40652007-08-30 20:10:57 +000024381
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024382fi
24383
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024384 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24385echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024386fi
24387
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024388{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
24389echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024390# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024391if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024392 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024393else
24394 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000024395fi
24396
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024397
24398if test $enable_unicode = yes
24399then
Martin v. Löwisfd917792001-06-27 20:22:04 +000024400 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024401 case "$have_ucs4_tcl" in
24402 yes) enable_unicode="ucs4"
24403 ;;
24404 *) enable_unicode="ucs2"
24405 ;;
24406 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024407fi
24408
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024409
24410
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024411case "$enable_unicode" in
24412ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000024413 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024414#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000024415_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024416
24417 ;;
24418ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000024419 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024420#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024421_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024422
24423 ;;
24424esac
24425
Michael W. Hudson54241132001-12-07 15:38:26 +000024426
Martin v. Löwis11437992002-04-12 09:54:03 +000024427
24428
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024429
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024430if test "$enable_unicode" = "no"
24431then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000024432 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024433 { echo "$as_me:$LINENO: result: not used" >&5
24434echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024435else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000024436 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000024437
24438cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024439#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024440_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024441
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024442
24443 # wchar_t is only usable if it maps to an unsigned type
24444 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024445 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024446 then
24447 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024448
Martin v. Löwis11437992002-04-12 09:54:03 +000024449cat >>confdefs.h <<\_ACEOF
24450#define HAVE_USABLE_WCHAR_T 1
24451_ACEOF
24452
24453 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024454#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024455_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024456
24457 elif test "$ac_cv_sizeof_short" = "$unicode_size"
24458 then
24459 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000024460 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024461#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024462_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024463
24464 elif test "$ac_cv_sizeof_long" = "$unicode_size"
24465 then
24466 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000024467 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024468#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024469_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024470
24471 else
24472 PY_UNICODE_TYPE="no type found"
24473 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024474 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24475echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024476fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000024477
24478# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024479{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24480echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024481if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024482 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024483else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024484 # See if sys/param.h defines the BYTE_ORDER macro.
24485cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024486/* confdefs.h. */
24487_ACEOF
24488cat confdefs.h >>conftest.$ac_ext
24489cat >>conftest.$ac_ext <<_ACEOF
24490/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024491#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024492#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024493
Martin v. Löwis11437992002-04-12 09:54:03 +000024494int
24495main ()
24496{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024497#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
24498 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
24499 bogus endian macros
24500#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024501
24502 ;
24503 return 0;
24504}
24505_ACEOF
24506rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024507if { (ac_try="$ac_compile"
24508case "(($ac_try" in
24509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24510 *) ac_try_echo=$ac_try;;
24511esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024513 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024515 grep -v '^ *+' conftest.er1 >conftest.err
24516 rm -f conftest.er1
24517 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024519 (exit $ac_status); } && {
24520 test -z "$ac_c_werror_flag" ||
24521 test ! -s conftest.err
24522 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024523 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024524cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024525/* confdefs.h. */
24526_ACEOF
24527cat confdefs.h >>conftest.$ac_ext
24528cat >>conftest.$ac_ext <<_ACEOF
24529/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024530#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024531#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024532
Martin v. Löwis11437992002-04-12 09:54:03 +000024533int
24534main ()
24535{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024536#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024537 not big endian
24538#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024539
24540 ;
24541 return 0;
24542}
24543_ACEOF
24544rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024545if { (ac_try="$ac_compile"
24546case "(($ac_try" in
24547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24548 *) ac_try_echo=$ac_try;;
24549esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024551 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024553 grep -v '^ *+' conftest.er1 >conftest.err
24554 rm -f conftest.er1
24555 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024557 (exit $ac_status); } && {
24558 test -z "$ac_c_werror_flag" ||
24559 test ! -s conftest.err
24560 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024561 ac_cv_c_bigendian=yes
24562else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024564sed 's/^/| /' conftest.$ac_ext >&5
24565
Martin v. Löwiseba40652007-08-30 20:10:57 +000024566 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024567fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024568
24569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024570else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024571 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024572sed 's/^/| /' conftest.$ac_ext >&5
24573
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024574 # It does not; compile a test program.
24575if test "$cross_compiling" = yes; then
24576 # try to guess the endianness by grepping values into an object file
24577 ac_cv_c_bigendian=unknown
24578 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024579/* confdefs.h. */
24580_ACEOF
24581cat confdefs.h >>conftest.$ac_ext
24582cat >>conftest.$ac_ext <<_ACEOF
24583/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024584short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24585short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24586void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
24587short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24588short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24589void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024590int
24591main ()
24592{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024593 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024594 ;
24595 return 0;
24596}
24597_ACEOF
24598rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024599if { (ac_try="$ac_compile"
24600case "(($ac_try" in
24601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24602 *) ac_try_echo=$ac_try;;
24603esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024605 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024607 grep -v '^ *+' conftest.er1 >conftest.err
24608 rm -f conftest.er1
24609 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024611 (exit $ac_status); } && {
24612 test -z "$ac_c_werror_flag" ||
24613 test ! -s conftest.err
24614 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024615 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024616 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024617fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024618if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24619 if test "$ac_cv_c_bigendian" = unknown; then
24620 ac_cv_c_bigendian=no
24621 else
24622 # finding both strings is unlikely to happen, but who knows?
24623 ac_cv_c_bigendian=unknown
24624 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024625fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024626else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024628sed 's/^/| /' conftest.$ac_ext >&5
24629
Martin v. Löwiseba40652007-08-30 20:10:57 +000024630
Martin v. Löwis11437992002-04-12 09:54:03 +000024631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024632
24633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024634else
24635 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024636/* confdefs.h. */
24637_ACEOF
24638cat confdefs.h >>conftest.$ac_ext
24639cat >>conftest.$ac_ext <<_ACEOF
24640/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000024641$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024642int
24643main ()
24644{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024645
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024646 /* Are we little or big endian? From Harbison&Steele. */
24647 union
24648 {
24649 long int l;
24650 char c[sizeof (long int)];
24651 } u;
24652 u.l = 1;
24653 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024654
24655 ;
24656 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024657}
Martin v. Löwis11437992002-04-12 09:54:03 +000024658_ACEOF
24659rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024660if { (ac_try="$ac_link"
24661case "(($ac_try" in
24662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24663 *) ac_try_echo=$ac_try;;
24664esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024666 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024667 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024669 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024670 { (case "(($ac_try" in
24671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24672 *) ac_try_echo=$ac_try;;
24673esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024675 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024676 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024678 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024679 ac_cv_c_bigendian=no
24680else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024681 echo "$as_me: program exited with status $ac_status" >&5
24682echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024683sed 's/^/| /' conftest.$ac_ext >&5
24684
Martin v. Löwis11437992002-04-12 09:54:03 +000024685( exit $ac_status )
24686ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024688rm -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 +000024689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024690
24691
Martin v. Löwis11437992002-04-12 09:54:03 +000024692fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024693
24694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24695fi
24696{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24697echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
24698case $ac_cv_c_bigendian in
24699 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024700
24701cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024702#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024703_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024704 ;;
24705 no)
24706 ;;
24707 *)
24708 { { echo "$as_me:$LINENO: error: unknown endianness
24709presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24710echo "$as_me: error: unknown endianness
24711presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024712 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024713esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024714
Michael W. Hudson54241132001-12-07 15:38:26 +000024715
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024716# Check whether right shifting a negative integer extends the sign bit
24717# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024718{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24719echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024720if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024721 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024722else
Martin v. Löwis11437992002-04-12 09:54:03 +000024723
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024724if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024725 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024726else
Martin v. Löwis11437992002-04-12 09:54:03 +000024727 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024728/* confdefs.h. */
24729_ACEOF
24730cat confdefs.h >>conftest.$ac_ext
24731cat >>conftest.$ac_ext <<_ACEOF
24732/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024733
24734int main()
24735{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024736 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024737}
24738
Martin v. Löwis11437992002-04-12 09:54:03 +000024739_ACEOF
24740rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024741if { (ac_try="$ac_link"
24742case "(($ac_try" in
24743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24744 *) ac_try_echo=$ac_try;;
24745esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024747 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024748 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024750 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024751 { (case "(($ac_try" in
24752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24753 *) ac_try_echo=$ac_try;;
24754esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024756 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024757 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024759 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024760 ac_cv_rshift_extends_sign=yes
24761else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024762 echo "$as_me: program exited with status $ac_status" >&5
24763echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024764sed 's/^/| /' conftest.$ac_ext >&5
24765
Martin v. Löwis11437992002-04-12 09:54:03 +000024766( exit $ac_status )
24767ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024768fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024769rm -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 +000024770fi
24771
Martin v. Löwiseba40652007-08-30 20:10:57 +000024772
24773fi
24774
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024775{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24776echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024777if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024778then
Martin v. Löwis11437992002-04-12 09:54:03 +000024779
24780cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024781#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024782_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024783
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024784fi
24785
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024786# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024787{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24788echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024789if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024790 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024791else
Martin v. Löwis11437992002-04-12 09:54:03 +000024792
24793cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024794/* confdefs.h. */
24795_ACEOF
24796cat confdefs.h >>conftest.$ac_ext
24797cat >>conftest.$ac_ext <<_ACEOF
24798/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024799#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024800int
24801main ()
24802{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024803
24804 FILE *f = fopen("/dev/null", "r");
24805 flockfile(f);
24806 getc_unlocked(f);
24807 funlockfile(f);
24808
Martin v. Löwis11437992002-04-12 09:54:03 +000024809 ;
24810 return 0;
24811}
24812_ACEOF
24813rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024814if { (ac_try="$ac_link"
24815case "(($ac_try" in
24816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24817 *) ac_try_echo=$ac_try;;
24818esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024820 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024821 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024822 grep -v '^ *+' conftest.er1 >conftest.err
24823 rm -f conftest.er1
24824 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024826 (exit $ac_status); } && {
24827 test -z "$ac_c_werror_flag" ||
24828 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024829 } && test -s conftest$ac_exeext &&
24830 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024831 ac_cv_have_getc_unlocked=yes
24832else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024833 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024834sed 's/^/| /' conftest.$ac_ext >&5
24835
Martin v. Löwiseba40652007-08-30 20:10:57 +000024836 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024837fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024838
24839rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024840 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024841fi
24842
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024843{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
24844echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024845if test "$ac_cv_have_getc_unlocked" = yes
24846then
Martin v. Löwis11437992002-04-12 09:54:03 +000024847
24848cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024849#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024850_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024851
24852fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024853
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024854# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000024855# save the value of LIBS so we don't actually link Python with readline
24856LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024857
Gregory P. Smithcc023f12008-09-07 05:15:58 +000024858# On some systems we need to link readline to a termcap compatible
24859# library. NOTE: Keep the precedence of listed libraries synchronised
24860# with setup.py.
24861py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024862{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
24863echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000024864for py_libtermcap in "" ncursesw ncurses curses termcap; do
24865 if test -z "$py_libtermcap"; then
24866 READLINE_LIBS="-lreadline"
24867 else
24868 READLINE_LIBS="-lreadline -l$py_libtermcap"
24869 fi
24870 LIBS="$READLINE_LIBS $LIBS_no_readline"
24871 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024872/* confdefs.h. */
24873_ACEOF
24874cat confdefs.h >>conftest.$ac_ext
24875cat >>conftest.$ac_ext <<_ACEOF
24876/* end confdefs.h. */
24877
Martin v. Löwiseba40652007-08-30 20:10:57 +000024878/* Override any GCC internal prototype to avoid an error.
24879 Use char because int might match the return type of a GCC
24880 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024881#ifdef __cplusplus
24882extern "C"
24883#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024884char readline ();
24885int
24886main ()
24887{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024888return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024889 ;
24890 return 0;
24891}
24892_ACEOF
24893rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024894if { (ac_try="$ac_link"
24895case "(($ac_try" in
24896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24897 *) ac_try_echo=$ac_try;;
24898esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024900 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024901 ac_status=$?
24902 grep -v '^ *+' conftest.er1 >conftest.err
24903 rm -f conftest.er1
24904 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024906 (exit $ac_status); } && {
24907 test -z "$ac_c_werror_flag" ||
24908 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024909 } && test -s conftest$ac_exeext &&
24910 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000024911 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024912else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024913 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024914sed 's/^/| /' conftest.$ac_ext >&5
24915
Gregory P. Smithcc023f12008-09-07 05:15:58 +000024916
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024918
24919rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024920 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000024921 if test $py_cv_lib_readline = yes; then
24922 break
24923 fi
24924done
24925# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
24926#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000024927if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024928 { echo "$as_me:$LINENO: result: none" >&5
24929echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000024930else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024931 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
24932echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000024933
24934cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024935#define HAVE_LIBREADLINE 1
24936_ACEOF
24937
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024938fi
24939
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024940# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024941{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
24942echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024943if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024944 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024945else
24946 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000024947LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024948cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024949/* confdefs.h. */
24950_ACEOF
24951cat confdefs.h >>conftest.$ac_ext
24952cat >>conftest.$ac_ext <<_ACEOF
24953/* end confdefs.h. */
24954
Martin v. Löwiseba40652007-08-30 20:10:57 +000024955/* Override any GCC internal prototype to avoid an error.
24956 Use char because int might match the return type of a GCC
24957 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024958#ifdef __cplusplus
24959extern "C"
24960#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024961char rl_callback_handler_install ();
24962int
24963main ()
24964{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024965return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024966 ;
24967 return 0;
24968}
24969_ACEOF
24970rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024971if { (ac_try="$ac_link"
24972case "(($ac_try" in
24973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24974 *) ac_try_echo=$ac_try;;
24975esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024977 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024978 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024979 grep -v '^ *+' conftest.er1 >conftest.err
24980 rm -f conftest.er1
24981 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024983 (exit $ac_status); } && {
24984 test -z "$ac_c_werror_flag" ||
24985 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024986 } && test -s conftest$ac_exeext &&
24987 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024988 ac_cv_lib_readline_rl_callback_handler_install=yes
24989else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024990 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024991sed 's/^/| /' conftest.$ac_ext >&5
24992
Martin v. Löwiseba40652007-08-30 20:10:57 +000024993 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024994fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024995
24996rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024997 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024998LIBS=$ac_check_lib_save_LIBS
24999fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025000{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25001echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25002if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025003
25004cat >>confdefs.h <<\_ACEOF
25005#define HAVE_RL_CALLBACK 1
25006_ACEOF
25007
25008fi
25009
25010
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025011# check for readline 2.2
25012cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025013/* confdefs.h. */
25014_ACEOF
25015cat confdefs.h >>conftest.$ac_ext
25016cat >>conftest.$ac_ext <<_ACEOF
25017/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025018#include <readline/readline.h>
25019_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025020if { (ac_try="$ac_cpp conftest.$ac_ext"
25021case "(($ac_try" in
25022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25023 *) ac_try_echo=$ac_try;;
25024esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025026 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025027 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025028 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025029 rm -f conftest.er1
25030 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025032 (exit $ac_status); } >/dev/null && {
25033 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25034 test ! -s conftest.err
25035 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025036 have_readline=yes
25037else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025039sed 's/^/| /' conftest.$ac_ext >&5
25040
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025041 have_readline=no
25042fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025043
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025044rm -f conftest.err conftest.$ac_ext
25045if test $have_readline = yes
25046then
25047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025048/* confdefs.h. */
25049_ACEOF
25050cat confdefs.h >>conftest.$ac_ext
25051cat >>conftest.$ac_ext <<_ACEOF
25052/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025053#include <readline/readline.h>
25054
25055_ACEOF
25056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025057 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025058
25059cat >>confdefs.h <<\_ACEOF
25060#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25061_ACEOF
25062
25063fi
25064rm -f conftest*
25065
25066fi
25067
Martin v. Löwis0daad592001-09-30 21:09:59 +000025068# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025069{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25070echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025071if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025072 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025073else
Martin v. Löwis11437992002-04-12 09:54:03 +000025074 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025075LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025076cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025077/* confdefs.h. */
25078_ACEOF
25079cat confdefs.h >>conftest.$ac_ext
25080cat >>conftest.$ac_ext <<_ACEOF
25081/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025082
Martin v. Löwiseba40652007-08-30 20:10:57 +000025083/* Override any GCC internal prototype to avoid an error.
25084 Use char because int might match the return type of a GCC
25085 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025086#ifdef __cplusplus
25087extern "C"
25088#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025089char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025090int
25091main ()
25092{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025093return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025094 ;
25095 return 0;
25096}
25097_ACEOF
25098rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025099if { (ac_try="$ac_link"
25100case "(($ac_try" in
25101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25102 *) ac_try_echo=$ac_try;;
25103esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025105 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025106 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025107 grep -v '^ *+' conftest.er1 >conftest.err
25108 rm -f conftest.er1
25109 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025111 (exit $ac_status); } && {
25112 test -z "$ac_c_werror_flag" ||
25113 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025114 } && test -s conftest$ac_exeext &&
25115 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025116 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025117else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025118 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025119sed 's/^/| /' conftest.$ac_ext >&5
25120
Martin v. Löwiseba40652007-08-30 20:10:57 +000025121 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025123
25124rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025125 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025126LIBS=$ac_check_lib_save_LIBS
25127fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025128{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25129echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25130if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025131
Martin v. Löwis11437992002-04-12 09:54:03 +000025132cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025133#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025134_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025135
Martin v. Löwis0daad592001-09-30 21:09:59 +000025136fi
25137
Michael W. Hudson54241132001-12-07 15:38:26 +000025138
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025139# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025140{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25141echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025142if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025143 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025144else
25145 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025146LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025147cat >conftest.$ac_ext <<_ACEOF
25148/* confdefs.h. */
25149_ACEOF
25150cat confdefs.h >>conftest.$ac_ext
25151cat >>conftest.$ac_ext <<_ACEOF
25152/* end confdefs.h. */
25153
25154/* Override any GCC internal prototype to avoid an error.
25155 Use char because int might match the return type of a GCC
25156 builtin and then its argument prototype would still apply. */
25157#ifdef __cplusplus
25158extern "C"
25159#endif
25160char rl_completion_display_matches_hook ();
25161int
25162main ()
25163{
25164return rl_completion_display_matches_hook ();
25165 ;
25166 return 0;
25167}
25168_ACEOF
25169rm -f conftest.$ac_objext conftest$ac_exeext
25170if { (ac_try="$ac_link"
25171case "(($ac_try" in
25172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25173 *) ac_try_echo=$ac_try;;
25174esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025176 (eval "$ac_link") 2>conftest.er1
25177 ac_status=$?
25178 grep -v '^ *+' conftest.er1 >conftest.err
25179 rm -f conftest.er1
25180 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025182 (exit $ac_status); } && {
25183 test -z "$ac_c_werror_flag" ||
25184 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025185 } && test -s conftest$ac_exeext &&
25186 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025187 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25188else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025189 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025190sed 's/^/| /' conftest.$ac_ext >&5
25191
25192 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25193fi
25194
25195rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25196 conftest$ac_exeext conftest.$ac_ext
25197LIBS=$ac_check_lib_save_LIBS
25198fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025199{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25200echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25201if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025202
25203cat >>confdefs.h <<\_ACEOF
25204#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25205_ACEOF
25206
25207fi
25208
25209
Martin v. Löwis0daad592001-09-30 21:09:59 +000025210# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025211{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25212echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025213if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025214 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025215else
Martin v. Löwis11437992002-04-12 09:54:03 +000025216 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025217LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025218cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025219/* confdefs.h. */
25220_ACEOF
25221cat confdefs.h >>conftest.$ac_ext
25222cat >>conftest.$ac_ext <<_ACEOF
25223/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025224
Martin v. Löwiseba40652007-08-30 20:10:57 +000025225/* Override any GCC internal prototype to avoid an error.
25226 Use char because int might match the return type of a GCC
25227 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025228#ifdef __cplusplus
25229extern "C"
25230#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025231char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025232int
25233main ()
25234{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025235return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025236 ;
25237 return 0;
25238}
25239_ACEOF
25240rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025241if { (ac_try="$ac_link"
25242case "(($ac_try" in
25243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25244 *) ac_try_echo=$ac_try;;
25245esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025247 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025248 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025249 grep -v '^ *+' conftest.er1 >conftest.err
25250 rm -f conftest.er1
25251 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025253 (exit $ac_status); } && {
25254 test -z "$ac_c_werror_flag" ||
25255 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025256 } && test -s conftest$ac_exeext &&
25257 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025258 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025259else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025261sed 's/^/| /' conftest.$ac_ext >&5
25262
Martin v. Löwiseba40652007-08-30 20:10:57 +000025263 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025264fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025265
25266rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025267 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025268LIBS=$ac_check_lib_save_LIBS
25269fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025270{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25271echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25272if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025273
Martin v. Löwis11437992002-04-12 09:54:03 +000025274cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025275#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025276_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025277
Guido van Rossum353ae582001-07-10 16:45:32 +000025278fi
25279
Jack Jansendd19cf82001-12-06 22:36:17 +000025280
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025281# also in readline 4.2
25282cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025283/* confdefs.h. */
25284_ACEOF
25285cat confdefs.h >>conftest.$ac_ext
25286cat >>conftest.$ac_ext <<_ACEOF
25287/* end confdefs.h. */
25288#include <readline/readline.h>
25289_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025290if { (ac_try="$ac_cpp conftest.$ac_ext"
25291case "(($ac_try" in
25292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25293 *) ac_try_echo=$ac_try;;
25294esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025296 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025297 ac_status=$?
25298 grep -v '^ *+' conftest.er1 >conftest.err
25299 rm -f conftest.er1
25300 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025302 (exit $ac_status); } >/dev/null && {
25303 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25304 test ! -s conftest.err
25305 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025306 have_readline=yes
25307else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025308 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025309sed 's/^/| /' conftest.$ac_ext >&5
25310
25311 have_readline=no
25312fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025313
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025314rm -f conftest.err conftest.$ac_ext
25315if test $have_readline = yes
25316then
25317 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025318/* confdefs.h. */
25319_ACEOF
25320cat confdefs.h >>conftest.$ac_ext
25321cat >>conftest.$ac_ext <<_ACEOF
25322/* end confdefs.h. */
25323#include <readline/readline.h>
25324
25325_ACEOF
25326if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25327 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25328
25329cat >>confdefs.h <<\_ACEOF
25330#define HAVE_RL_CATCH_SIGNAL 1
25331_ACEOF
25332
25333fi
25334rm -f conftest*
25335
25336fi
25337
Martin v. Löwis82bca632006-02-10 20:49:30 +000025338# End of readline checks: restore LIBS
25339LIBS=$LIBS_no_readline
25340
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025341{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25342echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025343if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025344 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025345else
Martin v. Löwis11437992002-04-12 09:54:03 +000025346
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025347if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025348 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025349else
Martin v. Löwis11437992002-04-12 09:54:03 +000025350 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025351/* confdefs.h. */
25352_ACEOF
25353cat confdefs.h >>conftest.$ac_ext
25354cat >>conftest.$ac_ext <<_ACEOF
25355/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025356
25357int main()
25358{
25359 int val1 = nice(1);
25360 if (val1 != -1 && val1 == nice(2))
25361 exit(0);
25362 exit(1);
25363}
25364
Martin v. Löwis11437992002-04-12 09:54:03 +000025365_ACEOF
25366rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025367if { (ac_try="$ac_link"
25368case "(($ac_try" in
25369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25370 *) ac_try_echo=$ac_try;;
25371esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025373 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025374 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025376 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025377 { (case "(($ac_try" in
25378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25379 *) ac_try_echo=$ac_try;;
25380esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025382 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025383 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025385 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025386 ac_cv_broken_nice=yes
25387else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025388 echo "$as_me: program exited with status $ac_status" >&5
25389echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025390sed 's/^/| /' conftest.$ac_ext >&5
25391
Martin v. Löwis11437992002-04-12 09:54:03 +000025392( exit $ac_status )
25393ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025394fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025395rm -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 +000025396fi
25397
Martin v. Löwiseba40652007-08-30 20:10:57 +000025398
25399fi
25400
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025401{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25402echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025403if test "$ac_cv_broken_nice" = yes
25404then
Martin v. Löwis11437992002-04-12 09:54:03 +000025405
25406cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025407#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025408_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025409
25410fi
25411
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025412{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25413echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025414if test "${ac_cv_broken_poll+set}" = set; then
25415 echo $ECHO_N "(cached) $ECHO_C" >&6
25416else
25417 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025418 ac_cv_broken_poll=no
25419else
25420 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025421/* confdefs.h. */
25422_ACEOF
25423cat confdefs.h >>conftest.$ac_ext
25424cat >>conftest.$ac_ext <<_ACEOF
25425/* end confdefs.h. */
25426
25427#include <poll.h>
25428
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025429int main()
25430{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025431 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025432 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025433
25434 close (42);
25435
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025436 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025437 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025438 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025439 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025440 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025441 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025442 return 1;
25443}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025444
25445_ACEOF
25446rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025447if { (ac_try="$ac_link"
25448case "(($ac_try" in
25449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25450 *) ac_try_echo=$ac_try;;
25451esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025453 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025454 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025456 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025457 { (case "(($ac_try" in
25458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25459 *) ac_try_echo=$ac_try;;
25460esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025462 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025463 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025465 (exit $ac_status); }; }; then
25466 ac_cv_broken_poll=yes
25467else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025468 echo "$as_me: program exited with status $ac_status" >&5
25469echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025470sed 's/^/| /' conftest.$ac_ext >&5
25471
25472( exit $ac_status )
25473ac_cv_broken_poll=no
25474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025475rm -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 +000025476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025477
25478
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025479fi
25480
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025481{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25482echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025483if test "$ac_cv_broken_poll" = yes
25484then
25485
25486cat >>confdefs.h <<\_ACEOF
25487#define HAVE_BROKEN_POLL 1
25488_ACEOF
25489
25490fi
25491
Brett Cannon43802422005-02-10 20:48:03 +000025492# 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 +000025493# (which is not required by ISO C or UNIX spec) and/or if we support
25494# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025495{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25496echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025497if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025498 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025499else
25500 cat >conftest.$ac_ext <<_ACEOF
25501/* confdefs.h. */
25502_ACEOF
25503cat confdefs.h >>conftest.$ac_ext
25504cat >>conftest.$ac_ext <<_ACEOF
25505/* end confdefs.h. */
25506#include <sys/types.h>
25507#include <$ac_cv_struct_tm>
25508
25509
25510int
25511main ()
25512{
25513static struct tm ac_aggr;
25514if (ac_aggr.tm_zone)
25515return 0;
25516 ;
25517 return 0;
25518}
25519_ACEOF
25520rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025521if { (ac_try="$ac_compile"
25522case "(($ac_try" in
25523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25524 *) ac_try_echo=$ac_try;;
25525esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025527 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025528 ac_status=$?
25529 grep -v '^ *+' conftest.er1 >conftest.err
25530 rm -f conftest.er1
25531 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025533 (exit $ac_status); } && {
25534 test -z "$ac_c_werror_flag" ||
25535 test ! -s conftest.err
25536 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025537 ac_cv_member_struct_tm_tm_zone=yes
25538else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025539 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025540sed 's/^/| /' conftest.$ac_ext >&5
25541
Martin v. Löwiseba40652007-08-30 20:10:57 +000025542 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025543/* confdefs.h. */
25544_ACEOF
25545cat confdefs.h >>conftest.$ac_ext
25546cat >>conftest.$ac_ext <<_ACEOF
25547/* end confdefs.h. */
25548#include <sys/types.h>
25549#include <$ac_cv_struct_tm>
25550
25551
25552int
25553main ()
25554{
25555static struct tm ac_aggr;
25556if (sizeof ac_aggr.tm_zone)
25557return 0;
25558 ;
25559 return 0;
25560}
25561_ACEOF
25562rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025563if { (ac_try="$ac_compile"
25564case "(($ac_try" in
25565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25566 *) ac_try_echo=$ac_try;;
25567esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025569 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025570 ac_status=$?
25571 grep -v '^ *+' conftest.er1 >conftest.err
25572 rm -f conftest.er1
25573 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025575 (exit $ac_status); } && {
25576 test -z "$ac_c_werror_flag" ||
25577 test ! -s conftest.err
25578 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025579 ac_cv_member_struct_tm_tm_zone=yes
25580else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025581 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025582sed 's/^/| /' conftest.$ac_ext >&5
25583
Martin v. Löwiseba40652007-08-30 20:10:57 +000025584 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025586
25587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025589
25590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025591fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025592{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25593echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
25594if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025595
25596cat >>confdefs.h <<_ACEOF
25597#define HAVE_STRUCT_TM_TM_ZONE 1
25598_ACEOF
25599
25600
25601fi
25602
25603if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25604
25605cat >>confdefs.h <<\_ACEOF
25606#define HAVE_TM_ZONE 1
25607_ACEOF
25608
25609else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025610 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25611echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025612if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025613 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000025614else
25615 cat >conftest.$ac_ext <<_ACEOF
25616/* confdefs.h. */
25617_ACEOF
25618cat confdefs.h >>conftest.$ac_ext
25619cat >>conftest.$ac_ext <<_ACEOF
25620/* end confdefs.h. */
25621#include <time.h>
25622
25623int
25624main ()
25625{
25626#ifndef tzname
25627 (void) tzname;
25628#endif
25629
25630 ;
25631 return 0;
25632}
25633_ACEOF
25634rm -f conftest.$ac_objext
25635if { (ac_try="$ac_compile"
25636case "(($ac_try" in
25637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25638 *) ac_try_echo=$ac_try;;
25639esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025641 (eval "$ac_compile") 2>conftest.er1
25642 ac_status=$?
25643 grep -v '^ *+' conftest.er1 >conftest.err
25644 rm -f conftest.er1
25645 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025647 (exit $ac_status); } && {
25648 test -z "$ac_c_werror_flag" ||
25649 test ! -s conftest.err
25650 } && test -s conftest.$ac_objext; then
25651 ac_cv_have_decl_tzname=yes
25652else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025653 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025654sed 's/^/| /' conftest.$ac_ext >&5
25655
25656 ac_cv_have_decl_tzname=no
25657fi
25658
25659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25660fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025661{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25662echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
25663if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025664
25665cat >>confdefs.h <<_ACEOF
25666#define HAVE_DECL_TZNAME 1
25667_ACEOF
25668
25669
25670else
25671 cat >>confdefs.h <<_ACEOF
25672#define HAVE_DECL_TZNAME 0
25673_ACEOF
25674
25675
25676fi
25677
25678
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025679 { echo "$as_me:$LINENO: checking for tzname" >&5
25680echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025681if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025682 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025683else
25684 cat >conftest.$ac_ext <<_ACEOF
25685/* confdefs.h. */
25686_ACEOF
25687cat confdefs.h >>conftest.$ac_ext
25688cat >>conftest.$ac_ext <<_ACEOF
25689/* end confdefs.h. */
25690#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000025691#if !HAVE_DECL_TZNAME
25692extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025693#endif
25694
25695int
25696main ()
25697{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025698return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025699 ;
25700 return 0;
25701}
25702_ACEOF
25703rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025704if { (ac_try="$ac_link"
25705case "(($ac_try" in
25706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25707 *) ac_try_echo=$ac_try;;
25708esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025710 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025711 ac_status=$?
25712 grep -v '^ *+' conftest.er1 >conftest.err
25713 rm -f conftest.er1
25714 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025716 (exit $ac_status); } && {
25717 test -z "$ac_c_werror_flag" ||
25718 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025719 } && test -s conftest$ac_exeext &&
25720 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000025721 ac_cv_var_tzname=yes
25722else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025723 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025724sed 's/^/| /' conftest.$ac_ext >&5
25725
Martin v. Löwiseba40652007-08-30 20:10:57 +000025726 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025728
25729rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025730 conftest$ac_exeext conftest.$ac_ext
25731fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025732{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25733echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025734 if test $ac_cv_var_tzname = yes; then
25735
25736cat >>confdefs.h <<\_ACEOF
25737#define HAVE_TZNAME 1
25738_ACEOF
25739
25740 fi
25741fi
25742
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025743
Martin v. Löwis1d459062005-03-14 21:23:33 +000025744# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025745{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25746echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025747if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025748 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025749else
25750
25751if test "$cross_compiling" = yes; then
25752 ac_cv_working_tzset=no
25753else
25754 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025755/* confdefs.h. */
25756_ACEOF
25757cat confdefs.h >>conftest.$ac_ext
25758cat >>conftest.$ac_ext <<_ACEOF
25759/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025760
25761#include <stdlib.h>
25762#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025763#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025764
25765#if HAVE_TZNAME
25766extern char *tzname[];
25767#endif
25768
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025769int main()
25770{
Brett Cannon18367812003-09-19 00:59:16 +000025771 /* Note that we need to ensure that not only does tzset(3)
25772 do 'something' with localtime, but it works as documented
25773 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025774 This includes making sure that tzname is set properly if
25775 tm->tm_zone does not exist since it is the alternative way
25776 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025777
25778 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025779 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025780 */
25781
Martin v. Löwis1d459062005-03-14 21:23:33 +000025782 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025783 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25784
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025785 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025786 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025787 if (localtime(&groundhogday)->tm_hour != 0)
25788 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025789#if HAVE_TZNAME
25790 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25791 if (strcmp(tzname[0], "UTC") ||
25792 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25793 exit(1);
25794#endif
Brett Cannon18367812003-09-19 00:59:16 +000025795
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025796 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025797 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025798 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025799 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025800#if HAVE_TZNAME
25801 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25802 exit(1);
25803#endif
Brett Cannon18367812003-09-19 00:59:16 +000025804
25805 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25806 tzset();
25807 if (localtime(&groundhogday)->tm_hour != 11)
25808 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025809#if HAVE_TZNAME
25810 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25811 exit(1);
25812#endif
25813
25814#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025815 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25816 exit(1);
25817 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25818 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025819#endif
Brett Cannon18367812003-09-19 00:59:16 +000025820
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025821 exit(0);
25822}
25823
25824_ACEOF
25825rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025826if { (ac_try="$ac_link"
25827case "(($ac_try" in
25828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25829 *) ac_try_echo=$ac_try;;
25830esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025832 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025833 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025835 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025836 { (case "(($ac_try" in
25837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25838 *) ac_try_echo=$ac_try;;
25839esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025841 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025842 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025844 (exit $ac_status); }; }; then
25845 ac_cv_working_tzset=yes
25846else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025847 echo "$as_me: program exited with status $ac_status" >&5
25848echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025849sed 's/^/| /' conftest.$ac_ext >&5
25850
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025851( exit $ac_status )
25852ac_cv_working_tzset=no
25853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025854rm -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 +000025855fi
25856
Martin v. Löwiseba40652007-08-30 20:10:57 +000025857
25858fi
25859
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025860{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25861echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025862if test "$ac_cv_working_tzset" = yes
25863then
25864
25865cat >>confdefs.h <<\_ACEOF
25866#define HAVE_WORKING_TZSET 1
25867_ACEOF
25868
25869fi
25870
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025871# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025872{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25873echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025874if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025875 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025876else
25877 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025878/* confdefs.h. */
25879_ACEOF
25880cat confdefs.h >>conftest.$ac_ext
25881cat >>conftest.$ac_ext <<_ACEOF
25882/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025883#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025884int
25885main ()
25886{
25887
25888struct stat st;
25889st.st_mtim.tv_nsec = 1;
25890
25891 ;
25892 return 0;
25893}
25894_ACEOF
25895rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025896if { (ac_try="$ac_compile"
25897case "(($ac_try" in
25898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25899 *) ac_try_echo=$ac_try;;
25900esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025902 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025903 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025904 grep -v '^ *+' conftest.er1 >conftest.err
25905 rm -f conftest.er1
25906 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025908 (exit $ac_status); } && {
25909 test -z "$ac_c_werror_flag" ||
25910 test ! -s conftest.err
25911 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000025912 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025913else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025915sed 's/^/| /' conftest.$ac_ext >&5
25916
Martin v. Löwiseba40652007-08-30 20:10:57 +000025917 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025918fi
25919
Martin v. Löwiseba40652007-08-30 20:10:57 +000025920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25921fi
25922
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025923{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
25924echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025925if test "$ac_cv_stat_tv_nsec" = yes
25926then
25927
25928cat >>confdefs.h <<\_ACEOF
25929#define HAVE_STAT_TV_NSEC 1
25930_ACEOF
25931
25932fi
25933
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025934# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025935{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
25936echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025937if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025938 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025939else
25940 cat >conftest.$ac_ext <<_ACEOF
25941/* confdefs.h. */
25942_ACEOF
25943cat confdefs.h >>conftest.$ac_ext
25944cat >>conftest.$ac_ext <<_ACEOF
25945/* end confdefs.h. */
25946#include <sys/stat.h>
25947int
25948main ()
25949{
25950
25951struct stat st;
25952st.st_mtimespec.tv_nsec = 1;
25953
25954 ;
25955 return 0;
25956}
25957_ACEOF
25958rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025959if { (ac_try="$ac_compile"
25960case "(($ac_try" in
25961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25962 *) ac_try_echo=$ac_try;;
25963esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025965 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025966 ac_status=$?
25967 grep -v '^ *+' conftest.er1 >conftest.err
25968 rm -f conftest.er1
25969 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025971 (exit $ac_status); } && {
25972 test -z "$ac_c_werror_flag" ||
25973 test ! -s conftest.err
25974 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025975 ac_cv_stat_tv_nsec2=yes
25976else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025977 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025978sed 's/^/| /' conftest.$ac_ext >&5
25979
Martin v. Löwiseba40652007-08-30 20:10:57 +000025980 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025981fi
25982
Martin v. Löwiseba40652007-08-30 20:10:57 +000025983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25984fi
25985
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025986{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
25987echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025988if test "$ac_cv_stat_tv_nsec2" = yes
25989then
25990
25991cat >>confdefs.h <<\_ACEOF
25992#define HAVE_STAT_TV_NSEC2 1
25993_ACEOF
25994
25995fi
25996
Jack Jansen666b1e72001-10-31 12:11:48 +000025997# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025998{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
25999echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026000if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026001 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026002else
Martin v. Löwis11437992002-04-12 09:54:03 +000026003 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026004/* confdefs.h. */
26005_ACEOF
26006cat confdefs.h >>conftest.$ac_ext
26007cat >>conftest.$ac_ext <<_ACEOF
26008/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026009#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026010int
26011main ()
26012{
Jack Jansen666b1e72001-10-31 12:11:48 +000026013
26014 int rtn;
26015 rtn = mvwdelch(0,0,0);
26016
Martin v. Löwis11437992002-04-12 09:54:03 +000026017 ;
26018 return 0;
26019}
26020_ACEOF
26021rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026022if { (ac_try="$ac_compile"
26023case "(($ac_try" in
26024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26025 *) ac_try_echo=$ac_try;;
26026esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026028 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026029 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026030 grep -v '^ *+' conftest.er1 >conftest.err
26031 rm -f conftest.er1
26032 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026034 (exit $ac_status); } && {
26035 test -z "$ac_c_werror_flag" ||
26036 test ! -s conftest.err
26037 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026038 ac_cv_mvwdelch_is_expression=yes
26039else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026040 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026041sed 's/^/| /' conftest.$ac_ext >&5
26042
Martin v. Löwiseba40652007-08-30 20:10:57 +000026043 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026044fi
26045
Martin v. Löwiseba40652007-08-30 20:10:57 +000026046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26047fi
26048
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026049{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26050echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026051
26052if test "$ac_cv_mvwdelch_is_expression" = yes
26053then
Martin v. Löwis11437992002-04-12 09:54:03 +000026054
26055cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026056#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026057_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026058
26059fi
26060
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026061{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26062echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026063if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026064 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026065else
Martin v. Löwis11437992002-04-12 09:54:03 +000026066 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026067/* confdefs.h. */
26068_ACEOF
26069cat confdefs.h >>conftest.$ac_ext
26070cat >>conftest.$ac_ext <<_ACEOF
26071/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026072#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026073int
26074main ()
26075{
Jack Jansen666b1e72001-10-31 12:11:48 +000026076
26077 WINDOW *w;
26078 w->_flags = 0;
26079
Martin v. Löwis11437992002-04-12 09:54:03 +000026080 ;
26081 return 0;
26082}
26083_ACEOF
26084rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026085if { (ac_try="$ac_compile"
26086case "(($ac_try" in
26087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26088 *) ac_try_echo=$ac_try;;
26089esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026091 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026092 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026093 grep -v '^ *+' conftest.er1 >conftest.err
26094 rm -f conftest.er1
26095 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026097 (exit $ac_status); } && {
26098 test -z "$ac_c_werror_flag" ||
26099 test ! -s conftest.err
26100 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026101 ac_cv_window_has_flags=yes
26102else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026104sed 's/^/| /' conftest.$ac_ext >&5
26105
Martin v. Löwiseba40652007-08-30 20:10:57 +000026106 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026107fi
26108
Martin v. Löwiseba40652007-08-30 20:10:57 +000026109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26110fi
26111
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026112{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26113echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026114
Jack Jansen666b1e72001-10-31 12:11:48 +000026115
26116if test "$ac_cv_window_has_flags" = yes
26117then
Martin v. Löwis11437992002-04-12 09:54:03 +000026118
26119cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026120#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026121_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026122
26123fi
26124
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026125{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26126echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026127cat >conftest.$ac_ext <<_ACEOF
26128/* confdefs.h. */
26129_ACEOF
26130cat confdefs.h >>conftest.$ac_ext
26131cat >>conftest.$ac_ext <<_ACEOF
26132/* end confdefs.h. */
26133#include <curses.h>
26134int
26135main ()
26136{
26137void *x=is_term_resized
26138 ;
26139 return 0;
26140}
26141_ACEOF
26142rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026143if { (ac_try="$ac_compile"
26144case "(($ac_try" in
26145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26146 *) ac_try_echo=$ac_try;;
26147esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026149 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026150 ac_status=$?
26151 grep -v '^ *+' conftest.er1 >conftest.err
26152 rm -f conftest.er1
26153 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026155 (exit $ac_status); } && {
26156 test -z "$ac_c_werror_flag" ||
26157 test ! -s conftest.err
26158 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026159
26160cat >>confdefs.h <<\_ACEOF
26161#define HAVE_CURSES_IS_TERM_RESIZED 1
26162_ACEOF
26163
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026164 { echo "$as_me:$LINENO: result: yes" >&5
26165echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026166else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026167 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026168sed 's/^/| /' conftest.$ac_ext >&5
26169
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026170 { echo "$as_me:$LINENO: result: no" >&5
26171echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026172
26173fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026174
Martin v. Löwiseba40652007-08-30 20:10:57 +000026175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26176
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026177{ echo "$as_me:$LINENO: checking for resize_term" >&5
26178echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026179cat >conftest.$ac_ext <<_ACEOF
26180/* confdefs.h. */
26181_ACEOF
26182cat confdefs.h >>conftest.$ac_ext
26183cat >>conftest.$ac_ext <<_ACEOF
26184/* end confdefs.h. */
26185#include <curses.h>
26186int
26187main ()
26188{
26189void *x=resize_term
26190 ;
26191 return 0;
26192}
26193_ACEOF
26194rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026195if { (ac_try="$ac_compile"
26196case "(($ac_try" in
26197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26198 *) ac_try_echo=$ac_try;;
26199esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026201 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026202 ac_status=$?
26203 grep -v '^ *+' conftest.er1 >conftest.err
26204 rm -f conftest.er1
26205 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026207 (exit $ac_status); } && {
26208 test -z "$ac_c_werror_flag" ||
26209 test ! -s conftest.err
26210 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026211
26212cat >>confdefs.h <<\_ACEOF
26213#define HAVE_CURSES_RESIZE_TERM 1
26214_ACEOF
26215
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026216 { echo "$as_me:$LINENO: result: yes" >&5
26217echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026218else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026219 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026220sed 's/^/| /' conftest.$ac_ext >&5
26221
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026222 { echo "$as_me:$LINENO: result: no" >&5
26223echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026224
26225fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026226
Martin v. Löwiseba40652007-08-30 20:10:57 +000026227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26228
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026229{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26230echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026231cat >conftest.$ac_ext <<_ACEOF
26232/* confdefs.h. */
26233_ACEOF
26234cat confdefs.h >>conftest.$ac_ext
26235cat >>conftest.$ac_ext <<_ACEOF
26236/* end confdefs.h. */
26237#include <curses.h>
26238int
26239main ()
26240{
26241void *x=resizeterm
26242 ;
26243 return 0;
26244}
26245_ACEOF
26246rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026247if { (ac_try="$ac_compile"
26248case "(($ac_try" in
26249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26250 *) ac_try_echo=$ac_try;;
26251esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026253 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026254 ac_status=$?
26255 grep -v '^ *+' conftest.er1 >conftest.err
26256 rm -f conftest.er1
26257 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026259 (exit $ac_status); } && {
26260 test -z "$ac_c_werror_flag" ||
26261 test ! -s conftest.err
26262 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026263
26264cat >>confdefs.h <<\_ACEOF
26265#define HAVE_CURSES_RESIZETERM 1
26266_ACEOF
26267
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026268 { echo "$as_me:$LINENO: result: yes" >&5
26269echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026270else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026271 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026272sed 's/^/| /' conftest.$ac_ext >&5
26273
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026274 { echo "$as_me:$LINENO: result: no" >&5
26275echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026276
26277fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026278
Martin v. Löwiseba40652007-08-30 20:10:57 +000026279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26280
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026281{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26282echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026283
26284if test -r /dev/ptmx
26285then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026286 { echo "$as_me:$LINENO: result: yes" >&5
26287echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026288
26289cat >>confdefs.h <<\_ACEOF
26290#define HAVE_DEV_PTMX 1
26291_ACEOF
26292
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026293else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026294 { echo "$as_me:$LINENO: result: no" >&5
26295echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026296fi
26297
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026298{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26299echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026300
26301if test -r /dev/ptc
26302then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026303 { echo "$as_me:$LINENO: result: yes" >&5
26304echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026305
26306cat >>confdefs.h <<\_ACEOF
26307#define HAVE_DEV_PTC 1
26308_ACEOF
26309
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026310else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026311 { echo "$as_me:$LINENO: result: no" >&5
26312echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026313fi
26314
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026315{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26316echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026317if test "${ac_cv_have_size_t_format+set}" = set; then
26318 echo $ECHO_N "(cached) $ECHO_C" >&6
26319else
26320 if test "$cross_compiling" = yes; then
26321 ac_cv_have_size_t_format=no
Brett Cannon09d12362006-05-11 05:11:33 +000026322else
26323 cat >conftest.$ac_ext <<_ACEOF
26324/* confdefs.h. */
26325_ACEOF
26326cat confdefs.h >>conftest.$ac_ext
26327cat >>conftest.$ac_ext <<_ACEOF
26328/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026329
Brett Cannon09d12362006-05-11 05:11:33 +000026330#include <stdio.h>
26331#include <stddef.h>
26332#include <string.h>
26333
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000026334#ifdef HAVE_SYS_TYPES_H
26335#include <sys/types.h>
26336#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000026337
26338#ifdef HAVE_SSIZE_T
26339typedef ssize_t Py_ssize_t;
26340#elif SIZEOF_VOID_P == SIZEOF_LONG
26341typedef long Py_ssize_t;
26342#else
26343typedef int Py_ssize_t;
26344#endif
Brett Cannon09d12362006-05-11 05:11:33 +000026345
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000026346int main()
26347{
26348 char buffer[256];
26349
Brett Cannon09d12362006-05-11 05:11:33 +000026350 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26351 return 1;
26352
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000026353 if (strcmp(buffer, "123"))
26354 return 1;
26355
26356 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26357 return 1;
26358
26359 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000026360 return 1;
26361
26362 return 0;
26363}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026364
Brett Cannon09d12362006-05-11 05:11:33 +000026365_ACEOF
26366rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026367if { (ac_try="$ac_link"
26368case "(($ac_try" in
26369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26370 *) ac_try_echo=$ac_try;;
26371esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026373 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000026374 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000026376 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026377 { (case "(($ac_try" in
26378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26379 *) ac_try_echo=$ac_try;;
26380esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026382 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000026383 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000026385 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026386 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026387else
26388 echo "$as_me: program exited with status $ac_status" >&5
26389echo "$as_me: failed program was:" >&5
26390sed 's/^/| /' conftest.$ac_ext >&5
26391
26392( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026393ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026394fi
26395rm -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 +000026396fi
26397
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026398
26399
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026400fi
26401
26402{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26403echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
26404if test $ac_cv_have_size_t_format = yes
26405then
26406
26407cat >>confdefs.h <<\_ACEOF
26408#define PY_FORMAT_SIZE_T "z"
26409_ACEOF
26410
26411fi
26412
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026413{ echo "$as_me:$LINENO: checking for socklen_t" >&5
26414echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026415if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026416 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026417else
Martin v. Löwis11437992002-04-12 09:54:03 +000026418 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026419/* confdefs.h. */
26420_ACEOF
26421cat confdefs.h >>conftest.$ac_ext
26422cat >>conftest.$ac_ext <<_ACEOF
26423/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026424
26425#ifdef HAVE_SYS_TYPES_H
26426#include <sys/types.h>
26427#endif
26428#ifdef HAVE_SYS_SOCKET_H
26429#include <sys/socket.h>
26430#endif
26431
26432
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026433typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000026434int
26435main ()
26436{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026437if ((ac__type_new_ *) 0)
26438 return 0;
26439if (sizeof (ac__type_new_))
26440 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026441 ;
26442 return 0;
26443}
26444_ACEOF
26445rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026446if { (ac_try="$ac_compile"
26447case "(($ac_try" in
26448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26449 *) ac_try_echo=$ac_try;;
26450esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026453 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026454 grep -v '^ *+' conftest.er1 >conftest.err
26455 rm -f conftest.er1
26456 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026458 (exit $ac_status); } && {
26459 test -z "$ac_c_werror_flag" ||
26460 test ! -s conftest.err
26461 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026462 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000026463else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026465sed 's/^/| /' conftest.$ac_ext >&5
26466
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026467 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000026468fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026469
26470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026471fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026472{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26473echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
26474if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026475 :
26476else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026477
Martin v. Löwis01c04012002-11-11 14:58:44 +000026478cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026479#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026480_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026481
26482fi
26483
Michael W. Hudson54241132001-12-07 15:38:26 +000026484
Michael W. Hudson54241132001-12-07 15:38:26 +000026485
26486
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026487for h in `(cd $srcdir;echo Python/thread_*.h)`
26488do
26489 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26490done
26491
Michael W. Hudson54241132001-12-07 15:38:26 +000026492
Neal Norwitzd24499d2005-12-18 21:36:39 +000026493SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026494{ echo "$as_me:$LINENO: checking for build directories" >&5
26495echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026496for dir in $SRCDIRS; do
26497 if test ! -d $dir; then
26498 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026499 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026500done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026501{ echo "$as_me:$LINENO: result: done" >&5
26502echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026503
Guido van Rossum627b2d71993-12-24 10:39:16 +000026504# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000026505ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026506
Martin v. Löwis11437992002-04-12 09:54:03 +000026507cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026508# This file is a shell script that caches the results of configure
26509# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026510# scripts and configure runs, see configure's option --config-cache.
26511# It is not useful on other systems. If it contains results you don't
26512# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026513#
Martin v. Löwis11437992002-04-12 09:54:03 +000026514# config.status only pays attention to the cache file if you give it
26515# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026516#
Skip Montanaro6dead952003-09-25 14:50:04 +000026517# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026518# loading this file, other *unset* `ac_cv_foo' will be assigned the
26519# following values.
26520
26521_ACEOF
26522
Guido van Rossumf78abae1997-01-21 22:02:36 +000026523# The following way of writing the cache mishandles newlines in values,
26524# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026525# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026526# Ultrix sh set writes to stderr and can't be redirected directly,
26527# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026528(
26529 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26530 eval ac_val=\$$ac_var
26531 case $ac_val in #(
26532 *${as_nl}*)
26533 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026534 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
26535echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026536 esac
26537 case $ac_var in #(
26538 _ | IFS | as_nl) ;; #(
26539 *) $as_unset $ac_var ;;
26540 esac ;;
26541 esac
26542 done
26543
Martin v. Löwis11437992002-04-12 09:54:03 +000026544 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026545 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26546 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026547 # `set' does not quote correctly, so add quotes (double-quote
26548 # substitution turns \\\\ into \\, and sed turns \\ into \).
26549 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026550 "s/'/'\\\\''/g;
26551 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000026552 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000026553 *)
26554 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026555 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000026556 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026557 esac |
26558 sort
26559) |
Martin v. Löwis11437992002-04-12 09:54:03 +000026560 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000026561 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000026562 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000026563 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000026564 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26565 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000026566 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26567 :end' >>confcache
26568if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26569 if test -w "$cache_file"; then
26570 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026571 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
26572echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026573 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026574 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026575 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26576echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026577 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026578fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026579rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000026580
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026581test "x$prefix" = xNONE && prefix=$ac_default_prefix
26582# Let make expand exec_prefix.
26583test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000026584
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026585DEFS=-DHAVE_CONFIG_H
26586
Skip Montanaro6dead952003-09-25 14:50:04 +000026587ac_libobjs=
26588ac_ltlibobjs=
26589for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26590 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026591 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026592 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000026593 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26594 # will be set to the directory where LIBOBJS objects are built.
26595 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26596 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000026597done
26598LIBOBJS=$ac_libobjs
26599
26600LTLIBOBJS=$ac_ltlibobjs
26601
26602
Martin v. Löwis11437992002-04-12 09:54:03 +000026603
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026604: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000026605ac_clean_files_save=$ac_clean_files
26606ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026607{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26608echo "$as_me: creating $CONFIG_STATUS" >&6;}
26609cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026610#! $SHELL
26611# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026612# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026613# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000026614# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026615
Martin v. Löwis11437992002-04-12 09:54:03 +000026616debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000026617ac_cs_recheck=false
26618ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026619SHELL=\${CONFIG_SHELL-$SHELL}
26620_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000026621
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026622cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026623## --------------------- ##
26624## M4sh Initialization. ##
26625## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026626
Martin v. Löwiseba40652007-08-30 20:10:57 +000026627# Be more Bourne compatible
26628DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026629if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26630 emulate sh
26631 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026632 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026633 # is contrary to our usage. Disable this feature.
26634 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026635 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000026636else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026637 case `(set -o) 2>/dev/null` in
26638 *posix*) set -o posix ;;
26639esac
26640
Martin v. Löwis11437992002-04-12 09:54:03 +000026641fi
Michael W. Hudson54241132001-12-07 15:38:26 +000026642
Skip Montanaro6dead952003-09-25 14:50:04 +000026643
Martin v. Löwis11437992002-04-12 09:54:03 +000026644
26645
Martin v. Löwiseba40652007-08-30 20:10:57 +000026646# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026647# Avoid depending upon Character Ranges.
26648as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26649as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26650as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26651as_cr_digits='0123456789'
26652as_cr_alnum=$as_cr_Letters$as_cr_digits
26653
26654# The user is always right.
26655if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026656 echo "#! /bin/sh" >conf$$.sh
26657 echo "exit 0" >>conf$$.sh
26658 chmod +x conf$$.sh
26659 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26660 PATH_SEPARATOR=';'
26661 else
26662 PATH_SEPARATOR=:
26663 fi
26664 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026665fi
26666
Martin v. Löwiseba40652007-08-30 20:10:57 +000026667# Support unset when possible.
26668if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26669 as_unset=unset
26670else
26671 as_unset=false
26672fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026673
Martin v. Löwiseba40652007-08-30 20:10:57 +000026674
26675# IFS
26676# We need space, tab and new line, in precisely that order. Quoting is
26677# there to prevent editors from complaining about space-tab.
26678# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26679# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026680as_nl='
26681'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026682IFS=" "" $as_nl"
26683
26684# Find who we are. Look in the path if we contain no directory separator.
26685case $0 in
26686 *[\\/]* ) as_myself=$0 ;;
26687 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026688for as_dir in $PATH
26689do
26690 IFS=$as_save_IFS
26691 test -z "$as_dir" && as_dir=.
26692 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26693done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026694IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026695
Martin v. Löwiseba40652007-08-30 20:10:57 +000026696 ;;
26697esac
26698# We did not find ourselves, most probably we were run as `sh COMMAND'
26699# in which case we are not to be found in the path.
26700if test "x$as_myself" = x; then
26701 as_myself=$0
26702fi
26703if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026704 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000026705 { (exit 1); exit 1; }
26706fi
26707
26708# Work around bugs in pre-3.0 UWIN ksh.
26709for as_var in ENV MAIL MAILPATH
26710do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26711done
26712PS1='$ '
26713PS2='> '
26714PS4='+ '
26715
26716# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026717for as_var in \
26718 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26719 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26720 LC_TELEPHONE LC_TIME
26721do
26722 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26723 eval $as_var=C; export $as_var
26724 else
26725 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26726 fi
26727done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026728
26729# Required to use basename.
26730if expr a : '\(a\)' >/dev/null 2>&1 &&
26731 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26732 as_expr=expr
26733else
26734 as_expr=false
26735fi
26736
26737if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26738 as_basename=basename
26739else
26740 as_basename=false
26741fi
26742
26743
26744# Name of the executable.
26745as_me=`$as_basename -- "$0" ||
26746$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26747 X"$0" : 'X\(//\)$' \| \
26748 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026749echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026750 sed '/^.*\/\([^/][^/]*\)\/*$/{
26751 s//\1/
26752 q
26753 }
26754 /^X\/\(\/\/\)$/{
26755 s//\1/
26756 q
26757 }
26758 /^X\/\(\/\).*/{
26759 s//\1/
26760 q
26761 }
26762 s/.*/./; q'`
26763
26764# CDPATH.
26765$as_unset CDPATH
26766
26767
26768
Martin v. Löwis11437992002-04-12 09:54:03 +000026769 as_lineno_1=$LINENO
26770 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026771 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000026772 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026773
Martin v. Löwis11437992002-04-12 09:54:03 +000026774 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26775 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000026776 # line-number line after each line using $LINENO; the second 'sed'
26777 # does the real work. The second script uses 'N' to pair each
26778 # line-number line with the line containing $LINENO, and appends
26779 # trailing '-' during substitution so that $LINENO is not a special
26780 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000026781 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000026782 # scripts with optimization help from Paolo Bonzini. Blame Lee
26783 # E. McMahon (1931-1989) for sed's syntax. :-)
26784 sed -n '
26785 p
26786 /[$]LINENO/=
26787 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000026788 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000026789 s/[$]LINENO.*/&-/
26790 t lineno
26791 b
26792 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000026793 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000026794 :loop
26795 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000026796 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000026797 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000026798 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000026799 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026800 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026801 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026802
Martin v. Löwis11437992002-04-12 09:54:03 +000026803 # Don't try to exec as it changes $[0], causing all sort of problems
26804 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000026805 # original and so on. Autoconf is especially sensitive to this).
26806 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000026807 # Exit status is that of the last command.
26808 exit
26809}
26810
26811
Martin v. Löwiseba40652007-08-30 20:10:57 +000026812if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26813 as_dirname=dirname
26814else
26815 as_dirname=false
26816fi
26817
26818ECHO_C= ECHO_N= ECHO_T=
26819case `echo -n x` in
26820-n*)
26821 case `echo 'x\c'` in
26822 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26823 *) ECHO_C='\c';;
26824 esac;;
26825*)
26826 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000026827esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026828
Martin v. Löwiseba40652007-08-30 20:10:57 +000026829if expr a : '\(a\)' >/dev/null 2>&1 &&
26830 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026831 as_expr=expr
26832else
26833 as_expr=false
26834fi
26835
26836rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000026837if test -d conf$$.dir; then
26838 rm -f conf$$.dir/conf$$.file
26839else
26840 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026841 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000026842fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026843echo >conf$$.file
26844if ln -s conf$$.file conf$$ 2>/dev/null; then
26845 as_ln_s='ln -s'
26846 # ... but there are two gotchas:
26847 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26848 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26849 # In both cases, we have to default to `cp -p'.
26850 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026851 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026852elif ln conf$$.file conf$$ 2>/dev/null; then
26853 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000026854else
26855 as_ln_s='cp -p'
26856fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026857rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26858rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000026859
Skip Montanaro6dead952003-09-25 14:50:04 +000026860if mkdir -p . 2>/dev/null; then
26861 as_mkdir_p=:
26862else
Skip Montanarof0d5f792004-08-15 14:08:23 +000026863 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000026864 as_mkdir_p=false
26865fi
26866
Martin v. Löwiseba40652007-08-30 20:10:57 +000026867if test -x / >/dev/null 2>&1; then
26868 as_test_x='test -x'
26869else
26870 if ls -dL / >/dev/null 2>&1; then
26871 as_ls_L_option=L
26872 else
26873 as_ls_L_option=
26874 fi
26875 as_test_x='
26876 eval sh -c '\''
26877 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026878 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000026879 else
26880 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026881 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026882 esac;
26883 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
26884 ???[sx]*):;;*)false;;esac;fi
26885 '\'' sh
26886 '
26887fi
26888as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000026889
26890# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026891as_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 +000026892
26893# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026894as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026895
26896
Martin v. Löwis11437992002-04-12 09:54:03 +000026897exec 6>&1
26898
Martin v. Löwiseba40652007-08-30 20:10:57 +000026899# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000026900# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000026901# values after options handling.
26902ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000026903This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026904generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000026905
26906 CONFIG_FILES = $CONFIG_FILES
26907 CONFIG_HEADERS = $CONFIG_HEADERS
26908 CONFIG_LINKS = $CONFIG_LINKS
26909 CONFIG_COMMANDS = $CONFIG_COMMANDS
26910 $ $0 $@
26911
Martin v. Löwiseba40652007-08-30 20:10:57 +000026912on `(hostname || uname -n) 2>/dev/null | sed 1q`
26913"
26914
Martin v. Löwis11437992002-04-12 09:54:03 +000026915_ACEOF
26916
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026917cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026918# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000026919config_files="$ac_config_files"
26920config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000026921
Martin v. Löwiseba40652007-08-30 20:10:57 +000026922_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026923
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026924cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026925ac_cs_usage="\
26926\`$as_me' instantiates files from templates according to the
26927current configuration.
26928
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026929Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000026930
26931 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000026932 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026933 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000026934 -d, --debug don't remove temporary files
26935 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026936 --file=FILE[:TEMPLATE]
26937 instantiate the configuration file FILE
26938 --header=FILE[:TEMPLATE]
26939 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000026940
26941Configuration files:
26942$config_files
26943
26944Configuration headers:
26945$config_headers
26946
26947Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000026948
Martin v. Löwiseba40652007-08-30 20:10:57 +000026949_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026950cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026951ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000026952python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026953configured by $0, generated by GNU Autoconf 2.61,
26954 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000026955
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026956Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000026957This config.status script is free software; the Free Software Foundation
26958gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000026959
26960ac_pwd='$ac_pwd'
26961srcdir='$srcdir'
26962INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000026963_ACEOF
26964
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026965cat >>$CONFIG_STATUS <<\_ACEOF
26966# If no file are specified by the user, then we need to provide default
26967# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000026968ac_need_defaults=:
26969while test $# != 0
26970do
26971 case $1 in
26972 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000026973 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26974 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000026975 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000026976 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026977 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000026978 ac_option=$1
26979 ac_optarg=$2
26980 ac_shift=shift
26981 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026982 esac
26983
Skip Montanaro6dead952003-09-25 14:50:04 +000026984 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000026985 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000026986 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26987 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026988 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026989 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026990 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000026991 debug=: ;;
26992 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000026993 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026994 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026995 ac_need_defaults=false;;
26996 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000026997 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026998 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026999 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027000 --he | --h)
27001 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027002 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000027003Try \`$0 --help' for more information." >&2
27004 { (exit 1); exit 1; }; };;
27005 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027006 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027007 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27008 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27009 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027010
27011 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027012 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000027013Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027014 { (exit 1); exit 1; }; } ;;
27015
Martin v. Löwiseba40652007-08-30 20:10:57 +000027016 *) ac_config_targets="$ac_config_targets $1"
27017 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027018
27019 esac
27020 shift
27021done
27022
Skip Montanaro6dead952003-09-25 14:50:04 +000027023ac_configure_extra_args=
27024
27025if $ac_cs_silent; then
27026 exec 6>/dev/null
27027 ac_configure_extra_args="$ac_configure_extra_args --silent"
27028fi
27029
27030_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027031cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027032if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027033 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27034 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000027035 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027036 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027037fi
27038
Martin v. Löwis11437992002-04-12 09:54:03 +000027039_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027040cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027041exec 5>>config.log
27042{
27043 echo
27044 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27045## Running $as_me. ##
27046_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027047 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027048} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027049
Martin v. Löwiseba40652007-08-30 20:10:57 +000027050_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027051cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027052_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027053
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027054cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027055
27056# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027057for ac_config_target in $ac_config_targets
27058do
Martin v. Löwiseba40652007-08-30 20:10:57 +000027059 case $ac_config_target in
27060 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27061 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27062 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
27063 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000027064 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27065 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027066 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27067 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027068 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027069
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027070 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27071echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027072 { (exit 1); exit 1; }; };;
27073 esac
27074done
27075
Martin v. Löwiseba40652007-08-30 20:10:57 +000027076
Martin v. Löwis11437992002-04-12 09:54:03 +000027077# If the user did not use the arguments to specify the items to instantiate,
27078# then the envvar interface is used. Set only those that are not.
27079# We use the long form for the default assignment because of an extremely
27080# bizarre bug on SunOS 4.1.3.
27081if $ac_need_defaults; then
27082 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27083 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27084fi
27085
Skip Montanaro6dead952003-09-25 14:50:04 +000027086# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000027087# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027088# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027089# Hook for its removal unless debugging.
27090# Note that there is a small window in which the directory will not be cleaned:
27091# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027092$debug ||
27093{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027094 tmp=
27095 trap 'exit_status=$?
27096 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27097' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027098 trap '{ (exit 1); exit 1; }' 1 2 13 15
27099}
Martin v. Löwis11437992002-04-12 09:54:03 +000027100# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027101
Martin v. Löwis11437992002-04-12 09:54:03 +000027102{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027103 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027104 test -n "$tmp" && test -d "$tmp"
27105} ||
27106{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027107 tmp=./conf$$-$RANDOM
27108 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027109} ||
27110{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027111 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027112 { (exit 1); exit 1; }
27113}
27114
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027115#
27116# Set up the sed scripts for CONFIG_FILES section.
27117#
27118
27119# No need to generate the scripts if there are no CONFIG_FILES.
27120# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000027121if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027122
27123_ACEOF
27124
Martin v. Löwiseba40652007-08-30 20:10:57 +000027125
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027126
Martin v. Löwiseba40652007-08-30 20:10:57 +000027127ac_delim='%!_!# '
27128for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027129 cat >conf$$subs.sed <<_ACEOF
27130SHELL!$SHELL$ac_delim
27131PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27132PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27133PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27134PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27135PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27136PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27137exec_prefix!$exec_prefix$ac_delim
27138prefix!$prefix$ac_delim
27139program_transform_name!$program_transform_name$ac_delim
27140bindir!$bindir$ac_delim
27141sbindir!$sbindir$ac_delim
27142libexecdir!$libexecdir$ac_delim
27143datarootdir!$datarootdir$ac_delim
27144datadir!$datadir$ac_delim
27145sysconfdir!$sysconfdir$ac_delim
27146sharedstatedir!$sharedstatedir$ac_delim
27147localstatedir!$localstatedir$ac_delim
27148includedir!$includedir$ac_delim
27149oldincludedir!$oldincludedir$ac_delim
27150docdir!$docdir$ac_delim
27151infodir!$infodir$ac_delim
27152htmldir!$htmldir$ac_delim
27153dvidir!$dvidir$ac_delim
27154pdfdir!$pdfdir$ac_delim
27155psdir!$psdir$ac_delim
27156libdir!$libdir$ac_delim
27157localedir!$localedir$ac_delim
27158mandir!$mandir$ac_delim
27159DEFS!$DEFS$ac_delim
27160ECHO_C!$ECHO_C$ac_delim
27161ECHO_N!$ECHO_N$ac_delim
27162ECHO_T!$ECHO_T$ac_delim
27163LIBS!$LIBS$ac_delim
27164build_alias!$build_alias$ac_delim
27165host_alias!$host_alias$ac_delim
27166target_alias!$target_alias$ac_delim
27167VERSION!$VERSION$ac_delim
27168SOVERSION!$SOVERSION$ac_delim
27169CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27170UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27171ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
27172PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27173PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27174PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27175PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27176PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27177FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27178FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27179FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27180FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27181FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27182MACHDEP!$MACHDEP$ac_delim
27183SGI_ABI!$SGI_ABI$ac_delim
27184EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
27185EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
27186CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27187EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27188CC!$CC$ac_delim
27189CFLAGS!$CFLAGS$ac_delim
27190LDFLAGS!$LDFLAGS$ac_delim
27191CPPFLAGS!$CPPFLAGS$ac_delim
27192ac_ct_CC!$ac_ct_CC$ac_delim
27193EXEEXT!$EXEEXT$ac_delim
27194OBJEXT!$OBJEXT$ac_delim
27195CXX!$CXX$ac_delim
27196MAINCC!$MAINCC$ac_delim
27197CPP!$CPP$ac_delim
27198GREP!$GREP$ac_delim
27199EGREP!$EGREP$ac_delim
27200BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27201LIBRARY!$LIBRARY$ac_delim
27202LDLIBRARY!$LDLIBRARY$ac_delim
27203DLLLIBRARY!$DLLLIBRARY$ac_delim
27204BLDLIBRARY!$BLDLIBRARY$ac_delim
27205LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27206INSTSONAME!$INSTSONAME$ac_delim
27207RUNSHARED!$RUNSHARED$ac_delim
27208LINKCC!$LINKCC$ac_delim
27209GNULD!$GNULD$ac_delim
27210RANLIB!$RANLIB$ac_delim
27211AR!$AR$ac_delim
27212ARFLAGS!$ARFLAGS$ac_delim
27213SVNVERSION!$SVNVERSION$ac_delim
27214INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27215INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27216INSTALL_DATA!$INSTALL_DATA$ac_delim
27217LN!$LN$ac_delim
27218OPT!$OPT$ac_delim
27219BASECFLAGS!$BASECFLAGS$ac_delim
27220UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27221OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27222LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27223SO!$SO$ac_delim
27224LDSHARED!$LDSHARED$ac_delim
27225BLDSHARED!$BLDSHARED$ac_delim
27226CCSHARED!$CCSHARED$ac_delim
27227_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027228
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027229 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 +000027230 break
27231 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027232 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27233echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027234 { (exit 1); exit 1; }; }
27235 else
27236 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027237 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027238done
27239
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027240ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27241if test -n "$ac_eof"; then
27242 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27243 ac_eof=`expr $ac_eof + 1`
27244fi
27245
27246cat >>$CONFIG_STATUS <<_ACEOF
27247cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27248/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000027249_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027250sed '
27251s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27252s/^/s,@/; s/!/@,|#_!!_#|/
27253:n
27254t n
27255s/'"$ac_delim"'$/,g/; t
27256s/$/\\/; p
27257N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27258' >>$CONFIG_STATUS <conf$$subs.sed
27259rm -f conf$$subs.sed
27260cat >>$CONFIG_STATUS <<_ACEOF
27261CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000027262_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027263
27264
27265ac_delim='%!_!# '
27266for ac_last_try in false false false false false :; do
27267 cat >conf$$subs.sed <<_ACEOF
27268LINKFORSHARED!$LINKFORSHARED$ac_delim
27269CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
27270SHLIBS!$SHLIBS$ac_delim
27271USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27272SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27273USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27274LDLAST!$LDLAST$ac_delim
27275THREADOBJ!$THREADOBJ$ac_delim
27276DLINCLDIR!$DLINCLDIR$ac_delim
27277DYNLOADFILE!$DYNLOADFILE$ac_delim
27278MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27279TRUE!$TRUE$ac_delim
27280LIBOBJS!$LIBOBJS$ac_delim
27281HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27282HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27283HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27284HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27285HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27286LIBM!$LIBM$ac_delim
27287LIBC!$LIBC$ac_delim
27288UNICODE_OBJS!$UNICODE_OBJS$ac_delim
27289THREADHEADERS!$THREADHEADERS$ac_delim
27290SRCDIRS!$SRCDIRS$ac_delim
27291LTLIBOBJS!$LTLIBOBJS$ac_delim
27292_ACEOF
27293
27294 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
27295 break
27296 elif $ac_last_try; then
27297 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27298echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027299 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027300 else
27301 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27302 fi
27303done
27304
27305ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27306if test -n "$ac_eof"; then
27307 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27308 ac_eof=`expr $ac_eof + 1`
27309fi
27310
27311cat >>$CONFIG_STATUS <<_ACEOF
27312cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
27313/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027314_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027315sed '
27316s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27317s/^/s,@/; s/!/@,|#_!!_#|/
27318:n
27319t n
27320s/'"$ac_delim"'$/,g/; t
27321s/$/\\/; p
27322N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27323' >>$CONFIG_STATUS <conf$$subs.sed
27324rm -f conf$$subs.sed
27325cat >>$CONFIG_STATUS <<_ACEOF
27326:end
27327s/|#_!!_#|//g
27328CEOF$ac_eof
27329_ACEOF
27330
Martin v. Löwiseba40652007-08-30 20:10:57 +000027331
27332# VPATH may cause trouble with some makes, so we remove $(srcdir),
27333# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27334# trailing colons and then remove the whole line if VPATH becomes empty
27335# (actually we leave an empty line to preserve line numbers).
27336if test "x$srcdir" = x.; then
27337 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27338s/:*\$(srcdir):*/:/
27339s/:*\${srcdir}:*/:/
27340s/:*@srcdir@:*/:/
27341s/^\([^=]*=[ ]*\):*/\1/
27342s/:*$//
27343s/^[^=]*=[ ]*$//
27344}'
27345fi
27346
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027347cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027348fi # test -n "$CONFIG_FILES"
27349
Martin v. Löwiseba40652007-08-30 20:10:57 +000027350
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027351for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000027352do
27353 case $ac_tag in
27354 :[FHLC]) ac_mode=$ac_tag; continue;;
27355 esac
27356 case $ac_mode$ac_tag in
27357 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027358 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
27359echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027360 { (exit 1); exit 1; }; };;
27361 :[FH]-) ac_tag=-:-;;
27362 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27363 esac
27364 ac_save_IFS=$IFS
27365 IFS=:
27366 set x $ac_tag
27367 IFS=$ac_save_IFS
27368 shift
27369 ac_file=$1
27370 shift
27371
27372 case $ac_mode in
27373 :L) ac_source=$1;;
27374 :[FH])
27375 ac_file_inputs=
27376 for ac_f
27377 do
27378 case $ac_f in
27379 -) ac_f="$tmp/stdin";;
27380 *) # Look for the file first in the build tree, then in the source tree
27381 # (if the path is not absolute). The absolute path cannot be DOS-style,
27382 # because $ac_f cannot contain `:'.
27383 test -f "$ac_f" ||
27384 case $ac_f in
27385 [\\/$]*) false;;
27386 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27387 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027388 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27389echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027390 { (exit 1); exit 1; }; };;
27391 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027392 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027393 done
27394
27395 # Let's still pretend it is `configure' which instantiates (i.e., don't
27396 # use $as_me), people would be surprised to read:
27397 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027398 configure_input="Generated from "`IFS=:
27399 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000027400 if test x"$ac_file" != x-; then
27401 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027402 { echo "$as_me:$LINENO: creating $ac_file" >&5
27403echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027404 fi
27405
27406 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027407 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027408 esac
27409 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027410 esac
27411
Martin v. Löwiseba40652007-08-30 20:10:57 +000027412 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027413$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027414 X"$ac_file" : 'X\(//\)[^/]' \| \
27415 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000027416 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027417echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027418 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27419 s//\1/
27420 q
27421 }
27422 /^X\(\/\/\)[^/].*/{
27423 s//\1/
27424 q
27425 }
27426 /^X\(\/\/\)$/{
27427 s//\1/
27428 q
27429 }
27430 /^X\(\/\).*/{
27431 s//\1/
27432 q
27433 }
27434 s/.*/./; q'`
27435 { as_dir="$ac_dir"
27436 case $as_dir in #(
27437 -*) as_dir=./$as_dir;;
27438 esac
27439 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027440 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000027441 while :; do
27442 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027443 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000027444 *) as_qdir=$as_dir;;
27445 esac
27446 as_dirs="'$as_qdir' $as_dirs"
27447 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027448$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027449 X"$as_dir" : 'X\(//\)[^/]' \| \
27450 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000027451 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027452echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027453 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27454 s//\1/
27455 q
27456 }
27457 /^X\(\/\/\)[^/].*/{
27458 s//\1/
27459 q
27460 }
27461 /^X\(\/\/\)$/{
27462 s//\1/
27463 q
27464 }
27465 /^X\(\/\).*/{
27466 s//\1/
27467 q
27468 }
27469 s/.*/./; q'`
27470 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027471 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027472 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027473 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27474echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027475 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027476 ac_builddir=.
27477
Martin v. Löwiseba40652007-08-30 20:10:57 +000027478case "$ac_dir" in
27479.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27480*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027481 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027482 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027483 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027484 case $ac_top_builddir_sub in
27485 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27486 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27487 esac ;;
27488esac
27489ac_abs_top_builddir=$ac_pwd
27490ac_abs_builddir=$ac_pwd$ac_dir_suffix
27491# for backward compatibility:
27492ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027493
27494case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000027495 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027496 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027497 ac_top_srcdir=$ac_top_builddir_sub
27498 ac_abs_top_srcdir=$ac_pwd ;;
27499 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027500 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027501 ac_top_srcdir=$srcdir
27502 ac_abs_top_srcdir=$srcdir ;;
27503 *) # Relative name.
27504 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27505 ac_top_srcdir=$ac_top_build_prefix$srcdir
27506 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027507esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000027508ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027509
Martin v. Löwis11437992002-04-12 09:54:03 +000027510
Martin v. Löwiseba40652007-08-30 20:10:57 +000027511 case $ac_mode in
27512 :F)
27513 #
27514 # CONFIG_FILE
27515 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027516
27517 case $INSTALL in
27518 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027519 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027520 esac
Brett Cannon19fab762007-06-02 03:02:29 +000027521_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027522
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027523cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027524# If the template does not know about datarootdir, expand it.
27525# FIXME: This hack should be removed a few years after 2.60.
27526ac_datarootdir_hack=; ac_datarootdir_seen=
27527
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027528case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000027529 p
27530 q
27531}
27532/@datadir@/p
27533/@docdir@/p
27534/@infodir@/p
27535/@localedir@/p
27536/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027537' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000027538*datarootdir*) ac_datarootdir_seen=yes;;
27539*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027540 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27541echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027542_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027543cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027544 ac_datarootdir_hack='
27545 s&@datadir@&$datadir&g
27546 s&@docdir@&$docdir&g
27547 s&@infodir@&$infodir&g
27548 s&@localedir@&$localedir&g
27549 s&@mandir@&$mandir&g
27550 s&\\\${datarootdir}&$datarootdir&g' ;;
27551esac
27552_ACEOF
27553
27554# Neutralize VPATH when `$srcdir' = `.'.
27555# Shell code in configure.ac might set extrasub.
27556# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027557cat >>$CONFIG_STATUS <<_ACEOF
27558 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000027559$extrasub
27560_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027561cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027562:t
27563/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027564s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000027565s&@top_builddir@&$ac_top_builddir_sub&;t t
27566s&@srcdir@&$ac_srcdir&;t t
27567s&@abs_srcdir@&$ac_abs_srcdir&;t t
27568s&@top_srcdir@&$ac_top_srcdir&;t t
27569s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27570s&@builddir@&$ac_builddir&;t t
27571s&@abs_builddir@&$ac_abs_builddir&;t t
27572s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27573s&@INSTALL@&$ac_INSTALL&;t t
27574$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027575" $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 +000027576
Martin v. Löwiseba40652007-08-30 20:10:57 +000027577test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27578 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27579 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027580 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027581which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027582echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027583which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027584
Martin v. Löwiseba40652007-08-30 20:10:57 +000027585 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000027586 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027587 -) cat "$tmp/out"; rm -f "$tmp/out";;
27588 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
27589 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000027590 ;;
27591 :H)
27592 #
27593 # CONFIG_HEADER
27594 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027595_ACEOF
27596
27597# Transform confdefs.h into a sed script `conftest.defines', that
27598# substitutes the proper values into config.h.in to produce config.h.
27599rm -f conftest.defines conftest.tail
27600# First, append a space to every undef/define line, to ease matching.
27601echo 's/$/ /' >conftest.defines
27602# Then, protect against being on the right side of a sed subst, or in
27603# an unquoted here document, in config.status. If some macros were
27604# called several times there might be several #defines for the same
27605# symbol, which is useless. But do not sort them, since the last
27606# AC_DEFINE must be honored.
27607ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27608# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
27609# NAME is the cpp macro being defined, VALUE is the value it is being given.
27610# PARAMS is the parameter list in the macro definition--in most cases, it's
27611# just an empty string.
27612ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
27613ac_dB='\\)[ (].*,\\1define\\2'
27614ac_dC=' '
27615ac_dD=' ,'
27616
27617uniq confdefs.h |
27618 sed -n '
27619 t rset
27620 :rset
27621 s/^[ ]*#[ ]*define[ ][ ]*//
27622 t ok
27623 d
27624 :ok
27625 s/[\\&,]/\\&/g
27626 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
27627 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
27628 ' >>conftest.defines
27629
27630# Remove the space that was appended to ease matching.
27631# Then replace #undef with comments. This is necessary, for
27632# example, in the case of _POSIX_SOURCE, which is predefined and required
27633# on some systems where configure will not decide to define it.
27634# (The regexp can be short, since the line contains either #define or #undef.)
27635echo 's/ $//
27636s,^[ #]*u.*,/* & */,' >>conftest.defines
27637
27638# Break up conftest.defines:
27639ac_max_sed_lines=50
27640
27641# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
27642# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
27643# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
27644# et cetera.
27645ac_in='$ac_file_inputs'
27646ac_out='"$tmp/out1"'
27647ac_nxt='"$tmp/out2"'
27648
27649while :
27650do
27651 # Write a here document:
27652 cat >>$CONFIG_STATUS <<_ACEOF
27653 # First, check the format of the line:
27654 cat >"\$tmp/defines.sed" <<\\CEOF
27655/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
27656/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
27657b
27658:def
27659_ACEOF
27660 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
27661 echo 'CEOF
27662 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27663 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27664 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27665 grep . conftest.tail >/dev/null || break
27666 rm -f conftest.defines
27667 mv conftest.tail conftest.defines
27668done
27669rm -f conftest.defines conftest.tail
27670
27671echo "ac_result=$ac_in" >>$CONFIG_STATUS
27672cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027673 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027674 echo "/* $configure_input */" >"$tmp/config.h"
27675 cat "$ac_result" >>"$tmp/config.h"
27676 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27677 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27678echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027679 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027680 rm -f $ac_file
27681 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027682 fi
27683 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027684 echo "/* $configure_input */"
27685 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027686 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027687 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027688 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027689
Martin v. Löwiseba40652007-08-30 20:10:57 +000027690
27691 esac
27692
27693done # for ac_tag
27694
Guido van Rossum627b2d71993-12-24 10:39:16 +000027695
Martin v. Löwis11437992002-04-12 09:54:03 +000027696{ (exit 0); exit 0; }
27697_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027698chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027699ac_clean_files=$ac_clean_files_save
27700
27701
27702# configure is writing to config.log, and then calls config.status.
27703# config.status does its own redirection, appending to config.log.
27704# Unfortunately, on DOS this fails, as config.log is still kept open
27705# by configure, so config.status won't be able to write to it; its
27706# output is simply discarded. So we exec the FD to /dev/null,
27707# effectively closing config.log, so it can be properly (re)opened and
27708# appended to by config.status. When coming back to configure, we
27709# need to make the FD available again.
27710if test "$no_create" != yes; then
27711 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027712 ac_config_status_args=
27713 test "$silent" = yes &&
27714 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027715 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027716 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027717 exec 5>>config.log
27718 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27719 # would make configure fail if this is the last instruction.
27720 $ac_cs_success || { (exit 1); exit 1; }
27721fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027722
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027723
Martin v. Löwisf7afe952006-04-14 15:16:15 +000027724echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027725if test ! -f Modules/Setup
27726then
27727 cp $srcdir/Modules/Setup.dist Modules/Setup
27728fi
27729
Martin v. Löwisf7afe952006-04-14 15:16:15 +000027730echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027731if test ! -f Modules/Setup.local
27732then
27733 echo "# Edit this file for local setup changes" >Modules/Setup.local
27734fi
27735
27736echo "creating Makefile"
27737$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27738 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027739 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000027740
27741case $ac_sys_system in
27742BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027743 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000027744
27745 Support for BeOS is deprecated as of Python 2.6.
27746 See PEP 11 for the gory details.
27747 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027748echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000027749
27750 Support for BeOS is deprecated as of Python 2.6.
27751 See PEP 11 for the gory details.
27752 " >&2;}
27753 ;;
27754*) ;;
27755esac
27756
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027757mv config.c Modules