blob: 6f17eb7b0cc9bda053b8f128967b357229aa5d0c [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Mark Dickinson0ef0b912009-12-31 21:11:48 +00002# From configure.in Revision: 77189 .
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
Ronald Oussoren92919a62009-12-24 13:30:58 +0000661LIPO_32BIT_FLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000662PYTHONFRAMEWORK
663PYTHONFRAMEWORKIDENTIFIER
664PYTHONFRAMEWORKDIR
665PYTHONFRAMEWORKPREFIX
666PYTHONFRAMEWORKINSTALLDIR
667FRAMEWORKINSTALLFIRST
668FRAMEWORKINSTALLLAST
669FRAMEWORKALTINSTALLFIRST
670FRAMEWORKALTINSTALLLAST
671FRAMEWORKUNIXTOOLSPREFIX
672MACHDEP
673SGI_ABI
674EXTRAPLATDIR
675EXTRAMACHDEPPATH
676CONFIGURE_MACOSX_DEPLOYMENT_TARGET
677EXPORT_MACOSX_DEPLOYMENT_TARGET
678CC
679CFLAGS
680LDFLAGS
681CPPFLAGS
682ac_ct_CC
683EXEEXT
684OBJEXT
685CXX
686MAINCC
687CPP
688GREP
689EGREP
690BUILDEXEEXT
691LIBRARY
692LDLIBRARY
693DLLLIBRARY
694BLDLIBRARY
695LDLIBRARYDIR
696INSTSONAME
697RUNSHARED
698LINKCC
699GNULD
700RANLIB
701AR
702ARFLAGS
703SVNVERSION
704INSTALL_PROGRAM
705INSTALL_SCRIPT
706INSTALL_DATA
707LN
708OPT
709BASECFLAGS
710UNIVERSAL_ARCH_FLAGS
711OTHER_LIBTOOL_OPT
712LIBTOOL_CRUFT
713SO
714LDSHARED
715BLDSHARED
716CCSHARED
717LINKFORSHARED
718CFLAGSFORSHARED
719SHLIBS
720USE_SIGNAL_MODULE
721SIGNAL_OBJS
722USE_THREAD_MODULE
723LDLAST
724THREADOBJ
725DLINCLDIR
726DYNLOADFILE
727MACHDEP_OBJS
728TRUE
729LIBOBJS
730HAVE_GETHOSTBYNAME_R_6_ARG
731HAVE_GETHOSTBYNAME_R_5_ARG
732HAVE_GETHOSTBYNAME_R_3_ARG
733HAVE_GETHOSTBYNAME_R
734HAVE_GETHOSTBYNAME
735LIBM
736LIBC
737UNICODE_OBJS
738THREADHEADERS
739SRCDIRS
740LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000741ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000742 ac_precious_vars='build_alias
743host_alias
744target_alias
745CC
746CFLAGS
747LDFLAGS
748LIBS
749CPPFLAGS
750CPP'
751
Guido van Rossum627b2d71993-12-24 10:39:16 +0000752
Guido van Rossum7f43da71994-08-01 12:15:30 +0000753# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000754ac_init_help=
755ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000756# The variables have the same names as the options, with
757# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000758cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000759exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000760no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000761no_recursion=
762prefix=NONE
763program_prefix=NONE
764program_suffix=NONE
765program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000767site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000769verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000770x_includes=NONE
771x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000772
773# Installation directory options.
774# These are left unexpanded so users can "make install exec_prefix=/foo"
775# and all the variables that are supposed to be based on exec_prefix
776# by default will actually change.
777# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000778# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000779bindir='${exec_prefix}/bin'
780sbindir='${exec_prefix}/sbin'
781libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000782datarootdir='${prefix}/share'
783datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000784sysconfdir='${prefix}/etc'
785sharedstatedir='${prefix}/com'
786localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000787includedir='${prefix}/include'
788oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000789docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
790infodir='${datarootdir}/info'
791htmldir='${docdir}'
792dvidir='${docdir}'
793pdfdir='${docdir}'
794psdir='${docdir}'
795libdir='${exec_prefix}/lib'
796localedir='${datarootdir}/locale'
797mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000798
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000800ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000802do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803 # If the previous option needs an argument, assign it.
804 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000805 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806 ac_prev=
807 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000808 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000809
Martin v. Löwiseba40652007-08-30 20:10:57 +0000810 case $ac_option in
811 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
812 *) ac_optarg=yes ;;
813 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815 # Accept the important Cygnus configure options, so we can diagnose typos.
816
Martin v. Löwiseba40652007-08-30 20:10:57 +0000817 case $ac_dashdash$ac_option in
818 --)
819 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821 -bindir | --bindir | --bindi | --bind | --bin | --bi)
822 ac_prev=bindir ;;
823 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000824 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825
826 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000827 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000828 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000829 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831 -cache-file | --cache-file | --cache-fil | --cache-fi \
832 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
833 ac_prev=cache_file ;;
834 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
835 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000836 cache_file=$ac_optarg ;;
837
838 --config-cache | -C)
839 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840
Martin v. Löwiseba40652007-08-30 20:10:57 +0000841 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000843 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000844 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000845
Martin v. Löwiseba40652007-08-30 20:10:57 +0000846 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
847 | --dataroo | --dataro | --datar)
848 ac_prev=datarootdir ;;
849 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
850 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
851 datarootdir=$ac_optarg ;;
852
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853 -disable-* | --disable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000854 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000856 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
857 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000858 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000859 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
860 eval enable_$ac_feature=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000861
862 -docdir | --docdir | --docdi | --doc | --do)
863 ac_prev=docdir ;;
864 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
865 docdir=$ac_optarg ;;
866
867 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
868 ac_prev=dvidir ;;
869 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
870 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871
872 -enable-* | --enable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000873 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000875 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
876 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000877 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000878 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
879 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
882 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
883 | --exec | --exe | --ex)
884 ac_prev=exec_prefix ;;
885 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
886 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
887 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000888 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
890 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000891 # Obsolete; use --with-gas.
892 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
Martin v. Löwis11437992002-04-12 09:54:03 +0000894 -help | --help | --hel | --he | -h)
895 ac_init_help=long ;;
896 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
897 ac_init_help=recursive ;;
898 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
899 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900
901 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000902 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000904 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905
Martin v. Löwiseba40652007-08-30 20:10:57 +0000906 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
907 ac_prev=htmldir ;;
908 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
909 | --ht=*)
910 htmldir=$ac_optarg ;;
911
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912 -includedir | --includedir | --includedi | --included | --include \
913 | --includ | --inclu | --incl | --inc)
914 ac_prev=includedir ;;
915 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
916 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918
919 -infodir | --infodir | --infodi | --infod | --info | --inf)
920 ac_prev=infodir ;;
921 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000923
924 -libdir | --libdir | --libdi | --libd)
925 ac_prev=libdir ;;
926 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928
929 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
930 | --libexe | --libex | --libe)
931 ac_prev=libexecdir ;;
932 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
933 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935
Martin v. Löwiseba40652007-08-30 20:10:57 +0000936 -localedir | --localedir | --localedi | --localed | --locale)
937 ac_prev=localedir ;;
938 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
939 localedir=$ac_optarg ;;
940
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000942 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 ac_prev=localstatedir ;;
944 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000945 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947
948 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
949 ac_prev=mandir ;;
950 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954 # Obsolete; use --without-fp.
955 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956
957 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959 no_create=yes ;;
960
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000961 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
962 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
963 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000965 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
966 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
967 | --oldin | --oldi | --old | --ol | --o)
968 ac_prev=oldincludedir ;;
969 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
970 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
971 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000972 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000973
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
975 ac_prev=prefix ;;
976 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000978
979 -program-prefix | --program-prefix | --program-prefi | --program-pref \
980 | --program-pre | --program-pr | --program-p)
981 ac_prev=program_prefix ;;
982 -program-prefix=* | --program-prefix=* | --program-prefi=* \
983 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000984 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985
986 -program-suffix | --program-suffix | --program-suffi | --program-suff \
987 | --program-suf | --program-su | --program-s)
988 ac_prev=program_suffix ;;
989 -program-suffix=* | --program-suffix=* | --program-suffi=* \
990 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
993 -program-transform-name | --program-transform-name \
994 | --program-transform-nam | --program-transform-na \
995 | --program-transform-n | --program-transform- \
996 | --program-transform | --program-transfor \
997 | --program-transfo | --program-transf \
998 | --program-trans | --program-tran \
999 | --progr-tra | --program-tr | --program-t)
1000 ac_prev=program_transform_name ;;
1001 -program-transform-name=* | --program-transform-name=* \
1002 | --program-transform-nam=* | --program-transform-na=* \
1003 | --program-transform-n=* | --program-transform-=* \
1004 | --program-transform=* | --program-transfor=* \
1005 | --program-transfo=* | --program-transf=* \
1006 | --program-trans=* | --program-tran=* \
1007 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
Martin v. Löwiseba40652007-08-30 20:10:57 +00001010 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1011 ac_prev=pdfdir ;;
1012 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1013 pdfdir=$ac_optarg ;;
1014
1015 -psdir | --psdir | --psdi | --psd | --ps)
1016 ac_prev=psdir ;;
1017 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1018 psdir=$ac_optarg ;;
1019
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1021 | -silent | --silent | --silen | --sile | --sil)
1022 silent=yes ;;
1023
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001024 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1025 ac_prev=sbindir ;;
1026 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1027 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029
1030 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1031 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1032 | --sharedst | --shareds | --shared | --share | --shar \
1033 | --sha | --sh)
1034 ac_prev=sharedstatedir ;;
1035 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1036 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1037 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1038 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041 -site | --site | --sit)
1042 ac_prev=site ;;
1043 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001045
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1047 ac_prev=srcdir ;;
1048 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1052 | --syscon | --sysco | --sysc | --sys | --sy)
1053 ac_prev=sysconfdir ;;
1054 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1055 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1064 verbose=yes ;;
1065
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 -version | --version | --versio | --versi | --vers | -V)
1067 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068
1069 -with-* | --with-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001070 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001071 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001072 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1073 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001075 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1076 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077
1078 -without-* | --without-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001079 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001081 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1082 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001084 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1085 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001087 --x)
1088 # Obsolete; use --with-x.
1089 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
1091 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1092 | --x-incl | --x-inc | --x-in | --x-i)
1093 ac_prev=x_includes ;;
1094 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1095 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
1098 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1099 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1100 ac_prev=x_libraries ;;
1101 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1102 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001105 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001106Try \`$0 --help' for more information." >&2
1107 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108 ;;
1109
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 *=*)
1111 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1112 # Reject names that are not valid shell variable names.
1113 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001114 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001116 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 export $ac_envvar ;;
1118
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001119 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 # FIXME: should be removed in autoconf 3.0.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001121 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001123 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125 ;;
1126
1127 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001128done
1129
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001132 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134fi
1135
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001136# Be sure to have absolute directory names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001137for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1138 datadir sysconfdir sharedstatedir localstatedir includedir \
1139 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1140 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001141do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001142 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001144 [\\/$]* | ?:[\\/]* ) continue;;
1145 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001147 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001148 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001149done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001150
Martin v. Löwis11437992002-04-12 09:54:03 +00001151# There might be people who depend on the old broken behavior: `$host'
1152# used to hold the argument of --host etc.
1153# FIXME: To remove some day.
1154build=$build_alias
1155host=$host_alias
1156target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001157
Martin v. Löwis11437992002-04-12 09:54:03 +00001158# FIXME: To remove some day.
1159if test "x$host_alias" != x; then
1160 if test "x$build_alias" = x; then
1161 cross_compiling=maybe
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001162 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 +00001163 If a cross compiler is detected then cross compile mode will be used." >&2
1164 elif test "x$build_alias" != "x$host_alias"; then
1165 cross_compiling=yes
1166 fi
1167fi
1168
1169ac_tool_prefix=
1170test -n "$host_alias" && ac_tool_prefix=$host_alias-
1171
1172test "$silent" = yes && exec 6>/dev/null
1173
Guido van Rossum627b2d71993-12-24 10:39:16 +00001174
Martin v. Löwiseba40652007-08-30 20:10:57 +00001175ac_pwd=`pwd` && test -n "$ac_pwd" &&
1176ac_ls_di=`ls -di .` &&
1177ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001178 { echo "$as_me: error: Working directory cannot be determined" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001179 { (exit 1); exit 1; }; }
1180test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001181 { echo "$as_me: error: pwd does not report name of working directory" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001182 { (exit 1); exit 1; }; }
1183
1184
Guido van Rossum627b2d71993-12-24 10:39:16 +00001185# Find the source files, if location was not specified.
1186if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001188 # Try the directory containing this script, then the parent directory.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001189 ac_confdir=`$as_dirname -- "$0" ||
1190$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1191 X"$0" : 'X\(//\)[^/]' \| \
1192 X"$0" : 'X\(//\)$' \| \
1193 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1194echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001195 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1196 s//\1/
1197 q
1198 }
1199 /^X\(\/\/\)[^/].*/{
1200 s//\1/
1201 q
1202 }
1203 /^X\(\/\/\)$/{
1204 s//\1/
1205 q
1206 }
1207 /^X\(\/\).*/{
1208 s//\1/
1209 q
1210 }
1211 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001213 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214 srcdir=..
1215 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001216else
1217 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001218fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001219if test ! -r "$srcdir/$ac_unique_file"; then
1220 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001221 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001224ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1225ac_abs_confdir=`(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001226 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001227 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001228 pwd)`
1229# When building in place, set srcdir=.
1230if test "$ac_abs_confdir" = "$ac_pwd"; then
1231 srcdir=.
1232fi
1233# Remove unnecessary trailing slashes from srcdir.
1234# Double slashes in file names in object file debugging info
1235# mess up M-x gdb in Emacs.
1236case $srcdir in
1237*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1238esac
1239for ac_var in $ac_precious_vars; do
1240 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1241 eval ac_env_${ac_var}_value=\$${ac_var}
1242 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1243 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1244done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001245
Martin v. Löwis11437992002-04-12 09:54:03 +00001246#
1247# Report the --help message.
1248#
1249if test "$ac_init_help" = "long"; then
1250 # Omit some internal or obsolete options to make the list less imposing.
1251 # This message is too long to be a string in the A/UX 3.1 sh.
1252 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001253\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001254
1255Usage: $0 [OPTION]... [VAR=VALUE]...
1256
1257To assign environment variables (e.g., CC, CFLAGS...), specify them as
1258VAR=VALUE. See below for descriptions of some of the useful variables.
1259
1260Defaults for the options are specified in brackets.
1261
1262Configuration:
1263 -h, --help display this help and exit
1264 --help=short display options specific to this package
1265 --help=recursive display the short help of all the included packages
1266 -V, --version display version information and exit
1267 -q, --quiet, --silent do not print \`checking...' messages
1268 --cache-file=FILE cache test results in FILE [disabled]
1269 -C, --config-cache alias for \`--cache-file=config.cache'
1270 -n, --no-create do not create output files
1271 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1272
Martin v. Löwis11437992002-04-12 09:54:03 +00001273Installation directories:
1274 --prefix=PREFIX install architecture-independent files in PREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001275 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001276 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001277 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001278
1279By default, \`make install' will install all the files in
1280\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1281an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1282for instance \`--prefix=\$HOME'.
1283
1284For better control, use the options below.
1285
1286Fine tuning of the installation directories:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001287 --bindir=DIR user executables [EPREFIX/bin]
1288 --sbindir=DIR system admin executables [EPREFIX/sbin]
1289 --libexecdir=DIR program executables [EPREFIX/libexec]
1290 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1291 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1292 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1293 --libdir=DIR object code libraries [EPREFIX/lib]
1294 --includedir=DIR C header files [PREFIX/include]
1295 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1296 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1297 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1298 --infodir=DIR info documentation [DATAROOTDIR/info]
1299 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1300 --mandir=DIR man documentation [DATAROOTDIR/man]
1301 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1302 --htmldir=DIR html documentation [DOCDIR]
1303 --dvidir=DIR dvi documentation [DOCDIR]
1304 --pdfdir=DIR pdf documentation [DOCDIR]
1305 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001306_ACEOF
1307
1308 cat <<\_ACEOF
1309_ACEOF
1310fi
1311
1312if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001313 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001314 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001315 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001316 cat <<\_ACEOF
1317
1318Optional Features:
1319 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1320 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001321 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001322 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001323 --enable-framework[=INSTALLDIR]
1324 Build (MacOSX|Darwin) framework
1325 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001326 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001327 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1328 --enable-ipv6 Enable ipv6 (with ipv4) support
1329 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001330 --enable-big-digits[=BITS]
1331 use big digits for Python longs [BITS=30]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001332 --enable-unicode[=ucs[24]]
1333 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001334
1335Optional Packages:
1336 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1337 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001338 --with-universal-archs=ARCH
1339 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001340 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001341 --with-framework-name=FRAMEWORK
1342 specify an alternate name of the framework built
1343 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001344 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001345 --with-cxx-main=<compiler>
1346 compile main() and link python executable with C++
1347 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001348 --with-suffix=.exe set executable suffix
1349 --with-pydebug build with Py_DEBUG defined
1350 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001351 --with-system-expat build pyexpat module using an installed expat
1352 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001353 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001354 --with-dbmliborder=db1:db2:...
1355 order to check db backends for dbm. Valid value is a
1356 colon separated string with the backend names
1357 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with-signal-module disable/enable signal module
1359 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1360 --with(out)-threads[=DIRECTORY]
1361 disable/enable thread support
1362 --with(out)-thread[=DIRECTORY]
1363 deprecated; use --with(out)-threads
1364 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001365 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001366 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001367 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001368 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001369 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001370 --with-fpectl enable SIGFPE catching
1371 --with-libm=STRING math library
1372 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001373
1374Some influential environment variables:
1375 CC C compiler command
1376 CFLAGS C compiler flags
1377 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1378 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001379 LIBS libraries to pass to the linker, e.g. -l<library>
1380 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1381 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 CPP C preprocessor
1383
1384Use these variables to override the choices made by `configure' or to help
1385it to find libraries and programs with nonstandard names/locations.
1386
Georg Brandl464432d2009-05-20 18:24:08 +00001387Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001388_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001389ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001390fi
1391
1392if test "$ac_init_help" = "recursive"; then
1393 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001394 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001395 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001396 ac_builddir=.
1397
Martin v. Löwiseba40652007-08-30 20:10:57 +00001398case "$ac_dir" in
1399.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1400*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001401 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001402 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001403 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001404 case $ac_top_builddir_sub in
1405 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1406 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1407 esac ;;
1408esac
1409ac_abs_top_builddir=$ac_pwd
1410ac_abs_builddir=$ac_pwd$ac_dir_suffix
1411# for backward compatibility:
1412ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001413
1414case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001415 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001417 ac_top_srcdir=$ac_top_builddir_sub
1418 ac_abs_top_srcdir=$ac_pwd ;;
1419 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001420 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001421 ac_top_srcdir=$srcdir
1422 ac_abs_top_srcdir=$srcdir ;;
1423 *) # Relative name.
1424 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1425 ac_top_srcdir=$ac_top_build_prefix$srcdir
1426 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001427esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001428ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001429
Martin v. Löwiseba40652007-08-30 20:10:57 +00001430 cd "$ac_dir" || { ac_status=$?; continue; }
1431 # Check for guested configure.
1432 if test -f "$ac_srcdir/configure.gnu"; then
1433 echo &&
1434 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1435 elif test -f "$ac_srcdir/configure"; then
1436 echo &&
1437 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001439 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001440 fi || ac_status=$?
1441 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001442 done
1443fi
1444
Martin v. Löwiseba40652007-08-30 20:10:57 +00001445test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001446if $ac_init_version; then
1447 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001448python configure 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001449generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001450
Martin v. Löwiseba40652007-08-30 20:10:57 +00001451Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014522002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001453This configure script is free software; the Free Software Foundation
1454gives unlimited permission to copy, distribute and modify it.
1455_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001456 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001458cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001459This file contains any messages produced by compilers while
1460running configure, to aid debugging if configure makes a mistake.
1461
Martin v. Löwis174440b2008-10-03 08:59:41 +00001462It was created by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001463generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001464
1465 $ $0 $@
1466
1467_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001468exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001469{
1470cat <<_ASUNAME
1471## --------- ##
1472## Platform. ##
1473## --------- ##
1474
1475hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1476uname -m = `(uname -m) 2>/dev/null || echo unknown`
1477uname -r = `(uname -r) 2>/dev/null || echo unknown`
1478uname -s = `(uname -s) 2>/dev/null || echo unknown`
1479uname -v = `(uname -v) 2>/dev/null || echo unknown`
1480
1481/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1482/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1483
1484/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1485/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1486/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001487/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001488/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1489/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1490/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1491
1492_ASUNAME
1493
1494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1495for as_dir in $PATH
1496do
1497 IFS=$as_save_IFS
1498 test -z "$as_dir" && as_dir=.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001499 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001500done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001501IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001502
1503} >&5
1504
1505cat >&5 <<_ACEOF
1506
1507
1508## ----------- ##
1509## Core tests. ##
1510## ----------- ##
1511
1512_ACEOF
1513
1514
1515# Keep a trace of the command line.
1516# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001517# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001518# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001519# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001520ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001521ac_configure_args0=
1522ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001523ac_must_keep_next=false
1524for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001525do
Skip Montanaro6dead952003-09-25 14:50:04 +00001526 for ac_arg
1527 do
1528 case $ac_arg in
1529 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1530 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1531 | -silent | --silent | --silen | --sile | --sil)
1532 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001533 *\'*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001534 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001535 esac
1536 case $ac_pass in
1537 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1538 2)
1539 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1540 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001541 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001542 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001543 case $ac_arg in
1544 *=* | --config-cache | -C | -disable-* | --disable-* \
1545 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1546 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1547 | -with-* | --with-* | -without-* | --without-* | --x)
1548 case "$ac_configure_args0 " in
1549 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1550 esac
1551 ;;
1552 -* ) ac_must_keep_next=true ;;
1553 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001554 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001555 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001556 ;;
1557 esac
1558 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001559done
Skip Montanaro6dead952003-09-25 14:50:04 +00001560$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1561$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 +00001562
1563# When interrupted or exit'd, cleanup temporary files, and complete
1564# config.log. We remove comments because anyway the quotes in there
1565# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001566# WARNING: Use '\'' to represent an apostrophe within the trap.
1567# 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 +00001568trap 'exit_status=$?
1569 # Save into config.log some information that might help in debugging.
1570 {
1571 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001572
Martin v. Löwis11437992002-04-12 09:54:03 +00001573 cat <<\_ASBOX
1574## ---------------- ##
1575## Cache variables. ##
1576## ---------------- ##
1577_ASBOX
1578 echo
1579 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001580(
1581 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1582 eval ac_val=\$$ac_var
1583 case $ac_val in #(
1584 *${as_nl}*)
1585 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001586 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1587echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001588 esac
1589 case $ac_var in #(
1590 _ | IFS | as_nl) ;; #(
1591 *) $as_unset $ac_var ;;
1592 esac ;;
1593 esac
1594 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001595 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001596 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1597 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001599 "s/'\''/'\''\\\\'\'''\''/g;
1600 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1601 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001602 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001603 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001604 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001605 esac |
1606 sort
1607)
Martin v. Löwis11437992002-04-12 09:54:03 +00001608 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001609
1610 cat <<\_ASBOX
1611## ----------------- ##
1612## Output variables. ##
1613## ----------------- ##
1614_ASBOX
1615 echo
1616 for ac_var in $ac_subst_vars
1617 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001618 eval ac_val=\$$ac_var
1619 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001620 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001621 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001622 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001623 done | sort
1624 echo
1625
1626 if test -n "$ac_subst_files"; then
1627 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001628## ------------------- ##
1629## File substitutions. ##
1630## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001631_ASBOX
1632 echo
1633 for ac_var in $ac_subst_files
1634 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001635 eval ac_val=\$$ac_var
1636 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001637 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001638 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001639 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001640 done | sort
1641 echo
1642 fi
1643
Martin v. Löwis11437992002-04-12 09:54:03 +00001644 if test -s confdefs.h; then
1645 cat <<\_ASBOX
1646## ----------- ##
1647## confdefs.h. ##
1648## ----------- ##
1649_ASBOX
1650 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001651 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001652 echo
1653 fi
1654 test "$ac_signal" != 0 &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001655 echo "$as_me: caught signal $ac_signal"
1656 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001657 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001658 rm -f core *.core core.conftest.* &&
1659 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001660 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001661' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001662for ac_signal in 1 2 13 15; do
1663 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1664done
1665ac_signal=0
1666
1667# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001668rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001669
1670# Predefined preprocessor variables.
1671
1672cat >>confdefs.h <<_ACEOF
1673#define PACKAGE_NAME "$PACKAGE_NAME"
1674_ACEOF
1675
1676
1677cat >>confdefs.h <<_ACEOF
1678#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1679_ACEOF
1680
1681
1682cat >>confdefs.h <<_ACEOF
1683#define PACKAGE_VERSION "$PACKAGE_VERSION"
1684_ACEOF
1685
1686
1687cat >>confdefs.h <<_ACEOF
1688#define PACKAGE_STRING "$PACKAGE_STRING"
1689_ACEOF
1690
1691
1692cat >>confdefs.h <<_ACEOF
1693#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1694_ACEOF
1695
1696
1697# Let the site file select an alternate cache file if it wants to.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001698# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001699if test -n "$CONFIG_SITE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001700 set x "$CONFIG_SITE"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001701elif test "x$prefix" != xNONE; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001702 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001703else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001704 set x "$ac_default_prefix/share/config.site" \
1705 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001707shift
1708for ac_site_file
Martin v. Löwiseba40652007-08-30 20:10:57 +00001709do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001710 if test -r "$ac_site_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001711 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1712echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001713 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001714 . "$ac_site_file"
1715 fi
1716done
1717
1718if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001719 # Some versions of bash will fail to source /dev/null (special
1720 # files actually), so we avoid doing that.
1721 if test -f "$cache_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001722 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1723echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001724 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001725 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1726 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001727 esac
1728 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001729else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001730 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1731echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001732 >$cache_file
1733fi
1734
1735# Check that the precious variables saved in the cache have kept the same
1736# value.
1737ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001738for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001739 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1740 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001741 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1742 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001743 case $ac_old_set,$ac_new_set in
1744 set,)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001745 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1746echo "$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 +00001747 ac_cache_corrupted=: ;;
1748 ,set)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001749 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1750echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001751 ac_cache_corrupted=: ;;
1752 ,);;
1753 *)
1754 if test "x$ac_old_val" != "x$ac_new_val"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001755 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1756echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1757 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1758echo "$as_me: former value: $ac_old_val" >&2;}
1759 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1760echo "$as_me: current value: $ac_new_val" >&2;}
1761 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001762 fi;;
1763 esac
1764 # Pass precious variables to config.status.
1765 if test "$ac_new_set" = set; then
1766 case $ac_new_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001767 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001768 *) ac_arg=$ac_var=$ac_new_val ;;
1769 esac
1770 case " $ac_configure_args " in
1771 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1772 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1773 esac
1774 fi
1775done
1776if $ac_cache_corrupted; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001777 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1778echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1779 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1780echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001781 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001782fi
1783
Martin v. Löwiseba40652007-08-30 20:10:57 +00001784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
Guido van Rossum7f43da71994-08-01 12:15:30 +00001808ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001809ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001810ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1811ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1812ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001813
Guido van Rossum627b2d71993-12-24 10:39:16 +00001814
Michael W. Hudson54241132001-12-07 15:38:26 +00001815
Martin v. Löwiseba40652007-08-30 20:10:57 +00001816ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001817
1818
Martin v. Löwis11437992002-04-12 09:54:03 +00001819
Georg Brandlbcd64a32009-03-31 21:45:18 +00001820if test "$prefix" != "/"; then
1821 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1822fi
1823
1824
Martin v. Löwis11437992002-04-12 09:54:03 +00001825
1826
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001827
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001828
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001829# We don't use PACKAGE_ variables, and they cause conflicts
1830# with other autoconf-based packages that include Python.h
1831grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1832rm confdefs.h
1833mv confdefs.h.new confdefs.h
1834
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001835
Martin v. Löwis174440b2008-10-03 08:59:41 +00001836VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001837
Martin v. Löwis1142de32002-03-29 16:28:31 +00001838
1839SOVERSION=1.0
1840
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001841# The later defininition of _XOPEN_SOURCE disables certain features
1842# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1843
1844cat >>confdefs.h <<\_ACEOF
1845#define _GNU_SOURCE 1
1846_ACEOF
1847
1848
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001849# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1850# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1851# them.
1852
1853cat >>confdefs.h <<\_ACEOF
1854#define _NETBSD_SOURCE 1
1855_ACEOF
1856
1857
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001858# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1859# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1860# them.
1861
1862cat >>confdefs.h <<\_ACEOF
1863#define __BSD_VISIBLE 1
1864_ACEOF
1865
1866
Martin v. Löwisd6320502004-08-12 13:45:08 +00001867# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1868# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1869
1870cat >>confdefs.h <<\_ACEOF
1871#define _BSD_TYPES 1
1872_ACEOF
1873
1874
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001875# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1876# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1877# them.
1878
1879cat >>confdefs.h <<\_ACEOF
1880#define _DARWIN_C_SOURCE 1
1881_ACEOF
1882
1883
1884
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001885define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001886
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001887# Arguments passed to configure.
1888
1889CONFIG_ARGS="$ac_configure_args"
1890
Martin v. Löwiseba40652007-08-30 20:10:57 +00001891# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001892if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001893 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001894 case $enableval in
1895 yes)
1896 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1897 ;;
1898 esac
1899 case $enableval in
1900 no)
1901 UNIVERSALSDK=
1902 enable_universalsdk=
1903 ;;
1904 *)
1905 UNIVERSALSDK=$enableval
1906 ;;
1907 esac
1908
1909else
1910
1911 UNIVERSALSDK=
1912 enable_universalsdk=
1913
Martin v. Löwiseba40652007-08-30 20:10:57 +00001914fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001915
1916
Martin v. Löwiseba40652007-08-30 20:10:57 +00001917
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001918
1919
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001920UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00001921
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001922{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1923echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001924
1925# Check whether --with-universal-archs was given.
1926if test "${with_universal_archs+set}" = set; then
1927 withval=$with_universal_archs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001928 { echo "$as_me:$LINENO: result: $withval" >&5
1929echo "${ECHO_T}$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001930 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001931 if test "${enable_universalsdk}" ; then
1932 :
1933 else
1934 { { echo "$as_me:$LINENO: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&5
1935echo "$as_me: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&2;}
1936 { (exit 1); exit 1; }; }
1937 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001938
1939else
1940
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001941 { echo "$as_me:$LINENO: result: 32-bit" >&5
1942echo "${ECHO_T}32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001943
1944fi
1945
1946
1947
1948
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001949
1950# Check whether --with-framework-name was given.
1951if test "${with_framework_name+set}" = set; then
1952 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001953 if test "${enable_framework}"; then
1954 :
1955 else
1956 { { echo "$as_me:$LINENO: error: --with-framework-name without --enable-framework. See Mac/README" >&5
1957echo "$as_me: error: --with-framework-name without --enable-framework. See Mac/README" >&2;}
1958 { (exit 1); exit 1; }; }
1959 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001960 PYTHONFRAMEWORK=${withval}
1961 PYTHONFRAMEWORKDIR=${withval}.framework
1962 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1963
1964else
1965
1966 PYTHONFRAMEWORK=Python
1967 PYTHONFRAMEWORKDIR=Python.framework
1968 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1969
1970fi
1971
Martin v. Löwiseba40652007-08-30 20:10:57 +00001972# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001973if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001974 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001975 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001976 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001977 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001978 esac
1979 case $enableval in
1980 no)
1981 PYTHONFRAMEWORK=
1982 PYTHONFRAMEWORKDIR=no-framework
1983 PYTHONFRAMEWORKPREFIX=
1984 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001985 FRAMEWORKINSTALLFIRST=
1986 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001987 FRAMEWORKALTINSTALLFIRST=
1988 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001989 if test "x${prefix}" = "xNONE"; then
1990 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1991 else
1992 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1993 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001994 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001995 ;;
1996 *)
1997 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001998 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001999 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002000 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002001 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2002 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002003
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002004 if test "x${prefix}" = "xNONE" ; then
2005 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2006 else
2007 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2008 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002009 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002010
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002011 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002012 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002013 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002014
Martin v. Löwiseba40652007-08-30 20:10:57 +00002015 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002016
Martin v. Löwiseba40652007-08-30 20:10:57 +00002017 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002018
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002019 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2020
2021 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2022
Jack Jansene578a632001-08-15 01:27:14 +00002023 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002024
Guido van Rossum563e7081996-09-10 18:20:48 +00002025else
Martin v. Löwis11437992002-04-12 09:54:03 +00002026
Jack Jansene578a632001-08-15 01:27:14 +00002027 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002028 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002029 PYTHONFRAMEWORKPREFIX=
2030 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002031 FRAMEWORKINSTALLFIRST=
2032 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002033 FRAMEWORKALTINSTALLFIRST=
2034 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002035 if test "x${prefix}" = "xNONE" ; then
2036 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2037 else
2038 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2039 fi
Jack Jansene578a632001-08-15 01:27:14 +00002040 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002041
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002042
Martin v. Löwiseba40652007-08-30 20:10:57 +00002043fi
2044
Michael W. Hudson54241132001-12-07 15:38:26 +00002045
2046
2047
2048
Jack Jansene578a632001-08-15 01:27:14 +00002049
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002050
2051
Ronald Oussoren5b787322006-06-06 19:50:24 +00002052
2053
2054
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002055
Jack Jansene578a632001-08-15 01:27:14 +00002056##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002057## AC_HELP_STRING(--with-dyld,
2058## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002059##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002060# Set name for machine-dependent library files
2061
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002062{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2063echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002064if test -z "$MACHDEP"
2065then
Guido van Rossum563e7081996-09-10 18:20:48 +00002066 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002067 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002068 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002069 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002070 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002071 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002072 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002073 ac_md_system=`echo $ac_sys_system |
2074 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2075 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002076 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002077 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002078
Guido van Rossum07397971997-04-29 21:49:50 +00002079 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002080 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002081 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002082 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002083 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002084 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002085 esac
2086fi
Guido van Rossum91922671997-10-09 20:24:13 +00002087
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002088# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2089# disable features if it is defined, without any means to access these
2090# features as extensions. For these systems, we skip the definition of
2091# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2092# some feature, make sure there is no alternative way to access this
2093# feature. Also, when using wildcards, make sure you have verified the
2094# need for not defining _XOPEN_SOURCE on all systems matching the
2095# wildcard, and that the wildcard does not include future systems
2096# (which may remove their limitations).
2097case $ac_sys_system/$ac_sys_release in
2098 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2099 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002100 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002101 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002102 define_xopen_source=no
2103 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2104 # also defined. This can be overridden by defining _BSD_SOURCE
2105 # As this has a different meaning on Linux, only define it on OpenBSD
2106
2107cat >>confdefs.h <<\_ACEOF
2108#define _BSD_SOURCE 1
2109_ACEOF
2110
2111 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002112 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2113 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2114 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002115 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 +00002116 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002117 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2118 # of union __?sigval. Reported by Stuart Bishop.
2119 SunOS/5.6)
2120 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002121 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2122 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002123 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002124 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002125 define_xopen_source=no;;
2126 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002127 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002128 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002129 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002130 # On FreeBSD 4, the math functions C89 does not cover are never defined
2131 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2132 FreeBSD/4.*)
2133 define_xopen_source=no;;
2134 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2135 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2136 # identifies itself as Darwin/7.*
2137 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2138 # disables platform specific features beyond repair.
2139 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2140 # has no effect, don't bother defining them
2141 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002142 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002143 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2144 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2145 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002146 AIX/4)
2147 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002148 AIX/5)
2149 if test `uname -r` -eq 1; then
2150 define_xopen_source=no
2151 fi
2152 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002153 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2154 # defining NI_NUMERICHOST.
2155 QNX/6.3.2)
2156 define_xopen_source=no
2157 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002158
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002159esac
2160
2161if test $define_xopen_source = yes
2162then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002163 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2164 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002165 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2166 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002167 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002168 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002169
2170cat >>confdefs.h <<\_ACEOF
2171#define _XOPEN_SOURCE 500
2172_ACEOF
2173
2174 ;;
2175 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002176
2177cat >>confdefs.h <<\_ACEOF
2178#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002179_ACEOF
2180
Skip Montanarof0d5f792004-08-15 14:08:23 +00002181 ;;
2182 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002183
2184 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2185 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2186 # several APIs are not declared. Since this is also needed in some
2187 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002188 # except for Solaris 10, where it must not be defined,
2189 # as it implies XPG4.2
2190 case $ac_sys_system/$ac_sys_release in
2191 SunOS/5.10)
2192 ;;
2193 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002194
2195cat >>confdefs.h <<\_ACEOF
2196#define _XOPEN_SOURCE_EXTENDED 1
2197_ACEOF
2198
Martin v. Löwis7dece662005-11-26 11:38:24 +00002199 ;;
2200 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002201
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002202
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002203cat >>confdefs.h <<\_ACEOF
2204#define _POSIX_C_SOURCE 200112L
2205_ACEOF
2206
2207
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002208fi
2209
Guido van Rossum91922671997-10-09 20:24:13 +00002210#
2211# SGI compilers allow the specification of the both the ABI and the
2212# ISA on the command line. Depending on the values of these switches,
2213# different and often incompatable code will be generated.
2214#
2215# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2216# thus supply support for various ABI/ISA combinations. The MACHDEP
2217# variable is also adjusted.
2218#
2219
2220if test ! -z "$SGI_ABI"
2221then
2222 CC="cc $SGI_ABI"
2223 LDFLAGS="$SGI_ABI $LDFLAGS"
2224 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2225fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002226{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2227echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002228
Jack Jansen83f898c2002-12-30 22:23:40 +00002229# And add extra plat-mac for darwin
2230
Jack Jansen7b59b422003-03-17 15:44:10 +00002231
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002232{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2233echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002234if test -z "$EXTRAPLATDIR"
2235then
2236 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002237 darwin)
2238 EXTRAPLATDIR="\$(PLATMACDIRS)"
2239 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2240 ;;
2241 *)
2242 EXTRAPLATDIR=""
2243 EXTRAMACHDEPPATH=""
2244 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002245 esac
2246fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002247{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2248echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002249
Jack Jansen6b08a402004-06-03 12:41:45 +00002250# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2251# it may influence the way we can build extensions, so distutils
2252# needs to check it
2253
Ronald Oussoren988117f2006-04-29 11:31:35 +00002254
Jack Jansen6b08a402004-06-03 12:41:45 +00002255CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002256EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002257
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002258{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2259echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002260ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002261{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2262echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002263
Guido van Rossum627b2d71993-12-24 10:39:16 +00002264# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002265
2266# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2267# for debug/optimization stuff. BASECFLAGS is for flags that are required
2268# just to get things to compile and link. Users are free to override OPT
2269# when running configure or make. The build should not break if they do.
2270# BASECFLAGS should generally not be messed with, however.
2271
2272# XXX shouldn't some/most/all of this code be merged with the stuff later
2273# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002274{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2275echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002276
Martin v. Löwiseba40652007-08-30 20:10:57 +00002277# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002278if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002279 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002280 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002281 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002282 without_gcc=yes;;
2283 yes) CC=gcc
2284 without_gcc=no;;
2285 *) CC=$withval
2286 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002287 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002288else
Martin v. Löwis11437992002-04-12 09:54:03 +00002289
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002290 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002291 AIX*) CC=cc_r
2292 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002293 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002294 case $BE_HOST_CPU in
2295 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002296 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002297 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002298 BASECFLAGS="$BASECFLAGS -export pragma"
2299 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002300 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002301 ;;
2302 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002303 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002304 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002305 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002306 ;;
2307 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002308 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2309echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002310 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002311 ;;
2312 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002313 AR="\$(srcdir)/Modules/ar_beos"
2314 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002315 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002316 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002317 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002318fi
2319
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002320{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2321echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002322
Guido van Rossum8b131c51995-03-09 14:10:13 +00002323# If the user switches compilers, we can't believe the cache
2324if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2325then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002326 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002327(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002328echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002329(it is also a good idea to do 'make clean' before compiling)" >&2;}
2330 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002331fi
2332
Martin v. Löwis11437992002-04-12 09:54:03 +00002333ac_ext=c
2334ac_cpp='$CPP $CPPFLAGS'
2335ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2336ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2337ac_compiler_gnu=$ac_cv_c_compiler_gnu
2338if test -n "$ac_tool_prefix"; then
2339 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2340set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002341{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2342echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002343if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002344 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002345else
2346 if test -n "$CC"; then
2347 ac_cv_prog_CC="$CC" # Let the user override the test.
2348else
Martin v. Löwis11437992002-04-12 09:54:03 +00002349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2350for as_dir in $PATH
2351do
2352 IFS=$as_save_IFS
2353 test -z "$as_dir" && as_dir=.
2354 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002355 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 +00002356 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002357 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002358 break 2
2359 fi
2360done
2361done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002362IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002363
Jack Jansendd19cf82001-12-06 22:36:17 +00002364fi
2365fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002366CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002367if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002368 { echo "$as_me:$LINENO: result: $CC" >&5
2369echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002370else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002371 { echo "$as_me:$LINENO: result: no" >&5
2372echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002373fi
2374
Martin v. Löwiseba40652007-08-30 20:10:57 +00002375
Martin v. Löwis11437992002-04-12 09:54:03 +00002376fi
2377if test -z "$ac_cv_prog_CC"; then
2378 ac_ct_CC=$CC
2379 # Extract the first word of "gcc", so it can be a program name with args.
2380set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002381{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2382echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002383if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002384 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002385else
2386 if test -n "$ac_ct_CC"; then
2387 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2388else
2389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2390for as_dir in $PATH
2391do
2392 IFS=$as_save_IFS
2393 test -z "$as_dir" && as_dir=.
2394 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002395 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 +00002396 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002397 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002398 break 2
2399 fi
2400done
2401done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002402IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002403
2404fi
2405fi
2406ac_ct_CC=$ac_cv_prog_ac_ct_CC
2407if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002408 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2409echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002410else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002411 { echo "$as_me:$LINENO: result: no" >&5
2412echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002413fi
2414
Martin v. Löwiseba40652007-08-30 20:10:57 +00002415 if test "x$ac_ct_CC" = x; then
2416 CC=""
2417 else
2418 case $cross_compiling:$ac_tool_warned in
2419yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002420{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2421whose name does not start with the host triplet. If you think this
2422configuration is useful to you, please write to autoconf@gnu.org." >&5
2423echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2424whose name does not start with the host triplet. If you think this
2425configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002426ac_tool_warned=yes ;;
2427esac
2428 CC=$ac_ct_CC
2429 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002430else
2431 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002432fi
2433
Jack Jansendd19cf82001-12-06 22:36:17 +00002434if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002435 if test -n "$ac_tool_prefix"; then
2436 # 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 +00002437set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002438{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2439echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002440if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002441 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002442else
2443 if test -n "$CC"; then
2444 ac_cv_prog_CC="$CC" # Let the user override the test.
2445else
Martin v. Löwis11437992002-04-12 09:54:03 +00002446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2447for as_dir in $PATH
2448do
2449 IFS=$as_save_IFS
2450 test -z "$as_dir" && as_dir=.
2451 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002452 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 +00002453 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002454 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002455 break 2
2456 fi
2457done
2458done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002459IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002460
2461fi
2462fi
2463CC=$ac_cv_prog_CC
2464if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002465 { echo "$as_me:$LINENO: result: $CC" >&5
2466echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002467else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002468 { echo "$as_me:$LINENO: result: no" >&5
2469echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002470fi
2471
Martin v. Löwiseba40652007-08-30 20:10:57 +00002472
Martin v. Löwis11437992002-04-12 09:54:03 +00002473 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002474fi
2475if test -z "$CC"; then
2476 # Extract the first word of "cc", so it can be a program name with args.
2477set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002478{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2479echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002480if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002481 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002482else
2483 if test -n "$CC"; then
2484 ac_cv_prog_CC="$CC" # Let the user override the test.
2485else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002486 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2488for as_dir in $PATH
2489do
2490 IFS=$as_save_IFS
2491 test -z "$as_dir" && as_dir=.
2492 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002493 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 +00002494 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2495 ac_prog_rejected=yes
2496 continue
2497 fi
2498 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002499 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002500 break 2
2501 fi
2502done
2503done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002504IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002505
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002506if test $ac_prog_rejected = yes; then
2507 # We found a bogon in the path, so make sure we never use it.
2508 set dummy $ac_cv_prog_CC
2509 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002510 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002511 # We chose a different compiler from the bogus one.
2512 # However, it has the same basename, so the bogon will be chosen
2513 # first if we set CC to just the basename; use the full file name.
2514 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002516 fi
2517fi
2518fi
2519fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002520CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002521if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002522 { echo "$as_me:$LINENO: result: $CC" >&5
2523echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002524else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002525 { echo "$as_me:$LINENO: result: no" >&5
2526echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002527fi
2528
Martin v. Löwiseba40652007-08-30 20:10:57 +00002529
Martin v. Löwis11437992002-04-12 09:54:03 +00002530fi
2531if test -z "$CC"; then
2532 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002533 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 do
2535 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2536set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002537{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2538echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002539if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002540 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002541else
2542 if test -n "$CC"; then
2543 ac_cv_prog_CC="$CC" # Let the user override the test.
2544else
Martin v. Löwis11437992002-04-12 09:54:03 +00002545as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2546for as_dir in $PATH
2547do
2548 IFS=$as_save_IFS
2549 test -z "$as_dir" && as_dir=.
2550 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002551 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 +00002552 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002553 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002554 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002555 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002556done
2557done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002558IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002559
2560fi
2561fi
2562CC=$ac_cv_prog_CC
2563if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002564 { echo "$as_me:$LINENO: result: $CC" >&5
2565echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002566else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002567 { echo "$as_me:$LINENO: result: no" >&5
2568echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002569fi
2570
Martin v. Löwiseba40652007-08-30 20:10:57 +00002571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 test -n "$CC" && break
2573 done
2574fi
2575if test -z "$CC"; then
2576 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002577 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002578do
2579 # Extract the first word of "$ac_prog", so it can be a program name with args.
2580set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002581{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2582echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002583if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002584 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002585else
2586 if test -n "$ac_ct_CC"; then
2587 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2588else
2589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2590for as_dir in $PATH
2591do
2592 IFS=$as_save_IFS
2593 test -z "$as_dir" && as_dir=.
2594 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002595 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 +00002596 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002597 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 break 2
2599 fi
2600done
2601done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002602IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002603
Martin v. Löwis11437992002-04-12 09:54:03 +00002604fi
2605fi
2606ac_ct_CC=$ac_cv_prog_ac_ct_CC
2607if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002608 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2609echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002610else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002611 { echo "$as_me:$LINENO: result: no" >&5
2612echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002613fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002614
Martin v. Löwiseba40652007-08-30 20:10:57 +00002615
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 test -n "$ac_ct_CC" && break
2617done
Michael W. Hudson54241132001-12-07 15:38:26 +00002618
Martin v. Löwiseba40652007-08-30 20:10:57 +00002619 if test "x$ac_ct_CC" = x; then
2620 CC=""
2621 else
2622 case $cross_compiling:$ac_tool_warned in
2623yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002624{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2625whose name does not start with the host triplet. If you think this
2626configuration is useful to you, please write to autoconf@gnu.org." >&5
2627echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2628whose name does not start with the host triplet. If you think this
2629configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002630ac_tool_warned=yes ;;
2631esac
2632 CC=$ac_ct_CC
2633 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002634fi
2635
2636fi
2637
2638
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002639test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002640See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002641echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002642See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002643 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002644
2645# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002646echo "$as_me:$LINENO: checking for C compiler version" >&5
2647ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002648{ (ac_try="$ac_compiler --version >&5"
2649case "(($ac_try" in
2650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2651 *) ac_try_echo=$ac_try;;
2652esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002654 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002658{ (ac_try="$ac_compiler -v >&5"
2659case "(($ac_try" in
2660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2661 *) ac_try_echo=$ac_try;;
2662esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002664 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002668{ (ac_try="$ac_compiler -V >&5"
2669case "(($ac_try" in
2670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2671 *) ac_try_echo=$ac_try;;
2672esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002674 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 (exit $ac_status); }
2678
2679cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002680/* confdefs.h. */
2681_ACEOF
2682cat confdefs.h >>conftest.$ac_ext
2683cat >>conftest.$ac_ext <<_ACEOF
2684/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002685
Martin v. Löwis11437992002-04-12 09:54:03 +00002686int
2687main ()
2688{
2689
2690 ;
2691 return 0;
2692}
2693_ACEOF
2694ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002695ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002696# Try to create an executable without -o first, disregard a.out.
2697# It will help us diagnose broken compilers, and finding out an intuition
2698# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002699{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2700echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2701ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2702#
2703# List of possible output files, starting from the most likely.
2704# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2705# only as a last resort. b.out is created by i960 compilers.
2706ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2707#
2708# The IRIX 6 linker writes into existing files which may not be
2709# executable, retaining their permissions. Remove them first so a
2710# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002711ac_rmfiles=
2712for ac_file in $ac_files
2713do
2714 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002715 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002716 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2717 esac
2718done
2719rm -f $ac_rmfiles
2720
2721if { (ac_try="$ac_link_default"
2722case "(($ac_try" in
2723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2724 *) ac_try_echo=$ac_try;;
2725esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002727 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002728 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002730 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002731 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2732# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2733# in a Makefile. We should not override ac_cv_exeext if it was cached,
2734# so that the user can short-circuit this test for compilers unknown to
2735# Autoconf.
2736for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002737do
2738 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002740 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002741 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002742 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002743 # We found the default executable, but exeext='' is most
2744 # certainly right.
2745 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002746 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002747 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2748 then :; else
2749 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2750 fi
2751 # We set ac_cv_exeext here because the later test for it is not
2752 # safe: cross compilers may not add the suffix if given an `-o'
2753 # argument, so we may need to know it at that point already.
2754 # Even if this section looks crufty: it has the advantage of
2755 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002756 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002757 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002758 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002759 esac
2760done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002761test "$ac_cv_exeext" = no && ac_cv_exeext=
2762
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002763else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002764 ac_file=''
2765fi
2766
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002767{ echo "$as_me:$LINENO: result: $ac_file" >&5
2768echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002769if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002771sed 's/^/| /' conftest.$ac_ext >&5
2772
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002773{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002774See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002775echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002776See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002777 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002778fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002779
Martin v. Löwis11437992002-04-12 09:54:03 +00002780ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002781
Martin v. Löwiseba40652007-08-30 20:10:57 +00002782# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002783# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002784{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2785echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002786# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2787# If not cross compiling, check that we can run a simple program.
2788if test "$cross_compiling" != yes; then
2789 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002790 { (case "(($ac_try" in
2791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2792 *) ac_try_echo=$ac_try;;
2793esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002795 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002796 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 (exit $ac_status); }; }; then
2799 cross_compiling=no
2800 else
2801 if test "$cross_compiling" = maybe; then
2802 cross_compiling=yes
2803 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002804 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002805If you meant to cross compile, use \`--host'.
2806See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002807echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002808If you meant to cross compile, use \`--host'.
2809See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002810 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002811 fi
2812 fi
2813fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002814{ echo "$as_me:$LINENO: result: yes" >&5
2815echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002816
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002817rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002818ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002819# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002820# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002821{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2822echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2823{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2824echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002825
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002826{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2827echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002828if { (ac_try="$ac_link"
2829case "(($ac_try" in
2830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2831 *) ac_try_echo=$ac_try;;
2832esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002834 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002835 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002837 (exit $ac_status); }; then
2838 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2839# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2840# work properly (i.e., refer to `conftest.exe'), while it won't with
2841# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002842for ac_file in conftest.exe conftest conftest.*; do
2843 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002844 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002845 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002846 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002847 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002848 * ) break;;
2849 esac
2850done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002851else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002852 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002853See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002854echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002855See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002856 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002857fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002858
Martin v. Löwis11437992002-04-12 09:54:03 +00002859rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002860{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2861echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002862
2863rm -f conftest.$ac_ext
2864EXEEXT=$ac_cv_exeext
2865ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002866{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2867echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002868if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002869 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002870else
Martin v. Löwis11437992002-04-12 09:54:03 +00002871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002872/* confdefs.h. */
2873_ACEOF
2874cat confdefs.h >>conftest.$ac_ext
2875cat >>conftest.$ac_ext <<_ACEOF
2876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002877
Martin v. Löwis11437992002-04-12 09:54:03 +00002878int
2879main ()
2880{
2881
2882 ;
2883 return 0;
2884}
2885_ACEOF
2886rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002887if { (ac_try="$ac_compile"
2888case "(($ac_try" in
2889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2890 *) ac_try_echo=$ac_try;;
2891esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002893 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002894 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002896 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002897 for ac_file in conftest.o conftest.obj conftest.*; do
2898 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002899 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002900 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002901 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2902 break;;
2903 esac
2904done
2905else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002907sed 's/^/| /' conftest.$ac_ext >&5
2908
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002909{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002910See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002911echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002912See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002913 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002914fi
2915
2916rm -f conftest.$ac_cv_objext conftest.$ac_ext
2917fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002918{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2919echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002920OBJEXT=$ac_cv_objext
2921ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002922{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2923echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002924if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002925 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002926else
2927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002928/* confdefs.h. */
2929_ACEOF
2930cat confdefs.h >>conftest.$ac_ext
2931cat >>conftest.$ac_ext <<_ACEOF
2932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002933
Martin v. Löwis11437992002-04-12 09:54:03 +00002934int
2935main ()
2936{
2937#ifndef __GNUC__
2938 choke me
2939#endif
2940
2941 ;
2942 return 0;
2943}
2944_ACEOF
2945rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002946if { (ac_try="$ac_compile"
2947case "(($ac_try" in
2948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2949 *) ac_try_echo=$ac_try;;
2950esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002952 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002954 grep -v '^ *+' conftest.er1 >conftest.err
2955 rm -f conftest.er1
2956 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002958 (exit $ac_status); } && {
2959 test -z "$ac_c_werror_flag" ||
2960 test ! -s conftest.err
2961 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002962 ac_compiler_gnu=yes
2963else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002965sed 's/^/| /' conftest.$ac_ext >&5
2966
Martin v. Löwiseba40652007-08-30 20:10:57 +00002967 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002969
2970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002971ac_cv_c_compiler_gnu=$ac_compiler_gnu
2972
2973fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002974{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2975echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2976GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002977ac_test_CFLAGS=${CFLAGS+set}
2978ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002979{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2980echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002981if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002982 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002983else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002984 ac_save_c_werror_flag=$ac_c_werror_flag
2985 ac_c_werror_flag=yes
2986 ac_cv_prog_cc_g=no
2987 CFLAGS="-g"
2988 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002989/* confdefs.h. */
2990_ACEOF
2991cat confdefs.h >>conftest.$ac_ext
2992cat >>conftest.$ac_ext <<_ACEOF
2993/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002994
Martin v. Löwis11437992002-04-12 09:54:03 +00002995int
2996main ()
2997{
2998
2999 ;
3000 return 0;
3001}
3002_ACEOF
3003rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003004if { (ac_try="$ac_compile"
3005case "(($ac_try" in
3006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3007 *) ac_try_echo=$ac_try;;
3008esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003010 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003012 grep -v '^ *+' conftest.er1 >conftest.err
3013 rm -f conftest.er1
3014 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003016 (exit $ac_status); } && {
3017 test -z "$ac_c_werror_flag" ||
3018 test ! -s conftest.err
3019 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003020 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003021else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003023sed 's/^/| /' conftest.$ac_ext >&5
3024
Martin v. Löwiseba40652007-08-30 20:10:57 +00003025 CFLAGS=""
3026 cat >conftest.$ac_ext <<_ACEOF
3027/* confdefs.h. */
3028_ACEOF
3029cat confdefs.h >>conftest.$ac_ext
3030cat >>conftest.$ac_ext <<_ACEOF
3031/* end confdefs.h. */
3032
3033int
3034main ()
3035{
3036
3037 ;
3038 return 0;
3039}
3040_ACEOF
3041rm -f conftest.$ac_objext
3042if { (ac_try="$ac_compile"
3043case "(($ac_try" in
3044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3045 *) ac_try_echo=$ac_try;;
3046esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003048 (eval "$ac_compile") 2>conftest.er1
3049 ac_status=$?
3050 grep -v '^ *+' conftest.er1 >conftest.err
3051 rm -f conftest.er1
3052 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003054 (exit $ac_status); } && {
3055 test -z "$ac_c_werror_flag" ||
3056 test ! -s conftest.err
3057 } && test -s conftest.$ac_objext; then
3058 :
3059else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003060 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003061sed 's/^/| /' conftest.$ac_ext >&5
3062
3063 ac_c_werror_flag=$ac_save_c_werror_flag
3064 CFLAGS="-g"
3065 cat >conftest.$ac_ext <<_ACEOF
3066/* confdefs.h. */
3067_ACEOF
3068cat confdefs.h >>conftest.$ac_ext
3069cat >>conftest.$ac_ext <<_ACEOF
3070/* end confdefs.h. */
3071
3072int
3073main ()
3074{
3075
3076 ;
3077 return 0;
3078}
3079_ACEOF
3080rm -f conftest.$ac_objext
3081if { (ac_try="$ac_compile"
3082case "(($ac_try" in
3083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3084 *) ac_try_echo=$ac_try;;
3085esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003087 (eval "$ac_compile") 2>conftest.er1
3088 ac_status=$?
3089 grep -v '^ *+' conftest.er1 >conftest.err
3090 rm -f conftest.er1
3091 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003093 (exit $ac_status); } && {
3094 test -z "$ac_c_werror_flag" ||
3095 test ! -s conftest.err
3096 } && test -s conftest.$ac_objext; then
3097 ac_cv_prog_cc_g=yes
3098else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003099 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003100sed 's/^/| /' conftest.$ac_ext >&5
3101
3102
Guido van Rossum627b2d71993-12-24 10:39:16 +00003103fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003104
3105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003106fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003107
3108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3109fi
3110
3111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3112 ac_c_werror_flag=$ac_save_c_werror_flag
3113fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003114{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3115echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003116if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003117 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003118elif test $ac_cv_prog_cc_g = yes; then
3119 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003120 CFLAGS="-g -O2"
3121 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003122 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003123 fi
3124else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003125 if test "$GCC" = yes; then
3126 CFLAGS="-O2"
3127 else
3128 CFLAGS=
3129 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003130fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003131{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3132echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003133if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003134 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003135else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003136 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003137ac_save_CC=$CC
3138cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003139/* confdefs.h. */
3140_ACEOF
3141cat confdefs.h >>conftest.$ac_ext
3142cat >>conftest.$ac_ext <<_ACEOF
3143/* end confdefs.h. */
3144#include <stdarg.h>
3145#include <stdio.h>
3146#include <sys/types.h>
3147#include <sys/stat.h>
3148/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3149struct buf { int x; };
3150FILE * (*rcsopen) (struct buf *, struct stat *, int);
3151static char *e (p, i)
3152 char **p;
3153 int i;
3154{
3155 return p[i];
3156}
3157static char *f (char * (*g) (char **, int), char **p, ...)
3158{
3159 char *s;
3160 va_list v;
3161 va_start (v,p);
3162 s = g (p, va_arg (v,int));
3163 va_end (v);
3164 return s;
3165}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003166
3167/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3168 function prototypes and stuff, but not '\xHH' hex character constants.
3169 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003170 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003171 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3172 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003173 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003174int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3175
Martin v. Löwiseba40652007-08-30 20:10:57 +00003176/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3177 inside strings and character constants. */
3178#define FOO(x) 'x'
3179int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3180
Skip Montanaro6dead952003-09-25 14:50:04 +00003181int test (int i, double x);
3182struct s1 {int (*f) (int a);};
3183struct s2 {int (*f) (double a);};
3184int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3185int argc;
3186char **argv;
3187int
3188main ()
3189{
3190return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3191 ;
3192 return 0;
3193}
3194_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003195for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3196 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003197do
3198 CC="$ac_save_CC $ac_arg"
3199 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003200if { (ac_try="$ac_compile"
3201case "(($ac_try" in
3202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3203 *) ac_try_echo=$ac_try;;
3204esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003206 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003208 grep -v '^ *+' conftest.er1 >conftest.err
3209 rm -f conftest.er1
3210 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003212 (exit $ac_status); } && {
3213 test -z "$ac_c_werror_flag" ||
3214 test ! -s conftest.err
3215 } && test -s conftest.$ac_objext; then
3216 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003217else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003219sed 's/^/| /' conftest.$ac_ext >&5
3220
Martin v. Löwiseba40652007-08-30 20:10:57 +00003221
Skip Montanaro6dead952003-09-25 14:50:04 +00003222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003223
3224rm -f core conftest.err conftest.$ac_objext
3225 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003226done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003227rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003228CC=$ac_save_CC
3229
3230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003231# AC_CACHE_VAL
3232case "x$ac_cv_prog_cc_c89" in
3233 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003234 { echo "$as_me:$LINENO: result: none needed" >&5
3235echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003236 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003237 { echo "$as_me:$LINENO: result: unsupported" >&5
3238echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003239 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003240 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003241 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3242echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003243esac
3244
Skip Montanaro6dead952003-09-25 14:50:04 +00003245
Martin v. Löwis11437992002-04-12 09:54:03 +00003246ac_ext=c
3247ac_cpp='$CPP $CPPFLAGS'
3248ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3249ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3250ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003251
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003252
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003253
3254
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003255{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3256echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003257
Martin v. Löwiseba40652007-08-30 20:10:57 +00003258# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003259if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003260 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003261
3262 case $withval in
3263 no) with_cxx_main=no
3264 MAINCC='$(CC)';;
3265 yes) with_cxx_main=yes
3266 MAINCC='$(CXX)';;
3267 *) with_cxx_main=yes
3268 MAINCC=$withval
3269 if test -z "$CXX"
3270 then
3271 CXX=$withval
3272 fi;;
3273 esac
3274else
3275
3276 with_cxx_main=no
3277 MAINCC='$(CC)'
3278
Martin v. Löwiseba40652007-08-30 20:10:57 +00003279fi
3280
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003281{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3282echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003283
3284preset_cxx="$CXX"
3285if test -z "$CXX"
3286then
3287 case "$CC" in
3288 gcc) # Extract the first word of "g++", so it can be a program name with args.
3289set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003290{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3291echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003292if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003293 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003294else
3295 case $CXX in
3296 [\\/]* | ?:[\\/]*)
3297 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3298 ;;
3299 *)
3300 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3301for as_dir in notfound
3302do
3303 IFS=$as_save_IFS
3304 test -z "$as_dir" && as_dir=.
3305 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003306 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 +00003307 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003308 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003309 break 2
3310 fi
3311done
3312done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003313IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003314
3315 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3316 ;;
3317esac
3318fi
3319CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003320if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003321 { echo "$as_me:$LINENO: result: $CXX" >&5
3322echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003323else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003324 { echo "$as_me:$LINENO: result: no" >&5
3325echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003326fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003327
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003328 ;;
3329 cc) # Extract the first word of "c++", so it can be a program name with args.
3330set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003331{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3332echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003333if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003334 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003335else
3336 case $CXX in
3337 [\\/]* | ?:[\\/]*)
3338 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3339 ;;
3340 *)
3341 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3342for as_dir in notfound
3343do
3344 IFS=$as_save_IFS
3345 test -z "$as_dir" && as_dir=.
3346 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003347 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 +00003348 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003349 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003350 break 2
3351 fi
3352done
3353done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003354IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003355
3356 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3357 ;;
3358esac
3359fi
3360CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003361if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003362 { echo "$as_me:$LINENO: result: $CXX" >&5
3363echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003364else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003365 { echo "$as_me:$LINENO: result: no" >&5
3366echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003368
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003369 ;;
3370 esac
3371 if test "$CXX" = "notfound"
3372 then
3373 CXX=""
3374 fi
3375fi
3376if test -z "$CXX"
3377then
3378 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3379do
3380 # Extract the first word of "$ac_prog", so it can be a program name with args.
3381set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003382{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3383echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003384if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003385 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003386else
3387 if test -n "$CXX"; then
3388 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3389else
3390as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3391for as_dir in $PATH
3392do
3393 IFS=$as_save_IFS
3394 test -z "$as_dir" && as_dir=.
3395 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003396 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 +00003397 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003398 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003399 break 2
3400 fi
3401done
3402done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003403IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003404
3405fi
3406fi
3407CXX=$ac_cv_prog_CXX
3408if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003409 { echo "$as_me:$LINENO: result: $CXX" >&5
3410echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003411else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003412 { echo "$as_me:$LINENO: result: no" >&5
3413echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003414fi
3415
Martin v. Löwiseba40652007-08-30 20:10:57 +00003416
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003417 test -n "$CXX" && break
3418done
3419test -n "$CXX" || CXX="notfound"
3420
3421 if test "$CXX" = "notfound"
3422 then
3423 CXX=""
3424 fi
3425fi
3426if test "$preset_cxx" != "$CXX"
3427then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003428 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003429
3430 By default, distutils will build C++ extension modules with \"$CXX\".
3431 If this is not intended, then set CXX on the configure command line.
3432 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003433echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003434
3435 By default, distutils will build C++ extension modules with \"$CXX\".
3436 If this is not intended, then set CXX on the configure command line.
3437 " >&2;}
3438fi
3439
3440
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003441# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003442
3443ac_ext=c
3444ac_cpp='$CPP $CPPFLAGS'
3445ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3446ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3447ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003448{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3449echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003450# On Suns, sometimes $CPP names a directory.
3451if test -n "$CPP" && test -d "$CPP"; then
3452 CPP=
3453fi
3454if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003455 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003456 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003457else
Martin v. Löwis11437992002-04-12 09:54:03 +00003458 # Double quotes because CPP needs to be expanded
3459 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3460 do
3461 ac_preproc_ok=false
3462for ac_c_preproc_warn_flag in '' yes
3463do
3464 # Use a header file that comes with gcc, so configuring glibc
3465 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003466 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3467 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003468 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003469 # not just through cpp. "Syntax error" is here to catch this case.
3470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003471/* confdefs.h. */
3472_ACEOF
3473cat confdefs.h >>conftest.$ac_ext
3474cat >>conftest.$ac_ext <<_ACEOF
3475/* end confdefs.h. */
3476#ifdef __STDC__
3477# include <limits.h>
3478#else
3479# include <assert.h>
3480#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003481 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003482_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003483if { (ac_try="$ac_cpp conftest.$ac_ext"
3484case "(($ac_try" in
3485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3486 *) ac_try_echo=$ac_try;;
3487esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003489 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003490 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003491 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003492 rm -f conftest.er1
3493 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003495 (exit $ac_status); } >/dev/null && {
3496 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3497 test ! -s conftest.err
3498 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003499 :
3500else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003502sed 's/^/| /' conftest.$ac_ext >&5
3503
Martin v. Löwis11437992002-04-12 09:54:03 +00003504 # Broken: fails on valid input.
3505continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003506fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003507
Martin v. Löwis11437992002-04-12 09:54:03 +00003508rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003509
Martin v. Löwiseba40652007-08-30 20:10:57 +00003510 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003511 # can be detected and how.
3512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003513/* confdefs.h. */
3514_ACEOF
3515cat confdefs.h >>conftest.$ac_ext
3516cat >>conftest.$ac_ext <<_ACEOF
3517/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003518#include <ac_nonexistent.h>
3519_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003520if { (ac_try="$ac_cpp conftest.$ac_ext"
3521case "(($ac_try" in
3522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3523 *) ac_try_echo=$ac_try;;
3524esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003526 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003527 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003528 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 rm -f conftest.er1
3530 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003532 (exit $ac_status); } >/dev/null && {
3533 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3534 test ! -s conftest.err
3535 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003536 # Broken: success on invalid input.
3537continue
3538else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003539 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003540sed 's/^/| /' conftest.$ac_ext >&5
3541
Martin v. Löwis11437992002-04-12 09:54:03 +00003542 # Passes both tests.
3543ac_preproc_ok=:
3544break
3545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003546
Martin v. Löwis11437992002-04-12 09:54:03 +00003547rm -f conftest.err conftest.$ac_ext
3548
3549done
3550# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3551rm -f conftest.err conftest.$ac_ext
3552if $ac_preproc_ok; then
3553 break
3554fi
3555
3556 done
3557 ac_cv_prog_CPP=$CPP
3558
3559fi
3560 CPP=$ac_cv_prog_CPP
3561else
3562 ac_cv_prog_CPP=$CPP
3563fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003564{ echo "$as_me:$LINENO: result: $CPP" >&5
3565echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003566ac_preproc_ok=false
3567for ac_c_preproc_warn_flag in '' yes
3568do
3569 # Use a header file that comes with gcc, so configuring glibc
3570 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003571 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3572 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003573 # On the NeXT, cc -E runs the code through the compiler's parser,
3574 # not just through cpp. "Syntax error" is here to catch this case.
3575 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003576/* confdefs.h. */
3577_ACEOF
3578cat confdefs.h >>conftest.$ac_ext
3579cat >>conftest.$ac_ext <<_ACEOF
3580/* end confdefs.h. */
3581#ifdef __STDC__
3582# include <limits.h>
3583#else
3584# include <assert.h>
3585#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003586 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003587_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003588if { (ac_try="$ac_cpp conftest.$ac_ext"
3589case "(($ac_try" in
3590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3591 *) ac_try_echo=$ac_try;;
3592esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003594 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003595 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003596 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003597 rm -f conftest.er1
3598 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003600 (exit $ac_status); } >/dev/null && {
3601 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3602 test ! -s conftest.err
3603 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003604 :
3605else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003607sed 's/^/| /' conftest.$ac_ext >&5
3608
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 # Broken: fails on valid input.
3610continue
3611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003612
Martin v. Löwis11437992002-04-12 09:54:03 +00003613rm -f conftest.err conftest.$ac_ext
3614
Martin v. Löwiseba40652007-08-30 20:10:57 +00003615 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003616 # can be detected and how.
3617 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003618/* confdefs.h. */
3619_ACEOF
3620cat confdefs.h >>conftest.$ac_ext
3621cat >>conftest.$ac_ext <<_ACEOF
3622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003623#include <ac_nonexistent.h>
3624_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003625if { (ac_try="$ac_cpp conftest.$ac_ext"
3626case "(($ac_try" in
3627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3628 *) ac_try_echo=$ac_try;;
3629esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003631 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003632 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003633 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003634 rm -f conftest.er1
3635 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003637 (exit $ac_status); } >/dev/null && {
3638 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3639 test ! -s conftest.err
3640 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003641 # Broken: success on invalid input.
3642continue
3643else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003645sed 's/^/| /' conftest.$ac_ext >&5
3646
Martin v. Löwis11437992002-04-12 09:54:03 +00003647 # Passes both tests.
3648ac_preproc_ok=:
3649break
3650fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003651
Martin v. Löwis11437992002-04-12 09:54:03 +00003652rm -f conftest.err conftest.$ac_ext
3653
3654done
3655# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3656rm -f conftest.err conftest.$ac_ext
3657if $ac_preproc_ok; then
3658 :
3659else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003660 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003661See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003662echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003663See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003664 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003665fi
3666
3667ac_ext=c
3668ac_cpp='$CPP $CPPFLAGS'
3669ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3670ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3671ac_compiler_gnu=$ac_cv_c_compiler_gnu
3672
3673
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003674{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3675echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003676if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003677 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003678else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003679 # Extract the first word of "grep ggrep" to use in msg output
3680if test -z "$GREP"; then
3681set dummy grep ggrep; ac_prog_name=$2
3682if test "${ac_cv_path_GREP+set}" = set; then
3683 echo $ECHO_N "(cached) $ECHO_C" >&6
3684else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003685 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003686# Loop through the user's path and test for each of PROGNAME-LIST
3687as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003688for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3689do
3690 IFS=$as_save_IFS
3691 test -z "$as_dir" && as_dir=.
3692 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003693 for ac_exec_ext in '' $ac_executable_extensions; do
3694 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3695 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3696 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003697 # Check for GNU $ac_path_GREP
3698case `"$ac_path_GREP" --version 2>&1` in
3699*GNU*)
3700 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3701*)
3702 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003703 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003704 while :
3705 do
3706 cat "conftest.in" "conftest.in" >"conftest.tmp"
3707 mv "conftest.tmp" "conftest.in"
3708 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003709 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003710 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3711 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3712 ac_count=`expr $ac_count + 1`
3713 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3714 # Best one so far, save it but keep looking for a better one
3715 ac_cv_path_GREP="$ac_path_GREP"
3716 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003717 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003718 # 10*(2^10) chars as input seems more than enough
3719 test $ac_count -gt 10 && break
3720 done
3721 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3722esac
3723
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003724
3725 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003726 done
3727done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003728
3729done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003730IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003731
3732
3733fi
3734
3735GREP="$ac_cv_path_GREP"
3736if test -z "$GREP"; then
3737 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3738echo "$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 +00003739 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003740fi
3741
Martin v. Löwiseba40652007-08-30 20:10:57 +00003742else
3743 ac_cv_path_GREP=$GREP
3744fi
3745
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003746
Martin v. Löwiseba40652007-08-30 20:10:57 +00003747fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003748{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3749echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003750 GREP="$ac_cv_path_GREP"
3751
3752
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003753{ echo "$as_me:$LINENO: checking for egrep" >&5
3754echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003755if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003756 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003757else
3758 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3759 then ac_cv_path_EGREP="$GREP -E"
3760 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003761 # Extract the first word of "egrep" to use in msg output
3762if test -z "$EGREP"; then
3763set dummy egrep; ac_prog_name=$2
3764if test "${ac_cv_path_EGREP+set}" = set; then
3765 echo $ECHO_N "(cached) $ECHO_C" >&6
3766else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003767 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003768# Loop through the user's path and test for each of PROGNAME-LIST
3769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003770for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3771do
3772 IFS=$as_save_IFS
3773 test -z "$as_dir" && as_dir=.
3774 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003775 for ac_exec_ext in '' $ac_executable_extensions; do
3776 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3777 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3778 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003779 # Check for GNU $ac_path_EGREP
3780case `"$ac_path_EGREP" --version 2>&1` in
3781*GNU*)
3782 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3783*)
3784 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003785 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003786 while :
3787 do
3788 cat "conftest.in" "conftest.in" >"conftest.tmp"
3789 mv "conftest.tmp" "conftest.in"
3790 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003791 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003792 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3793 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3794 ac_count=`expr $ac_count + 1`
3795 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3796 # Best one so far, save it but keep looking for a better one
3797 ac_cv_path_EGREP="$ac_path_EGREP"
3798 ac_path_EGREP_max=$ac_count
3799 fi
3800 # 10*(2^10) chars as input seems more than enough
3801 test $ac_count -gt 10 && break
3802 done
3803 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3804esac
3805
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003806
3807 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003808 done
3809done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003810
3811done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003812IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003813
3814
3815fi
3816
3817EGREP="$ac_cv_path_EGREP"
3818if test -z "$EGREP"; then
3819 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3820echo "$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 +00003821 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003822fi
3823
Martin v. Löwiseba40652007-08-30 20:10:57 +00003824else
3825 ac_cv_path_EGREP=$EGREP
3826fi
3827
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003828
Martin v. Löwiseba40652007-08-30 20:10:57 +00003829 fi
3830fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003831{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3832echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003833 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003834
3835
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003836
3837{ echo "$as_me:$LINENO: checking for AIX" >&5
3838echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3839cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003840/* confdefs.h. */
3841_ACEOF
3842cat confdefs.h >>conftest.$ac_ext
3843cat >>conftest.$ac_ext <<_ACEOF
3844/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003845#ifdef _AIX
3846 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003847#endif
3848
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003849_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003850if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3851 $EGREP "yes" >/dev/null 2>&1; then
3852 { echo "$as_me:$LINENO: result: yes" >&5
3853echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003854cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003855#define _ALL_SOURCE 1
3856_ACEOF
3857
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003858else
3859 { echo "$as_me:$LINENO: result: no" >&5
3860echo "${ECHO_T}no" >&6; }
3861fi
Benjamin Peterson2c196742009-12-31 03:17:18 +00003862rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003863
3864
3865
3866# Check for unsupported systems
3867case $ac_sys_system/$ac_sys_release in
3868atheos*|Linux*/1*)
3869 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3870 echo See README for details.
3871 exit 1;;
3872esac
3873
3874
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003875{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3876echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003877
3878# Check whether --with-suffix was given.
3879if test "${with_suffix+set}" = set; then
3880 withval=$with_suffix;
3881 case $withval in
3882 no) EXEEXT=;;
3883 yes) EXEEXT=.exe;;
3884 *) EXEEXT=$withval;;
3885 esac
3886fi
3887
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003888{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3889echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003890
3891# Test whether we're running on a non-case-sensitive system, in which
3892# case we give a warning if no ext is given
3893
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003894{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3895echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003896if test ! -d CaseSensitiveTestDir; then
3897mkdir CaseSensitiveTestDir
3898fi
3899
3900if test -d casesensitivetestdir
3901then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003902 { echo "$as_me:$LINENO: result: yes" >&5
3903echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003904 BUILDEXEEXT=.exe
3905else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003906 { echo "$as_me:$LINENO: result: no" >&5
3907echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003908 BUILDEXEEXT=$EXEEXT
3909fi
3910rmdir CaseSensitiveTestDir
3911
3912case $MACHDEP in
3913bsdos*)
3914 case $CC in
3915 gcc) CC="$CC -D_HAVE_BSDI";;
3916 esac;;
3917esac
3918
3919case $ac_sys_system in
3920hp*|HP*)
3921 case $CC in
3922 cc|*/cc) CC="$CC -Ae";;
3923 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003924SunOS*)
3925 # Some functions have a prototype only with that define, e.g. confstr
3926
3927cat >>confdefs.h <<\_ACEOF
3928#define __EXTENSIONS__ 1
3929_ACEOF
3930
3931 ;;
3932esac
3933
3934
3935
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003936{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3937echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003938if test -z "$LIBRARY"
3939then
3940 LIBRARY='libpython$(VERSION).a'
3941fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003942{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3943echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003944
3945# LDLIBRARY is the name of the library to link against (as opposed to the
3946# name of the library into which to insert object files). BLDLIBRARY is also
3947# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3948# is blank as the main program is not linked directly against LDLIBRARY.
3949# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3950# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3951# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3952# DLLLIBRARY is the shared (i.e., DLL) library.
3953#
3954# RUNSHARED is used to run shared python without installed libraries
3955#
3956# INSTSONAME is the name of the shared library that will be use to install
3957# on the system - some systems like version suffix, others don't
3958
3959
3960
3961
3962
3963
3964LDLIBRARY="$LIBRARY"
3965BLDLIBRARY='$(LDLIBRARY)'
3966INSTSONAME='$(LDLIBRARY)'
3967DLLLIBRARY=''
3968LDLIBRARYDIR=''
3969RUNSHARED=''
3970
3971# LINKCC is the command that links the python executable -- default is $(CC).
3972# If CXX is set, and if it is needed to link a main function that was
3973# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3974# python might then depend on the C++ runtime
3975# This is altered for AIX in order to build the export list before
3976# linking.
3977
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003978{ echo "$as_me:$LINENO: checking LINKCC" >&5
3979echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003980if test -z "$LINKCC"
3981then
3982 LINKCC='$(PURIFY) $(MAINCC)'
3983 case $ac_sys_system in
3984 AIX*)
3985 exp_extra="\"\""
3986 if test $ac_sys_release -ge 5 -o \
3987 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3988 exp_extra="."
3989 fi
3990 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003991 QNX*)
3992 # qcc must be used because the other compilers do not
3993 # support -N.
3994 LINKCC=qcc;;
3995 esac
3996fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003997{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3998echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003999
4000# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4001# make sure we default having it set to "no": this is used by
4002# distutils.unixccompiler to know if it should add --enable-new-dtags
4003# to linker command lines, and failing to detect GNU ld simply results
4004# in the same bahaviour as before.
4005
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004006{ echo "$as_me:$LINENO: checking for GNU ld" >&5
4007echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004008ac_prog=ld
4009if test "$GCC" = yes; then
4010 ac_prog=`$CC -print-prog-name=ld`
4011fi
4012case `"$ac_prog" -V 2>&1 < /dev/null` in
4013 *GNU*)
4014 GNULD=yes;;
4015 *)
4016 GNULD=no;;
4017esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004018{ echo "$as_me:$LINENO: result: $GNULD" >&5
4019echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004020
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004021{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4022echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004023# Check whether --enable-shared was given.
4024if test "${enable_shared+set}" = set; then
4025 enableval=$enable_shared;
4026fi
4027
4028
4029if test -z "$enable_shared"
4030then
4031 case $ac_sys_system in
4032 CYGWIN* | atheos*)
4033 enable_shared="yes";;
4034 *)
4035 enable_shared="no";;
4036 esac
4037fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004038{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4039echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004040
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004041{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4042echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004043# Check whether --enable-profiling was given.
4044if test "${enable_profiling+set}" = set; then
4045 enableval=$enable_profiling; ac_save_cc="$CC"
4046 CC="$CC -pg"
4047 if test "$cross_compiling" = yes; then
4048 ac_enable_profiling="no"
4049else
4050 cat >conftest.$ac_ext <<_ACEOF
4051/* confdefs.h. */
4052_ACEOF
4053cat confdefs.h >>conftest.$ac_ext
4054cat >>conftest.$ac_ext <<_ACEOF
4055/* end confdefs.h. */
4056int main() { return 0; }
4057_ACEOF
4058rm -f conftest$ac_exeext
4059if { (ac_try="$ac_link"
4060case "(($ac_try" in
4061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4062 *) ac_try_echo=$ac_try;;
4063esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004065 (eval "$ac_link") 2>&5
4066 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004068 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4069 { (case "(($ac_try" in
4070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4071 *) ac_try_echo=$ac_try;;
4072esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004074 (eval "$ac_try") 2>&5
4075 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004077 (exit $ac_status); }; }; then
4078 ac_enable_profiling="yes"
4079else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004080 echo "$as_me: program exited with status $ac_status" >&5
4081echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004082sed 's/^/| /' conftest.$ac_ext >&5
4083
4084( exit $ac_status )
4085ac_enable_profiling="no"
4086fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004087rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4088fi
4089
4090
4091 CC="$ac_save_cc"
4092fi
4093
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004094{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4095echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004096
4097case "$ac_enable_profiling" in
4098 "yes")
4099 BASECFLAGS="-pg $BASECFLAGS"
4100 LDFLAGS="-pg $LDFLAGS"
4101 ;;
4102esac
4103
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004104{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4105echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004106
4107# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4108# library that we build, but we do not want to link against it (we
4109# will find it with a -framework option). For this reason there is an
4110# extra variable BLDLIBRARY against which Python and the extension
4111# modules are linked, BLDLIBRARY. This is normally the same as
4112# LDLIBRARY, but empty for MacOSX framework builds.
4113if test "$enable_framework"
4114then
4115 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4116 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4117 BLDLIBRARY=''
4118else
4119 BLDLIBRARY='$(LDLIBRARY)'
4120fi
4121
4122# Other platforms follow
4123if test $enable_shared = "yes"; then
4124
4125cat >>confdefs.h <<\_ACEOF
4126#define Py_ENABLE_SHARED 1
4127_ACEOF
4128
4129 case $ac_sys_system in
4130 BeOS*)
4131 LDLIBRARY='libpython$(VERSION).so'
4132 ;;
4133 CYGWIN*)
4134 LDLIBRARY='libpython$(VERSION).dll.a'
4135 DLLLIBRARY='libpython$(VERSION).dll'
4136 ;;
4137 SunOS*)
4138 LDLIBRARY='libpython$(VERSION).so'
4139 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4140 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4141 INSTSONAME="$LDLIBRARY".$SOVERSION
4142 ;;
4143 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4144 LDLIBRARY='libpython$(VERSION).so'
4145 BLDLIBRARY='-L. -lpython$(VERSION)'
4146 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4147 case $ac_sys_system in
4148 FreeBSD*)
4149 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4150 ;;
4151 esac
4152 INSTSONAME="$LDLIBRARY".$SOVERSION
4153 ;;
4154 hp*|HP*)
4155 case `uname -m` in
4156 ia64)
4157 LDLIBRARY='libpython$(VERSION).so'
4158 ;;
4159 *)
4160 LDLIBRARY='libpython$(VERSION).sl'
4161 ;;
4162 esac
4163 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4164 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4165 ;;
4166 OSF*)
4167 LDLIBRARY='libpython$(VERSION).so'
4168 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4169 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4170 ;;
4171 atheos*)
4172 LDLIBRARY='libpython$(VERSION).so'
4173 BLDLIBRARY='-L. -lpython$(VERSION)'
4174 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4175 ;;
4176 Darwin*)
4177 LDLIBRARY='libpython$(VERSION).dylib'
4178 BLDLIBRARY='-L. -lpython$(VERSION)'
4179 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4180 ;;
4181
4182 esac
4183else # shared is disabled
4184 case $ac_sys_system in
4185 CYGWIN*)
4186 BLDLIBRARY='$(LIBRARY)'
4187 LDLIBRARY='libpython$(VERSION).dll.a'
4188 ;;
4189 esac
4190fi
4191
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004192{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4193echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004194
4195if test -n "$ac_tool_prefix"; then
4196 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4197set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004198{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4199echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004200if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004201 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004202else
4203 if test -n "$RANLIB"; then
4204 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4205else
4206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4207for as_dir in $PATH
4208do
4209 IFS=$as_save_IFS
4210 test -z "$as_dir" && as_dir=.
4211 for ac_exec_ext in '' $ac_executable_extensions; do
4212 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4213 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004214 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004215 break 2
4216 fi
4217done
4218done
4219IFS=$as_save_IFS
4220
4221fi
4222fi
4223RANLIB=$ac_cv_prog_RANLIB
4224if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004225 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4226echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004227else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004228 { echo "$as_me:$LINENO: result: no" >&5
4229echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004230fi
4231
4232
4233fi
4234if test -z "$ac_cv_prog_RANLIB"; then
4235 ac_ct_RANLIB=$RANLIB
4236 # Extract the first word of "ranlib", so it can be a program name with args.
4237set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004238{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4239echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004240if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004241 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004242else
4243 if test -n "$ac_ct_RANLIB"; then
4244 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4245else
4246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4247for as_dir in $PATH
4248do
4249 IFS=$as_save_IFS
4250 test -z "$as_dir" && as_dir=.
4251 for ac_exec_ext in '' $ac_executable_extensions; do
4252 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4253 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004254 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004255 break 2
4256 fi
4257done
4258done
4259IFS=$as_save_IFS
4260
4261fi
4262fi
4263ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4264if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004265 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4266echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004267else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004268 { echo "$as_me:$LINENO: result: no" >&5
4269echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004270fi
4271
4272 if test "x$ac_ct_RANLIB" = x; then
4273 RANLIB=":"
4274 else
4275 case $cross_compiling:$ac_tool_warned in
4276yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004277{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4278whose name does not start with the host triplet. If you think this
4279configuration is useful to you, please write to autoconf@gnu.org." >&5
4280echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4281whose name does not start with the host triplet. If you think this
4282configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004283ac_tool_warned=yes ;;
4284esac
4285 RANLIB=$ac_ct_RANLIB
4286 fi
4287else
4288 RANLIB="$ac_cv_prog_RANLIB"
4289fi
4290
4291
4292for ac_prog in ar aal
4293do
4294 # Extract the first word of "$ac_prog", so it can be a program name with args.
4295set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004296{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4297echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004298if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004299 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004300else
4301 if test -n "$AR"; then
4302 ac_cv_prog_AR="$AR" # Let the user override the test.
4303else
4304as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4305for as_dir in $PATH
4306do
4307 IFS=$as_save_IFS
4308 test -z "$as_dir" && as_dir=.
4309 for ac_exec_ext in '' $ac_executable_extensions; do
4310 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4311 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004312 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004313 break 2
4314 fi
4315done
4316done
4317IFS=$as_save_IFS
4318
4319fi
4320fi
4321AR=$ac_cv_prog_AR
4322if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004323 { echo "$as_me:$LINENO: result: $AR" >&5
4324echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004325else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004326 { echo "$as_me:$LINENO: result: no" >&5
4327echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004328fi
4329
4330
4331 test -n "$AR" && break
4332done
4333test -n "$AR" || AR="ar"
4334
4335
4336# tweak ARFLAGS only if the user didn't set it on the command line
4337
4338if test -z "$ARFLAGS"
4339then
4340 ARFLAGS="rc"
4341fi
4342
4343
4344# Extract the first word of "svnversion", so it can be a program name with args.
4345set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004346{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4347echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004348if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004349 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004350else
4351 if test -n "$SVNVERSION"; then
4352 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4353else
4354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4355for as_dir in $PATH
4356do
4357 IFS=$as_save_IFS
4358 test -z "$as_dir" && as_dir=.
4359 for ac_exec_ext in '' $ac_executable_extensions; do
4360 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4361 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004362 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004363 break 2
4364 fi
4365done
4366done
4367IFS=$as_save_IFS
4368
4369 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4370fi
4371fi
4372SVNVERSION=$ac_cv_prog_SVNVERSION
4373if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004374 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4375echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004376else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004377 { echo "$as_me:$LINENO: result: no" >&5
4378echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004379fi
4380
4381
4382if test $SVNVERSION = found
4383then
4384 SVNVERSION="svnversion \$(srcdir)"
4385else
4386 SVNVERSION="echo Unversioned directory"
4387fi
4388
4389case $MACHDEP in
4390bsdos*|hp*|HP*)
4391 # install -d does not work on BSDI or HP-UX
4392 if test -z "$INSTALL"
4393 then
4394 INSTALL="${srcdir}/install-sh -c"
4395 fi
4396esac
4397ac_aux_dir=
4398for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4399 if test -f "$ac_dir/install-sh"; then
4400 ac_aux_dir=$ac_dir
4401 ac_install_sh="$ac_aux_dir/install-sh -c"
4402 break
4403 elif test -f "$ac_dir/install.sh"; then
4404 ac_aux_dir=$ac_dir
4405 ac_install_sh="$ac_aux_dir/install.sh -c"
4406 break
4407 elif test -f "$ac_dir/shtool"; then
4408 ac_aux_dir=$ac_dir
4409 ac_install_sh="$ac_aux_dir/shtool install -c"
4410 break
4411 fi
4412done
4413if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004414 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4415echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004416 { (exit 1); exit 1; }; }
4417fi
4418
4419# These three variables are undocumented and unsupported,
4420# and are intended to be withdrawn in a future Autoconf release.
4421# They can cause serious problems if a builder's source tree is in a directory
4422# whose full name contains unusual characters.
4423ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4424ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4425ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4426
4427
4428# Find a good install program. We prefer a C program (faster),
4429# so one script is as good as another. But avoid the broken or
4430# incompatible versions:
4431# SysV /etc/install, /usr/sbin/install
4432# SunOS /usr/etc/install
4433# IRIX /sbin/install
4434# AIX /bin/install
4435# AmigaOS /C/install, which installs bootblocks on floppy discs
4436# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4437# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4438# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4439# OS/2's system install, which has a completely different semantic
4440# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004441{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4442echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004443if test -z "$INSTALL"; then
4444if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004445 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004446else
4447 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4448for as_dir in $PATH
4449do
4450 IFS=$as_save_IFS
4451 test -z "$as_dir" && as_dir=.
4452 # Account for people who put trailing slashes in PATH elements.
4453case $as_dir/ in
4454 ./ | .// | /cC/* | \
4455 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4456 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4457 /usr/ucb/* ) ;;
4458 *)
4459 # OSF1 and SCO ODT 3.0 have their own names for install.
4460 # Don't use installbsd from OSF since it installs stuff as root
4461 # by default.
4462 for ac_prog in ginstall scoinst install; do
4463 for ac_exec_ext in '' $ac_executable_extensions; do
4464 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4465 if test $ac_prog = install &&
4466 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4467 # AIX install. It has an incompatible calling convention.
4468 :
4469 elif test $ac_prog = install &&
4470 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4471 # program-specific install script used by HP pwplus--don't use.
4472 :
4473 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004474 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4475 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004476 fi
4477 fi
4478 done
4479 done
4480 ;;
4481esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004482done
4483IFS=$as_save_IFS
4484
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004485
4486fi
4487 if test "${ac_cv_path_install+set}" = set; then
4488 INSTALL=$ac_cv_path_install
4489 else
4490 # As a last resort, use the slow shell script. Don't cache a
4491 # value for INSTALL within a source directory, because that will
4492 # break other packages using the cache if that directory is
4493 # removed, or if the value is a relative name.
4494 INSTALL=$ac_install_sh
4495 fi
4496fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004497{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4498echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004499
4500# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4501# It thinks the first close brace ends the variable substitution.
4502test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4503
4504test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4505
4506test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4507
4508
4509# Not every filesystem supports hard links
4510
4511if test -z "$LN" ; then
4512 case $ac_sys_system in
4513 BeOS*) LN="ln -s";;
4514 CYGWIN*) LN="ln -s";;
4515 atheos*) LN="ln -s";;
4516 *) LN=ln;;
4517 esac
4518fi
4519
4520# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004521{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4522echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004523
4524# Check whether --with-pydebug was given.
4525if test "${with_pydebug+set}" = set; then
4526 withval=$with_pydebug;
4527if test "$withval" != no
4528then
4529
4530cat >>confdefs.h <<\_ACEOF
4531#define Py_DEBUG 1
4532_ACEOF
4533
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004534 { echo "$as_me:$LINENO: result: yes" >&5
4535echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004536 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004537else { echo "$as_me:$LINENO: result: no" >&5
4538echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004539fi
4540else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004541 { echo "$as_me:$LINENO: result: no" >&5
4542echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004543fi
4544
4545
4546# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4547# merged with this chunk of code?
4548
4549# Optimizer/debugger flags
4550# ------------------------
4551# (The following bit of code is complicated enough - please keep things
4552# indented properly. Just pretend you're editing Python code. ;-)
4553
4554# There are two parallel sets of case statements below, one that checks to
4555# see if OPT was set and one that does BASECFLAGS setting based upon
4556# compiler and platform. BASECFLAGS tweaks need to be made even if the
4557# user set OPT.
4558
4559# tweak OPT based on compiler and platform, only if the user didn't set
4560# it on the command line
4561
4562if test -z "$OPT"
4563then
4564 case $GCC in
4565 yes)
4566 if test "$CC" != 'g++' ; then
4567 STRICT_PROTO="-Wstrict-prototypes"
4568 fi
4569 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4570 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4571 WRAP="-fwrapv"
4572 fi
4573 case $ac_cv_prog_cc_g in
4574 yes)
4575 if test "$Py_DEBUG" = 'true' ; then
4576 # Optimization messes up debuggers, so turn it off for
4577 # debug builds.
4578 OPT="-g -Wall $STRICT_PROTO"
4579 else
4580 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4581 fi
4582 ;;
4583 *)
4584 OPT="-O3 -Wall $STRICT_PROTO"
4585 ;;
4586 esac
4587 case $ac_sys_system in
4588 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4589 ;;
4590 esac
4591 ;;
4592
4593 *)
4594 OPT="-O"
4595 ;;
4596 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004597fi
4598
4599
4600
4601# The -arch flags for universal builds on OSX
4602UNIVERSAL_ARCH_FLAGS=
4603
4604
4605# tweak BASECFLAGS based on compiler and platform
4606case $GCC in
4607yes)
4608 # Python violates C99 rules, by casting between incompatible
4609 # pointer types. GCC may generate bad code as a result of that,
4610 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004611 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4612echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004613 ac_save_cc="$CC"
4614 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004615 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4616 echo $ECHO_N "(cached) $ECHO_C" >&6
4617else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004618 cat >conftest.$ac_ext <<_ACEOF
4619/* confdefs.h. */
4620_ACEOF
4621cat confdefs.h >>conftest.$ac_ext
4622cat >>conftest.$ac_ext <<_ACEOF
4623/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004624
4625int
4626main ()
4627{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004628int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004629 ;
4630 return 0;
4631}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004632_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004633rm -f conftest.$ac_objext
4634if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004635case "(($ac_try" in
4636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4637 *) ac_try_echo=$ac_try;;
4638esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004640 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004641 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004642 grep -v '^ *+' conftest.er1 >conftest.err
4643 rm -f conftest.er1
4644 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004646 (exit $ac_status); } && {
4647 test -z "$ac_c_werror_flag" ||
4648 test ! -s conftest.err
4649 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004650 ac_cv_no_strict_aliasing_ok=yes
4651else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004652 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004653sed 's/^/| /' conftest.$ac_ext >&5
4654
Gregory P. Smith373469a2009-11-01 21:03:38 +00004655 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004656fi
4657
Gregory P. Smith373469a2009-11-01 21:03:38 +00004658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004659fi
4660
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004661 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004662 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4663echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004664 if test $ac_cv_no_strict_aliasing_ok = yes
4665 then
4666 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4667 fi
4668
4669 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4670 # support. Without this, treatment of subnormals doesn't follow
4671 # the standard.
4672 case $ac_sys_machine in
4673 alpha*)
4674 BASECFLAGS="$BASECFLAGS -mieee"
4675 ;;
4676 esac
4677
4678 case $ac_sys_system in
4679 SCO_SV*)
4680 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4681 ;;
4682 # is there any other compiler on Darwin besides gcc?
4683 Darwin*)
4684 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4685 # used to be here, but non-Apple gcc doesn't accept them.
4686
4687
4688 if test "${enable_universalsdk}"; then
4689 UNIVERSAL_ARCH_FLAGS=""
4690 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4691 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4692 ARCH_RUN_32BIT=""
Ronald Oussoren92919a62009-12-24 13:30:58 +00004693 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004694
4695 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4696 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren92919a62009-12-24 13:30:58 +00004697 LIPO_32BIT_FLAGS=""
Ronald Oussoren25967582009-09-06 10:00:26 +00004698 ARCH_RUN_32BIT="true"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004699
4700 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4701 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren92919a62009-12-24 13:30:58 +00004702 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004703 ARCH_RUN_32BIT="arch -i386 -ppc"
4704
Ronald Oussoren23d92532009-09-07 06:12:00 +00004705 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4706 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren92919a62009-12-24 13:30:58 +00004707 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren23d92532009-09-07 06:12:00 +00004708 ARCH_RUN_32BIT="arch -i386"
4709
4710 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4711 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren92919a62009-12-24 13:30:58 +00004712 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
4713 ARCH_RUN_32BIT="arch -i386 -ppc7400"
Ronald Oussoren23d92532009-09-07 06:12:00 +00004714
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004715 else
Ronald Oussorena9cfbde2009-09-20 20:05:44 +00004716 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4717echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004718 { (exit 1); exit 1; }; }
4719
4720 fi
4721
4722
4723 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4724 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4725 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4726 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4727 fi
4728 fi
4729
4730 # Calculate the right deployment target for this build.
4731 #
4732 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4733 if test ${cur_target} '>' 10.2; then
4734 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004735 if test ${enable_universalsdk}; then
4736 if test "${UNIVERSAL_ARCHS}" = "all"; then
4737 # Ensure that the default platform for a
4738 # 4-way universal build is OSX 10.5,
4739 # that's the first OS release where
4740 # 4-way builds make sense.
4741 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00004742
4743 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4744 cur_target='10.5'
4745
4746 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4747 cur_target='10.5'
4748
4749 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4750 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00004751 fi
4752 else
4753 if test `arch` = "i386"; then
4754 # On Intel macs default to a deployment
4755 # target of 10.4, that's the first OSX
4756 # release with Intel support.
4757 cur_target="10.4"
4758 fi
4759 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004760 fi
4761 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4762
4763 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4764 # environment with a value that is the same as what we'll use
4765 # in the Makefile to ensure that we'll get the same compiler
4766 # environment during configure and build time.
4767 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4768 export MACOSX_DEPLOYMENT_TARGET
4769 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4770
4771 ;;
4772 OSF*)
4773 BASECFLAGS="$BASECFLAGS -mieee"
4774 ;;
4775 esac
4776 ;;
4777
4778*)
4779 case $ac_sys_system in
4780 OpenUNIX*|UnixWare*)
4781 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4782 ;;
4783 OSF*)
4784 BASECFLAGS="$BASECFLAGS -ieee -std"
4785 ;;
4786 SCO_SV*)
4787 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4788 ;;
4789 esac
4790 ;;
4791esac
4792
4793if test "$Py_DEBUG" = 'true'; then
4794 :
4795else
4796 OPT="-DNDEBUG $OPT"
4797fi
4798
4799if test "$ac_arch_flags"
4800then
4801 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4802fi
4803
4804# disable check for icc since it seems to pass, but generates a warning
4805if test "$CC" = icc
4806then
4807 ac_cv_opt_olimit_ok=no
4808fi
4809
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004810{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4811echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004812if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004813 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004814else
4815 ac_save_cc="$CC"
4816CC="$CC -OPT:Olimit=0"
Gregory P. Smith373469a2009-11-01 21:03:38 +00004817cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004818/* confdefs.h. */
4819_ACEOF
4820cat confdefs.h >>conftest.$ac_ext
4821cat >>conftest.$ac_ext <<_ACEOF
4822/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004823
4824int
4825main ()
4826{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004827int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004828 ;
4829 return 0;
4830}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004831_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004832rm -f conftest.$ac_objext
4833if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004834case "(($ac_try" in
4835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4836 *) ac_try_echo=$ac_try;;
4837esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004839 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004840 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004841 grep -v '^ *+' conftest.er1 >conftest.err
4842 rm -f conftest.er1
4843 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004845 (exit $ac_status); } && {
4846 test -z "$ac_c_werror_flag" ||
4847 test ! -s conftest.err
4848 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004849 ac_cv_opt_olimit_ok=yes
4850else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004851 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004852sed 's/^/| /' conftest.$ac_ext >&5
4853
Gregory P. Smith373469a2009-11-01 21:03:38 +00004854 ac_cv_opt_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004855fi
4856
Gregory P. Smith373469a2009-11-01 21:03:38 +00004857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004858CC="$ac_save_cc"
4859fi
4860
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004861{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4862echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004863if test $ac_cv_opt_olimit_ok = yes; then
4864 case $ac_sys_system in
4865 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4866 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4867 # environment?
4868 Darwin*)
4869 ;;
4870 *)
4871 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4872 ;;
4873 esac
4874else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004875 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4876echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004877 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004878 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004879else
4880 ac_save_cc="$CC"
4881 CC="$CC -Olimit 1500"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004882 cat >conftest.$ac_ext <<_ACEOF
4883/* confdefs.h. */
4884_ACEOF
4885cat confdefs.h >>conftest.$ac_ext
4886cat >>conftest.$ac_ext <<_ACEOF
4887/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004888
4889int
4890main ()
4891{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004892int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004893 ;
4894 return 0;
4895}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004896_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004897rm -f conftest.$ac_objext
4898if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004899case "(($ac_try" in
4900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4901 *) ac_try_echo=$ac_try;;
4902esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004904 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004905 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004906 grep -v '^ *+' conftest.er1 >conftest.err
4907 rm -f conftest.er1
4908 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004910 (exit $ac_status); } && {
4911 test -z "$ac_c_werror_flag" ||
4912 test ! -s conftest.err
4913 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004914 ac_cv_olimit_ok=yes
4915else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004916 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004917sed 's/^/| /' conftest.$ac_ext >&5
4918
Gregory P. Smith373469a2009-11-01 21:03:38 +00004919 ac_cv_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004920fi
4921
Gregory P. Smith373469a2009-11-01 21:03:38 +00004922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004923 CC="$ac_save_cc"
4924fi
4925
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004926 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4927echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004928 if test $ac_cv_olimit_ok = yes; then
4929 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4930 fi
4931fi
4932
4933# Check whether GCC supports PyArg_ParseTuple format
4934if test "$GCC" = "yes"
4935then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004936 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4937echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004938 save_CFLAGS=$CFLAGS
4939 CFLAGS="$CFLAGS -Werror"
4940 cat >conftest.$ac_ext <<_ACEOF
4941/* confdefs.h. */
4942_ACEOF
4943cat confdefs.h >>conftest.$ac_ext
4944cat >>conftest.$ac_ext <<_ACEOF
4945/* end confdefs.h. */
4946
4947 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4948
4949int
4950main ()
4951{
4952
4953 ;
4954 return 0;
4955}
4956_ACEOF
4957rm -f conftest.$ac_objext
4958if { (ac_try="$ac_compile"
4959case "(($ac_try" in
4960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4961 *) ac_try_echo=$ac_try;;
4962esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004964 (eval "$ac_compile") 2>conftest.er1
4965 ac_status=$?
4966 grep -v '^ *+' conftest.er1 >conftest.err
4967 rm -f conftest.er1
4968 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004970 (exit $ac_status); } && {
4971 test -z "$ac_c_werror_flag" ||
4972 test ! -s conftest.err
4973 } && test -s conftest.$ac_objext; then
4974
4975cat >>confdefs.h <<\_ACEOF
4976#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4977_ACEOF
4978
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004979 { echo "$as_me:$LINENO: result: yes" >&5
4980echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004981else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004982 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004983sed 's/^/| /' conftest.$ac_ext >&5
4984
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004985 { echo "$as_me:$LINENO: result: no" >&5
4986echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004987
4988fi
4989
4990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4991 CFLAGS=$save_CFLAGS
4992fi
4993
4994# On some compilers, pthreads are available without further options
4995# (e.g. MacOS X). On some of these systems, the compiler will not
4996# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4997# So we have to see first whether pthreads are available without
4998# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004999{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5000echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005001if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005002 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005003else
5004 if test "$cross_compiling" = yes; then
5005 ac_cv_pthread_is_default=no
5006else
5007 cat >conftest.$ac_ext <<_ACEOF
5008/* confdefs.h. */
5009_ACEOF
5010cat confdefs.h >>conftest.$ac_ext
5011cat >>conftest.$ac_ext <<_ACEOF
5012/* end confdefs.h. */
5013
5014#include <pthread.h>
5015
5016void* routine(void* p){return NULL;}
5017
5018int main(){
5019 pthread_t p;
5020 if(pthread_create(&p,NULL,routine,NULL)!=0)
5021 return 1;
5022 (void)pthread_detach(p);
5023 return 0;
5024}
5025
5026_ACEOF
5027rm -f conftest$ac_exeext
5028if { (ac_try="$ac_link"
5029case "(($ac_try" in
5030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5031 *) ac_try_echo=$ac_try;;
5032esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005034 (eval "$ac_link") 2>&5
5035 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005037 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5038 { (case "(($ac_try" in
5039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5040 *) ac_try_echo=$ac_try;;
5041esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005043 (eval "$ac_try") 2>&5
5044 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005046 (exit $ac_status); }; }; then
5047
5048 ac_cv_pthread_is_default=yes
5049 ac_cv_kthread=no
5050 ac_cv_pthread=no
5051
5052else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005053 echo "$as_me: program exited with status $ac_status" >&5
5054echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005055sed 's/^/| /' conftest.$ac_ext >&5
5056
5057( exit $ac_status )
5058ac_cv_pthread_is_default=no
5059fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005060rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5061fi
5062
5063
5064
5065fi
5066
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005067{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5068echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005069
5070
5071if test $ac_cv_pthread_is_default = yes
5072then
5073 ac_cv_kpthread=no
5074else
5075# -Kpthread, if available, provides the right #defines
5076# and linker options to make pthread_create available
5077# Some compilers won't report that they do not support -Kpthread,
5078# so we need to run a program to see whether it really made the
5079# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005080{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5081echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005082if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005083 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005084else
5085 ac_save_cc="$CC"
5086CC="$CC -Kpthread"
5087if test "$cross_compiling" = yes; then
5088 ac_cv_kpthread=no
5089else
5090 cat >conftest.$ac_ext <<_ACEOF
5091/* confdefs.h. */
5092_ACEOF
5093cat confdefs.h >>conftest.$ac_ext
5094cat >>conftest.$ac_ext <<_ACEOF
5095/* end confdefs.h. */
5096
5097#include <pthread.h>
5098
5099void* routine(void* p){return NULL;}
5100
5101int main(){
5102 pthread_t p;
5103 if(pthread_create(&p,NULL,routine,NULL)!=0)
5104 return 1;
5105 (void)pthread_detach(p);
5106 return 0;
5107}
5108
5109_ACEOF
5110rm -f conftest$ac_exeext
5111if { (ac_try="$ac_link"
5112case "(($ac_try" in
5113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5114 *) ac_try_echo=$ac_try;;
5115esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005117 (eval "$ac_link") 2>&5
5118 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005120 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5121 { (case "(($ac_try" in
5122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5123 *) ac_try_echo=$ac_try;;
5124esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005126 (eval "$ac_try") 2>&5
5127 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005129 (exit $ac_status); }; }; then
5130 ac_cv_kpthread=yes
5131else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005132 echo "$as_me: program exited with status $ac_status" >&5
5133echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005134sed 's/^/| /' conftest.$ac_ext >&5
5135
5136( exit $ac_status )
5137ac_cv_kpthread=no
5138fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5140fi
5141
5142
5143CC="$ac_save_cc"
5144fi
5145
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005146{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5147echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005148fi
5149
5150if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5151then
5152# -Kthread, if available, provides the right #defines
5153# and linker options to make pthread_create available
5154# Some compilers won't report that they do not support -Kthread,
5155# so we need to run a program to see whether it really made the
5156# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005157{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5158echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005159if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005160 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005161else
5162 ac_save_cc="$CC"
5163CC="$CC -Kthread"
5164if test "$cross_compiling" = yes; then
5165 ac_cv_kthread=no
5166else
5167 cat >conftest.$ac_ext <<_ACEOF
5168/* confdefs.h. */
5169_ACEOF
5170cat confdefs.h >>conftest.$ac_ext
5171cat >>conftest.$ac_ext <<_ACEOF
5172/* end confdefs.h. */
5173
5174#include <pthread.h>
5175
5176void* routine(void* p){return NULL;}
5177
5178int main(){
5179 pthread_t p;
5180 if(pthread_create(&p,NULL,routine,NULL)!=0)
5181 return 1;
5182 (void)pthread_detach(p);
5183 return 0;
5184}
5185
5186_ACEOF
5187rm -f conftest$ac_exeext
5188if { (ac_try="$ac_link"
5189case "(($ac_try" in
5190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5191 *) ac_try_echo=$ac_try;;
5192esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005194 (eval "$ac_link") 2>&5
5195 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005197 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5198 { (case "(($ac_try" in
5199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5200 *) ac_try_echo=$ac_try;;
5201esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005203 (eval "$ac_try") 2>&5
5204 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005206 (exit $ac_status); }; }; then
5207 ac_cv_kthread=yes
5208else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005209 echo "$as_me: program exited with status $ac_status" >&5
5210echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005211sed 's/^/| /' conftest.$ac_ext >&5
5212
5213( exit $ac_status )
5214ac_cv_kthread=no
5215fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005216rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5217fi
5218
5219
5220CC="$ac_save_cc"
5221fi
5222
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005223{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5224echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005225fi
5226
5227if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5228then
5229# -pthread, if available, provides the right #defines
5230# and linker options to make pthread_create available
5231# Some compilers won't report that they do not support -pthread,
5232# so we need to run a program to see whether it really made the
5233# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005234{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5235echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005236if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005237 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005238else
5239 ac_save_cc="$CC"
5240CC="$CC -pthread"
5241if test "$cross_compiling" = yes; then
5242 ac_cv_pthread=no
5243else
5244 cat >conftest.$ac_ext <<_ACEOF
5245/* confdefs.h. */
5246_ACEOF
5247cat confdefs.h >>conftest.$ac_ext
5248cat >>conftest.$ac_ext <<_ACEOF
5249/* end confdefs.h. */
5250
5251#include <pthread.h>
5252
5253void* routine(void* p){return NULL;}
5254
5255int main(){
5256 pthread_t p;
5257 if(pthread_create(&p,NULL,routine,NULL)!=0)
5258 return 1;
5259 (void)pthread_detach(p);
5260 return 0;
5261}
5262
5263_ACEOF
5264rm -f conftest$ac_exeext
5265if { (ac_try="$ac_link"
5266case "(($ac_try" in
5267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5268 *) ac_try_echo=$ac_try;;
5269esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005271 (eval "$ac_link") 2>&5
5272 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005274 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5275 { (case "(($ac_try" in
5276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5277 *) ac_try_echo=$ac_try;;
5278esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005280 (eval "$ac_try") 2>&5
5281 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005283 (exit $ac_status); }; }; then
5284 ac_cv_pthread=yes
5285else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005286 echo "$as_me: program exited with status $ac_status" >&5
5287echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005288sed 's/^/| /' conftest.$ac_ext >&5
5289
5290( exit $ac_status )
5291ac_cv_pthread=no
5292fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5294fi
5295
5296
5297CC="$ac_save_cc"
5298fi
5299
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005300{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5301echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005302fi
5303
5304# If we have set a CC compiler flag for thread support then
5305# check if it works for CXX, too.
5306ac_cv_cxx_thread=no
5307if test ! -z "$CXX"
5308then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005309{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5310echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005311ac_save_cxx="$CXX"
5312
5313if test "$ac_cv_kpthread" = "yes"
5314then
5315 CXX="$CXX -Kpthread"
5316 ac_cv_cxx_thread=yes
5317elif test "$ac_cv_kthread" = "yes"
5318then
5319 CXX="$CXX -Kthread"
5320 ac_cv_cxx_thread=yes
5321elif test "$ac_cv_pthread" = "yes"
5322then
5323 CXX="$CXX -pthread"
5324 ac_cv_cxx_thread=yes
5325fi
5326
5327if test $ac_cv_cxx_thread = yes
5328then
5329 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5330 $CXX -c conftest.$ac_ext 2>&5
5331 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5332 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5333 then
5334 ac_cv_cxx_thread=yes
5335 else
5336 ac_cv_cxx_thread=no
5337 fi
5338 rm -fr conftest*
5339fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005340{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5341echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005342fi
5343CXX="$ac_save_cxx"
5344
5345
5346# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005347{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5348echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005349if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005350 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005351else
5352 cat >conftest.$ac_ext <<_ACEOF
5353/* confdefs.h. */
5354_ACEOF
5355cat confdefs.h >>conftest.$ac_ext
5356cat >>conftest.$ac_ext <<_ACEOF
5357/* end confdefs.h. */
5358#include <stdlib.h>
5359#include <stdarg.h>
5360#include <string.h>
5361#include <float.h>
5362
5363int
5364main ()
5365{
5366
5367 ;
5368 return 0;
5369}
5370_ACEOF
5371rm -f conftest.$ac_objext
5372if { (ac_try="$ac_compile"
5373case "(($ac_try" in
5374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5375 *) ac_try_echo=$ac_try;;
5376esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005378 (eval "$ac_compile") 2>conftest.er1
5379 ac_status=$?
5380 grep -v '^ *+' conftest.er1 >conftest.err
5381 rm -f conftest.er1
5382 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005384 (exit $ac_status); } && {
5385 test -z "$ac_c_werror_flag" ||
5386 test ! -s conftest.err
5387 } && test -s conftest.$ac_objext; then
5388 ac_cv_header_stdc=yes
5389else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005390 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005391sed 's/^/| /' conftest.$ac_ext >&5
5392
5393 ac_cv_header_stdc=no
5394fi
5395
5396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5397
5398if test $ac_cv_header_stdc = yes; then
5399 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5400 cat >conftest.$ac_ext <<_ACEOF
5401/* confdefs.h. */
5402_ACEOF
5403cat confdefs.h >>conftest.$ac_ext
5404cat >>conftest.$ac_ext <<_ACEOF
5405/* end confdefs.h. */
5406#include <string.h>
5407
5408_ACEOF
5409if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5410 $EGREP "memchr" >/dev/null 2>&1; then
5411 :
5412else
5413 ac_cv_header_stdc=no
5414fi
Benjamin Peterson2c196742009-12-31 03:17:18 +00005415rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005416
5417fi
5418
5419if test $ac_cv_header_stdc = yes; then
5420 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5421 cat >conftest.$ac_ext <<_ACEOF
5422/* confdefs.h. */
5423_ACEOF
5424cat confdefs.h >>conftest.$ac_ext
5425cat >>conftest.$ac_ext <<_ACEOF
5426/* end confdefs.h. */
5427#include <stdlib.h>
5428
5429_ACEOF
5430if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5431 $EGREP "free" >/dev/null 2>&1; then
5432 :
5433else
5434 ac_cv_header_stdc=no
5435fi
Benjamin Peterson2c196742009-12-31 03:17:18 +00005436rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005437
5438fi
5439
5440if test $ac_cv_header_stdc = yes; then
5441 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5442 if test "$cross_compiling" = yes; then
5443 :
5444else
5445 cat >conftest.$ac_ext <<_ACEOF
5446/* confdefs.h. */
5447_ACEOF
5448cat confdefs.h >>conftest.$ac_ext
5449cat >>conftest.$ac_ext <<_ACEOF
5450/* end confdefs.h. */
5451#include <ctype.h>
5452#include <stdlib.h>
5453#if ((' ' & 0x0FF) == 0x020)
5454# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5455# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5456#else
5457# define ISLOWER(c) \
5458 (('a' <= (c) && (c) <= 'i') \
5459 || ('j' <= (c) && (c) <= 'r') \
5460 || ('s' <= (c) && (c) <= 'z'))
5461# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5462#endif
5463
5464#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5465int
5466main ()
5467{
5468 int i;
5469 for (i = 0; i < 256; i++)
5470 if (XOR (islower (i), ISLOWER (i))
5471 || toupper (i) != TOUPPER (i))
5472 return 2;
5473 return 0;
5474}
5475_ACEOF
5476rm -f conftest$ac_exeext
5477if { (ac_try="$ac_link"
5478case "(($ac_try" in
5479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5480 *) ac_try_echo=$ac_try;;
5481esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005483 (eval "$ac_link") 2>&5
5484 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005486 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5487 { (case "(($ac_try" in
5488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5489 *) ac_try_echo=$ac_try;;
5490esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005492 (eval "$ac_try") 2>&5
5493 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005495 (exit $ac_status); }; }; then
5496 :
5497else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005498 echo "$as_me: program exited with status $ac_status" >&5
5499echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005500sed 's/^/| /' conftest.$ac_ext >&5
5501
5502( exit $ac_status )
5503ac_cv_header_stdc=no
5504fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5506fi
5507
5508
5509fi
5510fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005511{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5512echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005513if test $ac_cv_header_stdc = yes; then
5514
5515cat >>confdefs.h <<\_ACEOF
5516#define STDC_HEADERS 1
5517_ACEOF
5518
5519fi
5520
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005521# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5532 inttypes.h stdint.h unistd.h
5533do
5534as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5535{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5536echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5537if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5538 echo $ECHO_N "(cached) $ECHO_C" >&6
5539else
5540 cat >conftest.$ac_ext <<_ACEOF
5541/* confdefs.h. */
5542_ACEOF
5543cat confdefs.h >>conftest.$ac_ext
5544cat >>conftest.$ac_ext <<_ACEOF
5545/* end confdefs.h. */
5546$ac_includes_default
5547
5548#include <$ac_header>
5549_ACEOF
5550rm -f conftest.$ac_objext
5551if { (ac_try="$ac_compile"
5552case "(($ac_try" in
5553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5554 *) ac_try_echo=$ac_try;;
5555esac
5556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5557 (eval "$ac_compile") 2>conftest.er1
5558 ac_status=$?
5559 grep -v '^ *+' conftest.er1 >conftest.err
5560 rm -f conftest.er1
5561 cat conftest.err >&5
5562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5563 (exit $ac_status); } && {
5564 test -z "$ac_c_werror_flag" ||
5565 test ! -s conftest.err
5566 } && test -s conftest.$ac_objext; then
5567 eval "$as_ac_Header=yes"
5568else
5569 echo "$as_me: failed program was:" >&5
5570sed 's/^/| /' conftest.$ac_ext >&5
5571
5572 eval "$as_ac_Header=no"
5573fi
5574
5575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5576fi
5577ac_res=`eval echo '${'$as_ac_Header'}'`
5578 { echo "$as_me:$LINENO: result: $ac_res" >&5
5579echo "${ECHO_T}$ac_res" >&6; }
5580if test `eval echo '${'$as_ac_Header'}'` = yes; then
5581 cat >>confdefs.h <<_ACEOF
5582#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5583_ACEOF
5584
5585fi
5586
5587done
5588
5589
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005590
Martin v. Löwis11437992002-04-12 09:54:03 +00005591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
Anthony Baxter8a560de2004-10-13 15:30:56 +00005626
Martin v. Löwisc3001752005-01-23 09:27:24 +00005627
Martin v. Löwis11017b12006-01-14 18:12:57 +00005628
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005629
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005630
5631
5632
5633
5634
5635
5636
5637
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005638
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005639
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005640
5641
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005642
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005643
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005644for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5645fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005646ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005647shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005648unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005649sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5650sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005651sys/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 +00005652sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005653sys/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 +00005654sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005655bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005656do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005657as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005658if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005659 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5660echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005661if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005662 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005663fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005664ac_res=`eval echo '${'$as_ac_Header'}'`
5665 { echo "$as_me:$LINENO: result: $ac_res" >&5
5666echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005667else
Martin v. Löwis11437992002-04-12 09:54:03 +00005668 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005669{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5670echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005671cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005672/* confdefs.h. */
5673_ACEOF
5674cat confdefs.h >>conftest.$ac_ext
5675cat >>conftest.$ac_ext <<_ACEOF
5676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005677$ac_includes_default
5678#include <$ac_header>
5679_ACEOF
5680rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005681if { (ac_try="$ac_compile"
5682case "(($ac_try" in
5683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5684 *) ac_try_echo=$ac_try;;
5685esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005687 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005689 grep -v '^ *+' conftest.er1 >conftest.err
5690 rm -f conftest.er1
5691 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005693 (exit $ac_status); } && {
5694 test -z "$ac_c_werror_flag" ||
5695 test ! -s conftest.err
5696 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005697 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005698else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005700sed 's/^/| /' conftest.$ac_ext >&5
5701
Martin v. Löwiseba40652007-08-30 20:10:57 +00005702 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005703fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005704
5705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005706{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5707echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005708
5709# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005710{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5711echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005712cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005713/* confdefs.h. */
5714_ACEOF
5715cat confdefs.h >>conftest.$ac_ext
5716cat >>conftest.$ac_ext <<_ACEOF
5717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005718#include <$ac_header>
5719_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005720if { (ac_try="$ac_cpp conftest.$ac_ext"
5721case "(($ac_try" in
5722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5723 *) ac_try_echo=$ac_try;;
5724esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005726 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005727 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005728 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005729 rm -f conftest.er1
5730 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005732 (exit $ac_status); } >/dev/null && {
5733 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5734 test ! -s conftest.err
5735 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005736 ac_header_preproc=yes
5737else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005739sed 's/^/| /' conftest.$ac_ext >&5
5740
Martin v. Löwis11437992002-04-12 09:54:03 +00005741 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005743
Martin v. Löwis11437992002-04-12 09:54:03 +00005744rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005745{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5746echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005747
5748# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005749case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5750 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005751 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5752echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5753 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5754echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005755 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005756 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005757 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005758 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5759echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5760 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5761echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5762 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5763echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5764 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5765echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5766 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5767echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5768 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5769echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005770 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005771## -------------------------------------- ##
5772## Report this to http://bugs.python.org/ ##
5773## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005774_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005775 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005776 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005777esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005778{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5779echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005780if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005781 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005782else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005783 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005784fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005785ac_res=`eval echo '${'$as_ac_Header'}'`
5786 { echo "$as_me:$LINENO: result: $ac_res" >&5
5787echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005788
5789fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005790if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005791 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005792#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005793_ACEOF
5794
5795fi
5796
Guido van Rossum627b2d71993-12-24 10:39:16 +00005797done
5798
Martin v. Löwis11437992002-04-12 09:54:03 +00005799
5800
5801
5802
5803
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005804ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005805for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005806 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5807{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5808echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005809if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005810 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005811else
Martin v. Löwis11437992002-04-12 09:54:03 +00005812 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005813/* confdefs.h. */
5814_ACEOF
5815cat confdefs.h >>conftest.$ac_ext
5816cat >>conftest.$ac_ext <<_ACEOF
5817/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005818#include <sys/types.h>
5819#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005820
Martin v. Löwis11437992002-04-12 09:54:03 +00005821int
5822main ()
5823{
5824if ((DIR *) 0)
5825return 0;
5826 ;
5827 return 0;
5828}
5829_ACEOF
5830rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005831if { (ac_try="$ac_compile"
5832case "(($ac_try" in
5833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5834 *) ac_try_echo=$ac_try;;
5835esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005837 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005839 grep -v '^ *+' conftest.er1 >conftest.err
5840 rm -f conftest.er1
5841 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005843 (exit $ac_status); } && {
5844 test -z "$ac_c_werror_flag" ||
5845 test ! -s conftest.err
5846 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005847 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005848else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005850sed 's/^/| /' conftest.$ac_ext >&5
5851
Martin v. Löwiseba40652007-08-30 20:10:57 +00005852 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005854
5855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005856fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005857ac_res=`eval echo '${'$as_ac_Header'}'`
5858 { echo "$as_me:$LINENO: result: $ac_res" >&5
5859echo "${ECHO_T}$ac_res" >&6; }
5860if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005861 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005862#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005863_ACEOF
5864
5865ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005866fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005867
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005868done
5869# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5870if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005871 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5872echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005873if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005874 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005875else
Martin v. Löwis11437992002-04-12 09:54:03 +00005876 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005877cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005878/* confdefs.h. */
5879_ACEOF
5880cat confdefs.h >>conftest.$ac_ext
5881cat >>conftest.$ac_ext <<_ACEOF
5882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005883
Martin v. Löwiseba40652007-08-30 20:10:57 +00005884/* Override any GCC internal prototype to avoid an error.
5885 Use char because int might match the return type of a GCC
5886 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005887#ifdef __cplusplus
5888extern "C"
5889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005890char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005891int
5892main ()
5893{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005894return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005895 ;
5896 return 0;
5897}
5898_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005899for ac_lib in '' dir; do
5900 if test -z "$ac_lib"; then
5901 ac_res="none required"
5902 else
5903 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005904 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005905 fi
5906 rm -f conftest.$ac_objext conftest$ac_exeext
5907if { (ac_try="$ac_link"
5908case "(($ac_try" in
5909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5910 *) ac_try_echo=$ac_try;;
5911esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005913 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005914 ac_status=$?
5915 grep -v '^ *+' conftest.er1 >conftest.err
5916 rm -f conftest.er1
5917 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005919 (exit $ac_status); } && {
5920 test -z "$ac_c_werror_flag" ||
5921 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005922 } && test -s conftest$ac_exeext &&
5923 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005924 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005925else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005926 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005927sed 's/^/| /' conftest.$ac_ext >&5
5928
Martin v. Löwiseba40652007-08-30 20:10:57 +00005929
Brett Cannon19fab762007-06-02 03:02:29 +00005930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005931
5932rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5933 conftest$ac_exeext
5934 if test "${ac_cv_search_opendir+set}" = set; then
5935 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005936fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005937done
5938if test "${ac_cv_search_opendir+set}" = set; then
5939 :
5940else
5941 ac_cv_search_opendir=no
5942fi
5943rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005944LIBS=$ac_func_search_save_LIBS
5945fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005946{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5947echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005948ac_res=$ac_cv_search_opendir
5949if test "$ac_res" != no; then
5950 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005951
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005952fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005953
Michael W. Hudson54241132001-12-07 15:38:26 +00005954else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005955 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5956echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005957if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005958 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005959else
5960 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005961cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005962/* confdefs.h. */
5963_ACEOF
5964cat confdefs.h >>conftest.$ac_ext
5965cat >>conftest.$ac_ext <<_ACEOF
5966/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005967
Martin v. Löwiseba40652007-08-30 20:10:57 +00005968/* Override any GCC internal prototype to avoid an error.
5969 Use char because int might match the return type of a GCC
5970 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005971#ifdef __cplusplus
5972extern "C"
5973#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005974char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005975int
5976main ()
5977{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005978return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005979 ;
5980 return 0;
5981}
5982_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005983for ac_lib in '' x; do
5984 if test -z "$ac_lib"; then
5985 ac_res="none required"
5986 else
5987 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005988 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005989 fi
5990 rm -f conftest.$ac_objext conftest$ac_exeext
5991if { (ac_try="$ac_link"
5992case "(($ac_try" in
5993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5994 *) ac_try_echo=$ac_try;;
5995esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005997 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005998 ac_status=$?
5999 grep -v '^ *+' conftest.er1 >conftest.err
6000 rm -f conftest.er1
6001 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006003 (exit $ac_status); } && {
6004 test -z "$ac_c_werror_flag" ||
6005 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006006 } && test -s conftest$ac_exeext &&
6007 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006008 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006009else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006010 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006011sed 's/^/| /' conftest.$ac_ext >&5
6012
Martin v. Löwiseba40652007-08-30 20:10:57 +00006013
Brett Cannon19fab762007-06-02 03:02:29 +00006014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006015
6016rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6017 conftest$ac_exeext
6018 if test "${ac_cv_search_opendir+set}" = set; then
6019 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006021done
6022if test "${ac_cv_search_opendir+set}" = set; then
6023 :
6024else
6025 ac_cv_search_opendir=no
6026fi
6027rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006028LIBS=$ac_func_search_save_LIBS
6029fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006030{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6031echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006032ac_res=$ac_cv_search_opendir
6033if test "$ac_res" != no; then
6034 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006035
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006036fi
6037
6038fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006039
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006040{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6041echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006042if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006043 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006044else
6045 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006046/* confdefs.h. */
6047_ACEOF
6048cat confdefs.h >>conftest.$ac_ext
6049cat >>conftest.$ac_ext <<_ACEOF
6050/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006051#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006052int
6053main ()
6054{
6055return makedev(0, 0);
6056 ;
6057 return 0;
6058}
6059_ACEOF
6060rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006061if { (ac_try="$ac_link"
6062case "(($ac_try" in
6063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6064 *) ac_try_echo=$ac_try;;
6065esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006067 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006068 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006069 grep -v '^ *+' conftest.er1 >conftest.err
6070 rm -f conftest.er1
6071 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006073 (exit $ac_status); } && {
6074 test -z "$ac_c_werror_flag" ||
6075 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006076 } && test -s conftest$ac_exeext &&
6077 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006078 ac_cv_header_sys_types_h_makedev=yes
6079else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006081sed 's/^/| /' conftest.$ac_ext >&5
6082
Martin v. Löwiseba40652007-08-30 20:10:57 +00006083 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006084fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006085
6086rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006087 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006088
6089fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006090{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6091echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006092
6093if test $ac_cv_header_sys_types_h_makedev = no; then
6094if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006095 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6096echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006097if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006098 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006099fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006100{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6101echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006102else
6103 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006104{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6105echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006106cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006107/* confdefs.h. */
6108_ACEOF
6109cat confdefs.h >>conftest.$ac_ext
6110cat >>conftest.$ac_ext <<_ACEOF
6111/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006112$ac_includes_default
6113#include <sys/mkdev.h>
6114_ACEOF
6115rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006116if { (ac_try="$ac_compile"
6117case "(($ac_try" in
6118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6119 *) ac_try_echo=$ac_try;;
6120esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006122 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006124 grep -v '^ *+' conftest.er1 >conftest.err
6125 rm -f conftest.er1
6126 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006128 (exit $ac_status); } && {
6129 test -z "$ac_c_werror_flag" ||
6130 test ! -s conftest.err
6131 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006132 ac_header_compiler=yes
6133else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006135sed 's/^/| /' conftest.$ac_ext >&5
6136
Martin v. Löwiseba40652007-08-30 20:10:57 +00006137 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006139
6140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006141{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6142echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006143
6144# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006145{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6146echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006147cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006148/* confdefs.h. */
6149_ACEOF
6150cat confdefs.h >>conftest.$ac_ext
6151cat >>conftest.$ac_ext <<_ACEOF
6152/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006153#include <sys/mkdev.h>
6154_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006155if { (ac_try="$ac_cpp conftest.$ac_ext"
6156case "(($ac_try" in
6157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6158 *) ac_try_echo=$ac_try;;
6159esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006161 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006162 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006163 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006164 rm -f conftest.er1
6165 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006167 (exit $ac_status); } >/dev/null && {
6168 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6169 test ! -s conftest.err
6170 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006171 ac_header_preproc=yes
6172else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006174sed 's/^/| /' conftest.$ac_ext >&5
6175
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006176 ac_header_preproc=no
6177fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006178
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006179rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006180{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6181echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006182
6183# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006184case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6185 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006186 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6187echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6188 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6189echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006190 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006191 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006192 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006193 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6194echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6195 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6196echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6197 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6198echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6199 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6200echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6201 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6202echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6203 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6204echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006205 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006206## -------------------------------------- ##
6207## Report this to http://bugs.python.org/ ##
6208## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006209_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006210 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006211 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006212esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006213{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6214echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006215if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006216 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006217else
6218 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6219fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006220{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6221echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222
6223fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006224if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006225
6226cat >>confdefs.h <<\_ACEOF
6227#define MAJOR_IN_MKDEV 1
6228_ACEOF
6229
6230fi
6231
6232
6233
6234 if test $ac_cv_header_sys_mkdev_h = no; then
6235 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006236 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6237echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006238if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006239 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006240fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006241{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6242echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243else
6244 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006245{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6246echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006247cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006248/* confdefs.h. */
6249_ACEOF
6250cat confdefs.h >>conftest.$ac_ext
6251cat >>conftest.$ac_ext <<_ACEOF
6252/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253$ac_includes_default
6254#include <sys/sysmacros.h>
6255_ACEOF
6256rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006257if { (ac_try="$ac_compile"
6258case "(($ac_try" in
6259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6260 *) ac_try_echo=$ac_try;;
6261esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006263 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006264 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006265 grep -v '^ *+' conftest.er1 >conftest.err
6266 rm -f conftest.er1
6267 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006269 (exit $ac_status); } && {
6270 test -z "$ac_c_werror_flag" ||
6271 test ! -s conftest.err
6272 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006273 ac_header_compiler=yes
6274else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006275 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006276sed 's/^/| /' conftest.$ac_ext >&5
6277
Martin v. Löwiseba40652007-08-30 20:10:57 +00006278 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006279fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006280
6281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006282{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6283echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006284
6285# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006286{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6287echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006288cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006289/* confdefs.h. */
6290_ACEOF
6291cat confdefs.h >>conftest.$ac_ext
6292cat >>conftest.$ac_ext <<_ACEOF
6293/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006294#include <sys/sysmacros.h>
6295_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006296if { (ac_try="$ac_cpp conftest.$ac_ext"
6297case "(($ac_try" in
6298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6299 *) ac_try_echo=$ac_try;;
6300esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006302 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006303 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006304 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006305 rm -f conftest.er1
6306 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006308 (exit $ac_status); } >/dev/null && {
6309 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6310 test ! -s conftest.err
6311 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006312 ac_header_preproc=yes
6313else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006315sed 's/^/| /' conftest.$ac_ext >&5
6316
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006317 ac_header_preproc=no
6318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006319
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006320rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006321{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6322echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006323
6324# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006325case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6326 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006327 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6328echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6329 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6330echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006331 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006332 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006333 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006334 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6335echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6336 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6337echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6338 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6339echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6340 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6341echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6342 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6343echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6344 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6345echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006346 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006347## -------------------------------------- ##
6348## Report this to http://bugs.python.org/ ##
6349## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006350_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006351 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006352 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006353esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006354{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6355echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006356if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006357 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006358else
6359 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6360fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006361{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6362echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006363
6364fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006365if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006366
6367cat >>confdefs.h <<\_ACEOF
6368#define MAJOR_IN_SYSMACROS 1
6369_ACEOF
6370
6371fi
6372
6373
6374 fi
6375fi
6376
Michael W. Hudson54241132001-12-07 15:38:26 +00006377
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006378# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006379
6380for ac_header in term.h
6381do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006382as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6383{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6384echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006385if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006386 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006387else
6388 cat >conftest.$ac_ext <<_ACEOF
6389/* confdefs.h. */
6390_ACEOF
6391cat confdefs.h >>conftest.$ac_ext
6392cat >>conftest.$ac_ext <<_ACEOF
6393/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006394
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006395#ifdef HAVE_CURSES_H
6396#include <curses.h>
6397#endif
6398
6399
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006400#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006401_ACEOF
6402rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006403if { (ac_try="$ac_compile"
6404case "(($ac_try" in
6405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6406 *) ac_try_echo=$ac_try;;
6407esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006409 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006410 ac_status=$?
6411 grep -v '^ *+' conftest.er1 >conftest.err
6412 rm -f conftest.er1
6413 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006415 (exit $ac_status); } && {
6416 test -z "$ac_c_werror_flag" ||
6417 test ! -s conftest.err
6418 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006419 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006420else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006421 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006422sed 's/^/| /' conftest.$ac_ext >&5
6423
Martin v. Löwiseba40652007-08-30 20:10:57 +00006424 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006426
6427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006428fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006429ac_res=`eval echo '${'$as_ac_Header'}'`
6430 { echo "$as_me:$LINENO: result: $ac_res" >&5
6431echo "${ECHO_T}$ac_res" >&6; }
6432if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006433 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006434#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006435_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006436
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006437fi
6438
6439done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006440
6441
Martin v. Löwis11017b12006-01-14 18:12:57 +00006442# On Linux, netlink.h requires asm/types.h
6443
6444for ac_header in linux/netlink.h
6445do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006446as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6447{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6448echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006449if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006450 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006451else
6452 cat >conftest.$ac_ext <<_ACEOF
6453/* confdefs.h. */
6454_ACEOF
6455cat confdefs.h >>conftest.$ac_ext
6456cat >>conftest.$ac_ext <<_ACEOF
6457/* end confdefs.h. */
6458
6459#ifdef HAVE_ASM_TYPES_H
6460#include <asm/types.h>
6461#endif
6462#ifdef HAVE_SYS_SOCKET_H
6463#include <sys/socket.h>
6464#endif
6465
6466
6467#include <$ac_header>
6468_ACEOF
6469rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006470if { (ac_try="$ac_compile"
6471case "(($ac_try" in
6472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6473 *) ac_try_echo=$ac_try;;
6474esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006476 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006477 ac_status=$?
6478 grep -v '^ *+' conftest.er1 >conftest.err
6479 rm -f conftest.er1
6480 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006482 (exit $ac_status); } && {
6483 test -z "$ac_c_werror_flag" ||
6484 test ! -s conftest.err
6485 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006486 eval "$as_ac_Header=yes"
6487else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006488 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006489sed 's/^/| /' conftest.$ac_ext >&5
6490
Martin v. Löwiseba40652007-08-30 20:10:57 +00006491 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006493
6494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006495fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006496ac_res=`eval echo '${'$as_ac_Header'}'`
6497 { echo "$as_me:$LINENO: result: $ac_res" >&5
6498echo "${ECHO_T}$ac_res" >&6; }
6499if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006500 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006501#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006502_ACEOF
6503
6504fi
6505
6506done
6507
6508
Guido van Rossum627b2d71993-12-24 10:39:16 +00006509# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006510was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006511{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6512echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006513cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006514/* confdefs.h. */
6515_ACEOF
6516cat confdefs.h >>conftest.$ac_ext
6517cat >>conftest.$ac_ext <<_ACEOF
6518/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006519#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006520
6521_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006523 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006524 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006525else
Martin v. Löwis11437992002-04-12 09:54:03 +00006526
6527
6528cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006529#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006530_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006531
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006532
Guido van Rossum627b2d71993-12-24 10:39:16 +00006533fi
Benjamin Peterson2c196742009-12-31 03:17:18 +00006534rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006535
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006536{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6537echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006538
Neal Norwitz11690112002-07-30 01:08:28 +00006539# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006540{ echo "$as_me:$LINENO: checking for makedev" >&5
6541echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006542cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006543/* confdefs.h. */
6544_ACEOF
6545cat confdefs.h >>conftest.$ac_ext
6546cat >>conftest.$ac_ext <<_ACEOF
6547/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006548#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006549int
6550main ()
6551{
6552 makedev(0, 0)
6553 ;
6554 return 0;
6555}
6556_ACEOF
6557rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006558if { (ac_try="$ac_link"
6559case "(($ac_try" in
6560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6561 *) ac_try_echo=$ac_try;;
6562esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006564 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006566 grep -v '^ *+' conftest.er1 >conftest.err
6567 rm -f conftest.er1
6568 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006570 (exit $ac_status); } && {
6571 test -z "$ac_c_werror_flag" ||
6572 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006573 } && test -s conftest$ac_exeext &&
6574 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006575 ac_cv_has_makedev=yes
6576else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006578sed 's/^/| /' conftest.$ac_ext >&5
6579
Martin v. Löwiseba40652007-08-30 20:10:57 +00006580 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006582
6583rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006584 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006585if test "$ac_cv_has_makedev" = "no"; then
6586 # we didn't link, try if _OSF_SOURCE will allow us to link
6587 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006588/* confdefs.h. */
6589_ACEOF
6590cat confdefs.h >>conftest.$ac_ext
6591cat >>conftest.$ac_ext <<_ACEOF
6592/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006593
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006594#define _OSF_SOURCE 1
6595#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006596
Neal Norwitz11690112002-07-30 01:08:28 +00006597int
6598main ()
6599{
6600 makedev(0, 0)
6601 ;
6602 return 0;
6603}
6604_ACEOF
6605rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006606if { (ac_try="$ac_link"
6607case "(($ac_try" in
6608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6609 *) ac_try_echo=$ac_try;;
6610esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006612 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006614 grep -v '^ *+' conftest.er1 >conftest.err
6615 rm -f conftest.er1
6616 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006618 (exit $ac_status); } && {
6619 test -z "$ac_c_werror_flag" ||
6620 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006621 } && test -s conftest$ac_exeext &&
6622 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006623 ac_cv_has_makedev=yes
6624else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006626sed 's/^/| /' conftest.$ac_ext >&5
6627
Martin v. Löwiseba40652007-08-30 20:10:57 +00006628 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006630
6631rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006632 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006633 if test "$ac_cv_has_makedev" = "yes"; then
6634
6635cat >>confdefs.h <<\_ACEOF
6636#define _OSF_SOURCE 1
6637_ACEOF
6638
6639 fi
6640fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006641{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6642echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006643if test "$ac_cv_has_makedev" = "yes"; then
6644
6645cat >>confdefs.h <<\_ACEOF
6646#define HAVE_MAKEDEV 1
6647_ACEOF
6648
6649fi
6650
Martin v. Löwis399a6892002-10-04 10:22:02 +00006651# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6652# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6653# defined, but the compiler does not support pragma redefine_extname,
6654# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6655# structures (such as rlimit64) without declaring them. As a
6656# work-around, disable LFS on such configurations
6657
6658use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006659{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6660echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006661cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006662/* confdefs.h. */
6663_ACEOF
6664cat confdefs.h >>conftest.$ac_ext
6665cat >>conftest.$ac_ext <<_ACEOF
6666/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006667
6668#define _LARGEFILE_SOURCE 1
6669#define _FILE_OFFSET_BITS 64
6670#include <sys/resource.h>
6671
Martin v. Löwis399a6892002-10-04 10:22:02 +00006672int
6673main ()
6674{
6675struct rlimit foo;
6676 ;
6677 return 0;
6678}
6679_ACEOF
6680rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006681if { (ac_try="$ac_compile"
6682case "(($ac_try" in
6683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6684 *) ac_try_echo=$ac_try;;
6685esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006687 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006689 grep -v '^ *+' conftest.er1 >conftest.err
6690 rm -f conftest.er1
6691 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006693 (exit $ac_status); } && {
6694 test -z "$ac_c_werror_flag" ||
6695 test ! -s conftest.err
6696 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006697 sol_lfs_bug=no
6698else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006700sed 's/^/| /' conftest.$ac_ext >&5
6701
Martin v. Löwiseba40652007-08-30 20:10:57 +00006702 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006703fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006704
6705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006706{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6707echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006708if test "$sol_lfs_bug" = "yes"; then
6709 use_lfs=no
6710fi
6711
6712if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006713# Two defines needed to enable largefile support on various platforms
6714# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006715
Martin v. Löwis11437992002-04-12 09:54:03 +00006716cat >>confdefs.h <<\_ACEOF
6717#define _LARGEFILE_SOURCE 1
6718_ACEOF
6719
6720
6721cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006722#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006723_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006724
Martin v. Löwis399a6892002-10-04 10:22:02 +00006725fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006726
Guido van Rossum84e7b241996-08-19 21:59:00 +00006727# Add some code to confdefs.h so that the test for off_t works on SCO
6728cat >> confdefs.h <<\EOF
6729#if defined(SCO_DS)
6730#undef _OFF_T
6731#endif
6732EOF
6733
Guido van Rossumef2255b2000-03-10 22:30:29 +00006734# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006735{ echo "$as_me:$LINENO: checking for mode_t" >&5
6736echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006737if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006738 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006739else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006740 cat >conftest.$ac_ext <<_ACEOF
6741/* confdefs.h. */
6742_ACEOF
6743cat confdefs.h >>conftest.$ac_ext
6744cat >>conftest.$ac_ext <<_ACEOF
6745/* end confdefs.h. */
6746$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006747typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006748int
6749main ()
6750{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006751if ((ac__type_new_ *) 0)
6752 return 0;
6753if (sizeof (ac__type_new_))
6754 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006755 ;
6756 return 0;
6757}
6758_ACEOF
6759rm -f conftest.$ac_objext
6760if { (ac_try="$ac_compile"
6761case "(($ac_try" in
6762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6763 *) ac_try_echo=$ac_try;;
6764esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006766 (eval "$ac_compile") 2>conftest.er1
6767 ac_status=$?
6768 grep -v '^ *+' conftest.er1 >conftest.err
6769 rm -f conftest.er1
6770 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006772 (exit $ac_status); } && {
6773 test -z "$ac_c_werror_flag" ||
6774 test ! -s conftest.err
6775 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006776 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006777else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006778 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006779sed 's/^/| /' conftest.$ac_ext >&5
6780
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006781 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006782fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006783
6784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006785fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006786{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6787echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6788if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006789 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006790else
Martin v. Löwis11437992002-04-12 09:54:03 +00006791
6792cat >>confdefs.h <<_ACEOF
6793#define mode_t int
6794_ACEOF
6795
6796fi
6797
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006798{ echo "$as_me:$LINENO: checking for off_t" >&5
6799echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006800if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006801 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006802else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006803 cat >conftest.$ac_ext <<_ACEOF
6804/* confdefs.h. */
6805_ACEOF
6806cat confdefs.h >>conftest.$ac_ext
6807cat >>conftest.$ac_ext <<_ACEOF
6808/* end confdefs.h. */
6809$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006810typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006811int
6812main ()
6813{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006814if ((ac__type_new_ *) 0)
6815 return 0;
6816if (sizeof (ac__type_new_))
6817 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006818 ;
6819 return 0;
6820}
6821_ACEOF
6822rm -f conftest.$ac_objext
6823if { (ac_try="$ac_compile"
6824case "(($ac_try" in
6825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6826 *) ac_try_echo=$ac_try;;
6827esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006829 (eval "$ac_compile") 2>conftest.er1
6830 ac_status=$?
6831 grep -v '^ *+' conftest.er1 >conftest.err
6832 rm -f conftest.er1
6833 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006835 (exit $ac_status); } && {
6836 test -z "$ac_c_werror_flag" ||
6837 test ! -s conftest.err
6838 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006839 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006840else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006842sed 's/^/| /' conftest.$ac_ext >&5
6843
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006844 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006846
6847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006848fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006849{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6850echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6851if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006852 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006853else
Martin v. Löwis11437992002-04-12 09:54:03 +00006854
6855cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006856#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006857_ACEOF
6858
6859fi
6860
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006861{ echo "$as_me:$LINENO: checking for pid_t" >&5
6862echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006863if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006864 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006865else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006866 cat >conftest.$ac_ext <<_ACEOF
6867/* confdefs.h. */
6868_ACEOF
6869cat confdefs.h >>conftest.$ac_ext
6870cat >>conftest.$ac_ext <<_ACEOF
6871/* end confdefs.h. */
6872$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006873typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006874int
6875main ()
6876{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006877if ((ac__type_new_ *) 0)
6878 return 0;
6879if (sizeof (ac__type_new_))
6880 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006881 ;
6882 return 0;
6883}
6884_ACEOF
6885rm -f conftest.$ac_objext
6886if { (ac_try="$ac_compile"
6887case "(($ac_try" in
6888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6889 *) ac_try_echo=$ac_try;;
6890esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006892 (eval "$ac_compile") 2>conftest.er1
6893 ac_status=$?
6894 grep -v '^ *+' conftest.er1 >conftest.err
6895 rm -f conftest.er1
6896 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006898 (exit $ac_status); } && {
6899 test -z "$ac_c_werror_flag" ||
6900 test ! -s conftest.err
6901 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006902 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006903else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006905sed 's/^/| /' conftest.$ac_ext >&5
6906
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006907 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006908fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006909
6910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006911fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006912{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6913echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6914if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006915 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006916else
Martin v. Löwis11437992002-04-12 09:54:03 +00006917
6918cat >>confdefs.h <<_ACEOF
6919#define pid_t int
6920_ACEOF
6921
6922fi
6923
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006924{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6925echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006926if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006927 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006928else
6929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006930/* confdefs.h. */
6931_ACEOF
6932cat confdefs.h >>conftest.$ac_ext
6933cat >>conftest.$ac_ext <<_ACEOF
6934/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006935#include <sys/types.h>
6936#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006937
Martin v. Löwis11437992002-04-12 09:54:03 +00006938int
6939main ()
6940{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006941return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006942 ;
6943 return 0;
6944}
6945_ACEOF
6946rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006947if { (ac_try="$ac_compile"
6948case "(($ac_try" in
6949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6950 *) ac_try_echo=$ac_try;;
6951esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006953 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006955 grep -v '^ *+' conftest.er1 >conftest.err
6956 rm -f conftest.er1
6957 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006959 (exit $ac_status); } && {
6960 test -z "$ac_c_werror_flag" ||
6961 test ! -s conftest.err
6962 } && test -s conftest.$ac_objext; then
6963 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006964else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006966sed 's/^/| /' conftest.$ac_ext >&5
6967
Martin v. Löwiseba40652007-08-30 20:10:57 +00006968 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006970
6971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006972fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006973{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6974echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006975
Martin v. Löwis11437992002-04-12 09:54:03 +00006976cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006977#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006978_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006979
Michael W. Hudson54241132001-12-07 15:38:26 +00006980
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006981{ echo "$as_me:$LINENO: checking for size_t" >&5
6982echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006983if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006984 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006985else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006986 cat >conftest.$ac_ext <<_ACEOF
6987/* confdefs.h. */
6988_ACEOF
6989cat confdefs.h >>conftest.$ac_ext
6990cat >>conftest.$ac_ext <<_ACEOF
6991/* end confdefs.h. */
6992$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006993typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006994int
6995main ()
6996{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006997if ((ac__type_new_ *) 0)
6998 return 0;
6999if (sizeof (ac__type_new_))
7000 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007001 ;
7002 return 0;
7003}
7004_ACEOF
7005rm -f conftest.$ac_objext
7006if { (ac_try="$ac_compile"
7007case "(($ac_try" in
7008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7009 *) ac_try_echo=$ac_try;;
7010esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007012 (eval "$ac_compile") 2>conftest.er1
7013 ac_status=$?
7014 grep -v '^ *+' conftest.er1 >conftest.err
7015 rm -f conftest.er1
7016 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007018 (exit $ac_status); } && {
7019 test -z "$ac_c_werror_flag" ||
7020 test ! -s conftest.err
7021 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007022 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007023else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007025sed 's/^/| /' conftest.$ac_ext >&5
7026
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007027 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007029
7030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007031fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007032{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7033echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7034if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007035 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007036else
Martin v. Löwis11437992002-04-12 09:54:03 +00007037
7038cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007039#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007040_ACEOF
7041
7042fi
7043
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007044{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7045echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007046if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007047 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007048else
7049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007050/* confdefs.h. */
7051_ACEOF
7052cat confdefs.h >>conftest.$ac_ext
7053cat >>conftest.$ac_ext <<_ACEOF
7054/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007055#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007056
7057_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007058if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007059 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007060 ac_cv_type_uid_t=yes
7061else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007062 ac_cv_type_uid_t=no
7063fi
Benjamin Peterson2c196742009-12-31 03:17:18 +00007064rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007065
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007066fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007067{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7068echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007069if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007070
Martin v. Löwis11437992002-04-12 09:54:03 +00007071cat >>confdefs.h <<\_ACEOF
7072#define uid_t int
7073_ACEOF
7074
7075
7076cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007077#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007078_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007079
7080fi
7081
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007082
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007083 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7084echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007085if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007086 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007087else
7088 ac_cv_c_uint32_t=no
7089 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7090 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7091 cat >conftest.$ac_ext <<_ACEOF
7092/* confdefs.h. */
7093_ACEOF
7094cat confdefs.h >>conftest.$ac_ext
7095cat >>conftest.$ac_ext <<_ACEOF
7096/* end confdefs.h. */
7097$ac_includes_default
7098int
7099main ()
7100{
7101static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7102test_array [0] = 0
7103
7104 ;
7105 return 0;
7106}
7107_ACEOF
7108rm -f conftest.$ac_objext
7109if { (ac_try="$ac_compile"
7110case "(($ac_try" in
7111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7112 *) ac_try_echo=$ac_try;;
7113esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007115 (eval "$ac_compile") 2>conftest.er1
7116 ac_status=$?
7117 grep -v '^ *+' conftest.er1 >conftest.err
7118 rm -f conftest.er1
7119 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007121 (exit $ac_status); } && {
7122 test -z "$ac_c_werror_flag" ||
7123 test ! -s conftest.err
7124 } && test -s conftest.$ac_objext; then
7125 case $ac_type in
7126 uint32_t) ac_cv_c_uint32_t=yes ;;
7127 *) ac_cv_c_uint32_t=$ac_type ;;
7128esac
7129
7130else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007131 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007132sed 's/^/| /' conftest.$ac_ext >&5
7133
7134
7135fi
7136
7137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7138 test "$ac_cv_c_uint32_t" != no && break
7139 done
7140fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007141{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7142echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007143 case $ac_cv_c_uint32_t in #(
7144 no|yes) ;; #(
7145 *)
7146
7147cat >>confdefs.h <<\_ACEOF
7148#define _UINT32_T 1
7149_ACEOF
7150
7151
7152cat >>confdefs.h <<_ACEOF
7153#define uint32_t $ac_cv_c_uint32_t
7154_ACEOF
7155;;
7156 esac
7157
7158
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007159 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7160echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007161if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007162 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007163else
7164 ac_cv_c_uint64_t=no
7165 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7166 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7167 cat >conftest.$ac_ext <<_ACEOF
7168/* confdefs.h. */
7169_ACEOF
7170cat confdefs.h >>conftest.$ac_ext
7171cat >>conftest.$ac_ext <<_ACEOF
7172/* end confdefs.h. */
7173$ac_includes_default
7174int
7175main ()
7176{
7177static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7178test_array [0] = 0
7179
7180 ;
7181 return 0;
7182}
7183_ACEOF
7184rm -f conftest.$ac_objext
7185if { (ac_try="$ac_compile"
7186case "(($ac_try" in
7187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7188 *) ac_try_echo=$ac_try;;
7189esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007191 (eval "$ac_compile") 2>conftest.er1
7192 ac_status=$?
7193 grep -v '^ *+' conftest.er1 >conftest.err
7194 rm -f conftest.er1
7195 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007197 (exit $ac_status); } && {
7198 test -z "$ac_c_werror_flag" ||
7199 test ! -s conftest.err
7200 } && test -s conftest.$ac_objext; then
7201 case $ac_type in
7202 uint64_t) ac_cv_c_uint64_t=yes ;;
7203 *) ac_cv_c_uint64_t=$ac_type ;;
7204esac
7205
7206else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007207 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007208sed 's/^/| /' conftest.$ac_ext >&5
7209
7210
7211fi
7212
7213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7214 test "$ac_cv_c_uint64_t" != no && break
7215 done
7216fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007217{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7218echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007219 case $ac_cv_c_uint64_t in #(
7220 no|yes) ;; #(
7221 *)
7222
7223cat >>confdefs.h <<\_ACEOF
7224#define _UINT64_T 1
7225_ACEOF
7226
7227
7228cat >>confdefs.h <<_ACEOF
7229#define uint64_t $ac_cv_c_uint64_t
7230_ACEOF
7231;;
7232 esac
7233
7234
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007235 { echo "$as_me:$LINENO: checking for int32_t" >&5
7236echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007237if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007238 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007239else
7240 ac_cv_c_int32_t=no
7241 for ac_type in 'int32_t' 'int' 'long int' \
7242 'long long int' 'short int' 'signed char'; do
7243 cat >conftest.$ac_ext <<_ACEOF
7244/* confdefs.h. */
7245_ACEOF
7246cat confdefs.h >>conftest.$ac_ext
7247cat >>conftest.$ac_ext <<_ACEOF
7248/* end confdefs.h. */
7249$ac_includes_default
7250int
7251main ()
7252{
7253static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7254test_array [0] = 0
7255
7256 ;
7257 return 0;
7258}
7259_ACEOF
7260rm -f conftest.$ac_objext
7261if { (ac_try="$ac_compile"
7262case "(($ac_try" in
7263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7264 *) ac_try_echo=$ac_try;;
7265esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007267 (eval "$ac_compile") 2>conftest.er1
7268 ac_status=$?
7269 grep -v '^ *+' conftest.er1 >conftest.err
7270 rm -f conftest.er1
7271 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007273 (exit $ac_status); } && {
7274 test -z "$ac_c_werror_flag" ||
7275 test ! -s conftest.err
7276 } && test -s conftest.$ac_objext; then
7277 cat >conftest.$ac_ext <<_ACEOF
7278/* confdefs.h. */
7279_ACEOF
7280cat confdefs.h >>conftest.$ac_ext
7281cat >>conftest.$ac_ext <<_ACEOF
7282/* end confdefs.h. */
7283$ac_includes_default
7284int
7285main ()
7286{
7287static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007288 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007289test_array [0] = 0
7290
7291 ;
7292 return 0;
7293}
7294_ACEOF
7295rm -f conftest.$ac_objext
7296if { (ac_try="$ac_compile"
7297case "(($ac_try" in
7298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7299 *) ac_try_echo=$ac_try;;
7300esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007302 (eval "$ac_compile") 2>conftest.er1
7303 ac_status=$?
7304 grep -v '^ *+' conftest.er1 >conftest.err
7305 rm -f conftest.er1
7306 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007308 (exit $ac_status); } && {
7309 test -z "$ac_c_werror_flag" ||
7310 test ! -s conftest.err
7311 } && test -s conftest.$ac_objext; then
7312 :
7313else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007314 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007315sed 's/^/| /' conftest.$ac_ext >&5
7316
7317 case $ac_type in
7318 int32_t) ac_cv_c_int32_t=yes ;;
7319 *) ac_cv_c_int32_t=$ac_type ;;
7320esac
7321
7322fi
7323
7324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7325else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007326 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007327sed 's/^/| /' conftest.$ac_ext >&5
7328
7329
7330fi
7331
7332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7333 test "$ac_cv_c_int32_t" != no && break
7334 done
7335fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007336{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7337echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007338 case $ac_cv_c_int32_t in #(
7339 no|yes) ;; #(
7340 *)
7341
7342cat >>confdefs.h <<_ACEOF
7343#define int32_t $ac_cv_c_int32_t
7344_ACEOF
7345;;
7346 esac
7347
7348
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007349 { echo "$as_me:$LINENO: checking for int64_t" >&5
7350echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007351if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007352 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007353else
7354 ac_cv_c_int64_t=no
7355 for ac_type in 'int64_t' 'int' 'long int' \
7356 'long long int' 'short int' 'signed char'; do
7357 cat >conftest.$ac_ext <<_ACEOF
7358/* confdefs.h. */
7359_ACEOF
7360cat confdefs.h >>conftest.$ac_ext
7361cat >>conftest.$ac_ext <<_ACEOF
7362/* end confdefs.h. */
7363$ac_includes_default
7364int
7365main ()
7366{
7367static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7368test_array [0] = 0
7369
7370 ;
7371 return 0;
7372}
7373_ACEOF
7374rm -f conftest.$ac_objext
7375if { (ac_try="$ac_compile"
7376case "(($ac_try" in
7377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7378 *) ac_try_echo=$ac_try;;
7379esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007381 (eval "$ac_compile") 2>conftest.er1
7382 ac_status=$?
7383 grep -v '^ *+' conftest.er1 >conftest.err
7384 rm -f conftest.er1
7385 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007387 (exit $ac_status); } && {
7388 test -z "$ac_c_werror_flag" ||
7389 test ! -s conftest.err
7390 } && test -s conftest.$ac_objext; then
7391 cat >conftest.$ac_ext <<_ACEOF
7392/* confdefs.h. */
7393_ACEOF
7394cat confdefs.h >>conftest.$ac_ext
7395cat >>conftest.$ac_ext <<_ACEOF
7396/* end confdefs.h. */
7397$ac_includes_default
7398int
7399main ()
7400{
7401static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007402 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007403test_array [0] = 0
7404
7405 ;
7406 return 0;
7407}
7408_ACEOF
7409rm -f conftest.$ac_objext
7410if { (ac_try="$ac_compile"
7411case "(($ac_try" in
7412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7413 *) ac_try_echo=$ac_try;;
7414esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007416 (eval "$ac_compile") 2>conftest.er1
7417 ac_status=$?
7418 grep -v '^ *+' conftest.er1 >conftest.err
7419 rm -f conftest.er1
7420 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007422 (exit $ac_status); } && {
7423 test -z "$ac_c_werror_flag" ||
7424 test ! -s conftest.err
7425 } && test -s conftest.$ac_objext; then
7426 :
7427else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007428 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007429sed 's/^/| /' conftest.$ac_ext >&5
7430
7431 case $ac_type in
7432 int64_t) ac_cv_c_int64_t=yes ;;
7433 *) ac_cv_c_int64_t=$ac_type ;;
7434esac
7435
7436fi
7437
7438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7439else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007440 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007441sed 's/^/| /' conftest.$ac_ext >&5
7442
7443
7444fi
7445
7446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7447 test "$ac_cv_c_int64_t" != no && break
7448 done
7449fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007450{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7451echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007452 case $ac_cv_c_int64_t in #(
7453 no|yes) ;; #(
7454 *)
7455
7456cat >>confdefs.h <<_ACEOF
7457#define int64_t $ac_cv_c_int64_t
7458_ACEOF
7459;;
7460 esac
7461
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007462{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7463echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007464if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007465 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007466else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007467 cat >conftest.$ac_ext <<_ACEOF
7468/* confdefs.h. */
7469_ACEOF
7470cat confdefs.h >>conftest.$ac_ext
7471cat >>conftest.$ac_ext <<_ACEOF
7472/* end confdefs.h. */
7473$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007474typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007475int
7476main ()
7477{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007478if ((ac__type_new_ *) 0)
7479 return 0;
7480if (sizeof (ac__type_new_))
7481 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007482 ;
7483 return 0;
7484}
7485_ACEOF
7486rm -f conftest.$ac_objext
7487if { (ac_try="$ac_compile"
7488case "(($ac_try" in
7489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7490 *) ac_try_echo=$ac_try;;
7491esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007493 (eval "$ac_compile") 2>conftest.er1
7494 ac_status=$?
7495 grep -v '^ *+' conftest.er1 >conftest.err
7496 rm -f conftest.er1
7497 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007499 (exit $ac_status); } && {
7500 test -z "$ac_c_werror_flag" ||
7501 test ! -s conftest.err
7502 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007503 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007504else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007505 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007506sed 's/^/| /' conftest.$ac_ext >&5
7507
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007508 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007509fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007510
7511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007512fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007513{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7514echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7515if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007516
7517cat >>confdefs.h <<\_ACEOF
7518#define HAVE_SSIZE_T 1
7519_ACEOF
7520
7521fi
7522
Jack Jansendd19cf82001-12-06 22:36:17 +00007523
Michael W. Hudson54241132001-12-07 15:38:26 +00007524# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007525# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007526{ echo "$as_me:$LINENO: checking for int" >&5
7527echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7528if test "${ac_cv_type_int+set}" = set; then
7529 echo $ECHO_N "(cached) $ECHO_C" >&6
7530else
7531 cat >conftest.$ac_ext <<_ACEOF
7532/* confdefs.h. */
7533_ACEOF
7534cat confdefs.h >>conftest.$ac_ext
7535cat >>conftest.$ac_ext <<_ACEOF
7536/* end confdefs.h. */
7537$ac_includes_default
7538typedef int ac__type_new_;
7539int
7540main ()
7541{
7542if ((ac__type_new_ *) 0)
7543 return 0;
7544if (sizeof (ac__type_new_))
7545 return 0;
7546 ;
7547 return 0;
7548}
7549_ACEOF
7550rm -f conftest.$ac_objext
7551if { (ac_try="$ac_compile"
7552case "(($ac_try" in
7553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7554 *) ac_try_echo=$ac_try;;
7555esac
7556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7557 (eval "$ac_compile") 2>conftest.er1
7558 ac_status=$?
7559 grep -v '^ *+' conftest.er1 >conftest.err
7560 rm -f conftest.er1
7561 cat conftest.err >&5
7562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7563 (exit $ac_status); } && {
7564 test -z "$ac_c_werror_flag" ||
7565 test ! -s conftest.err
7566 } && test -s conftest.$ac_objext; then
7567 ac_cv_type_int=yes
7568else
7569 echo "$as_me: failed program was:" >&5
7570sed 's/^/| /' conftest.$ac_ext >&5
7571
7572 ac_cv_type_int=no
7573fi
7574
7575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7576fi
7577{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7578echo "${ECHO_T}$ac_cv_type_int" >&6; }
7579
Martin v. Löwiseba40652007-08-30 20:10:57 +00007580# The cast to long int works around a bug in the HP C Compiler
7581# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7582# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7583# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007584{ echo "$as_me:$LINENO: checking size of int" >&5
7585echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007586if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007587 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007588else
Martin v. Löwis11437992002-04-12 09:54:03 +00007589 if test "$cross_compiling" = yes; then
7590 # Depending upon the size, compute the lo and hi bounds.
7591cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007592/* confdefs.h. */
7593_ACEOF
7594cat confdefs.h >>conftest.$ac_ext
7595cat >>conftest.$ac_ext <<_ACEOF
7596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007597$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007598 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007599int
7600main ()
7601{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007602static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007603test_array [0] = 0
7604
7605 ;
7606 return 0;
7607}
7608_ACEOF
7609rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007610if { (ac_try="$ac_compile"
7611case "(($ac_try" in
7612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7613 *) ac_try_echo=$ac_try;;
7614esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007616 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007618 grep -v '^ *+' conftest.er1 >conftest.err
7619 rm -f conftest.er1
7620 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007622 (exit $ac_status); } && {
7623 test -z "$ac_c_werror_flag" ||
7624 test ! -s conftest.err
7625 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007626 ac_lo=0 ac_mid=0
7627 while :; do
7628 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007629/* confdefs.h. */
7630_ACEOF
7631cat confdefs.h >>conftest.$ac_ext
7632cat >>conftest.$ac_ext <<_ACEOF
7633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007634$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007635 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007636int
7637main ()
7638{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007639static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007640test_array [0] = 0
7641
7642 ;
7643 return 0;
7644}
7645_ACEOF
7646rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007647if { (ac_try="$ac_compile"
7648case "(($ac_try" in
7649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7650 *) ac_try_echo=$ac_try;;
7651esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007653 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007654 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007655 grep -v '^ *+' conftest.er1 >conftest.err
7656 rm -f conftest.er1
7657 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007659 (exit $ac_status); } && {
7660 test -z "$ac_c_werror_flag" ||
7661 test ! -s conftest.err
7662 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007663 ac_hi=$ac_mid; break
7664else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007666sed 's/^/| /' conftest.$ac_ext >&5
7667
Martin v. Löwiseba40652007-08-30 20:10:57 +00007668 ac_lo=`expr $ac_mid + 1`
7669 if test $ac_lo -le $ac_mid; then
7670 ac_lo= ac_hi=
7671 break
7672 fi
7673 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007674fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007675
7676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007677 done
7678else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007680sed 's/^/| /' conftest.$ac_ext >&5
7681
Martin v. Löwiseba40652007-08-30 20:10:57 +00007682 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007683/* confdefs.h. */
7684_ACEOF
7685cat confdefs.h >>conftest.$ac_ext
7686cat >>conftest.$ac_ext <<_ACEOF
7687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007688$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007689 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007690int
7691main ()
7692{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007693static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007694test_array [0] = 0
7695
7696 ;
7697 return 0;
7698}
7699_ACEOF
7700rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007701if { (ac_try="$ac_compile"
7702case "(($ac_try" in
7703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7704 *) ac_try_echo=$ac_try;;
7705esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007707 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007709 grep -v '^ *+' conftest.er1 >conftest.err
7710 rm -f conftest.er1
7711 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007713 (exit $ac_status); } && {
7714 test -z "$ac_c_werror_flag" ||
7715 test ! -s conftest.err
7716 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007717 ac_hi=-1 ac_mid=-1
7718 while :; do
7719 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007720/* confdefs.h. */
7721_ACEOF
7722cat confdefs.h >>conftest.$ac_ext
7723cat >>conftest.$ac_ext <<_ACEOF
7724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007725$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007726 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007727int
7728main ()
7729{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007730static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007731test_array [0] = 0
7732
7733 ;
7734 return 0;
7735}
7736_ACEOF
7737rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007738if { (ac_try="$ac_compile"
7739case "(($ac_try" in
7740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7741 *) ac_try_echo=$ac_try;;
7742esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007744 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007746 grep -v '^ *+' conftest.er1 >conftest.err
7747 rm -f conftest.er1
7748 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007750 (exit $ac_status); } && {
7751 test -z "$ac_c_werror_flag" ||
7752 test ! -s conftest.err
7753 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007754 ac_lo=$ac_mid; break
7755else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007757sed 's/^/| /' conftest.$ac_ext >&5
7758
Martin v. Löwiseba40652007-08-30 20:10:57 +00007759 ac_hi=`expr '(' $ac_mid ')' - 1`
7760 if test $ac_mid -le $ac_hi; then
7761 ac_lo= ac_hi=
7762 break
7763 fi
7764 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007765fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007766
7767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007768 done
7769else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007771sed 's/^/| /' conftest.$ac_ext >&5
7772
Martin v. Löwiseba40652007-08-30 20:10:57 +00007773 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007775
7776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007777fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007778
7779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007780# Binary search between lo and hi bounds.
7781while test "x$ac_lo" != "x$ac_hi"; do
7782 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7783 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007784/* confdefs.h. */
7785_ACEOF
7786cat confdefs.h >>conftest.$ac_ext
7787cat >>conftest.$ac_ext <<_ACEOF
7788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007789$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007790 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007791int
7792main ()
7793{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007794static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007795test_array [0] = 0
7796
7797 ;
7798 return 0;
7799}
7800_ACEOF
7801rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007802if { (ac_try="$ac_compile"
7803case "(($ac_try" in
7804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7805 *) ac_try_echo=$ac_try;;
7806esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007808 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007809 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007810 grep -v '^ *+' conftest.er1 >conftest.err
7811 rm -f conftest.er1
7812 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007814 (exit $ac_status); } && {
7815 test -z "$ac_c_werror_flag" ||
7816 test ! -s conftest.err
7817 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007818 ac_hi=$ac_mid
7819else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007821sed 's/^/| /' conftest.$ac_ext >&5
7822
Martin v. Löwiseba40652007-08-30 20:10:57 +00007823 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007825
7826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007827done
7828case $ac_lo in
7829?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007830'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007831 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007832See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007833echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007834See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007835 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007836 else
7837 ac_cv_sizeof_int=0
7838 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007839esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007840else
Martin v. Löwis11437992002-04-12 09:54:03 +00007841 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007842/* confdefs.h. */
7843_ACEOF
7844cat confdefs.h >>conftest.$ac_ext
7845cat >>conftest.$ac_ext <<_ACEOF
7846/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007847$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007848 typedef int ac__type_sizeof_;
7849static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7850static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007851#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007852#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007853int
7854main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007855{
Martin v. Löwis11437992002-04-12 09:54:03 +00007856
7857 FILE *f = fopen ("conftest.val", "w");
7858 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007859 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007860 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007861 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007862 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007863 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007864 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007865 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007866 }
7867 else
7868 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007869 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007870 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007871 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007872 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007873 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007874 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007875
7876 ;
7877 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007878}
Martin v. Löwis11437992002-04-12 09:54:03 +00007879_ACEOF
7880rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007881if { (ac_try="$ac_link"
7882case "(($ac_try" in
7883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7884 *) ac_try_echo=$ac_try;;
7885esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007887 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007888 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007890 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007891 { (case "(($ac_try" in
7892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7893 *) ac_try_echo=$ac_try;;
7894esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007896 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007897 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007899 (exit $ac_status); }; }; then
7900 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007901else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007902 echo "$as_me: program exited with status $ac_status" >&5
7903echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007904sed 's/^/| /' conftest.$ac_ext >&5
7905
Martin v. Löwis11437992002-04-12 09:54:03 +00007906( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007907if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007908 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007909See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007910echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007911See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007912 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007913 else
7914 ac_cv_sizeof_int=0
7915 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007916fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007917rm -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 +00007918fi
7919rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007920fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007921{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7922echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007923
7924
7925
Martin v. Löwis11437992002-04-12 09:54:03 +00007926cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007927#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007928_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007929
7930
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007931{ echo "$as_me:$LINENO: checking for long" >&5
7932echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7933if test "${ac_cv_type_long+set}" = set; then
7934 echo $ECHO_N "(cached) $ECHO_C" >&6
7935else
7936 cat >conftest.$ac_ext <<_ACEOF
7937/* confdefs.h. */
7938_ACEOF
7939cat confdefs.h >>conftest.$ac_ext
7940cat >>conftest.$ac_ext <<_ACEOF
7941/* end confdefs.h. */
7942$ac_includes_default
7943typedef long ac__type_new_;
7944int
7945main ()
7946{
7947if ((ac__type_new_ *) 0)
7948 return 0;
7949if (sizeof (ac__type_new_))
7950 return 0;
7951 ;
7952 return 0;
7953}
7954_ACEOF
7955rm -f conftest.$ac_objext
7956if { (ac_try="$ac_compile"
7957case "(($ac_try" in
7958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7959 *) ac_try_echo=$ac_try;;
7960esac
7961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7962 (eval "$ac_compile") 2>conftest.er1
7963 ac_status=$?
7964 grep -v '^ *+' conftest.er1 >conftest.err
7965 rm -f conftest.er1
7966 cat conftest.err >&5
7967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7968 (exit $ac_status); } && {
7969 test -z "$ac_c_werror_flag" ||
7970 test ! -s conftest.err
7971 } && test -s conftest.$ac_objext; then
7972 ac_cv_type_long=yes
7973else
7974 echo "$as_me: failed program was:" >&5
7975sed 's/^/| /' conftest.$ac_ext >&5
7976
7977 ac_cv_type_long=no
7978fi
7979
7980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7981fi
7982{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7983echo "${ECHO_T}$ac_cv_type_long" >&6; }
7984
Martin v. Löwiseba40652007-08-30 20:10:57 +00007985# The cast to long int works around a bug in the HP C Compiler
7986# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7987# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7988# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007989{ echo "$as_me:$LINENO: checking size of long" >&5
7990echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007991if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007992 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007993else
Martin v. Löwis11437992002-04-12 09:54:03 +00007994 if test "$cross_compiling" = yes; then
7995 # Depending upon the size, compute the lo and hi bounds.
7996cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007997/* confdefs.h. */
7998_ACEOF
7999cat confdefs.h >>conftest.$ac_ext
8000cat >>conftest.$ac_ext <<_ACEOF
8001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008002$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008003 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008004int
8005main ()
8006{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008007static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008008test_array [0] = 0
8009
8010 ;
8011 return 0;
8012}
8013_ACEOF
8014rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008015if { (ac_try="$ac_compile"
8016case "(($ac_try" in
8017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8018 *) ac_try_echo=$ac_try;;
8019esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008021 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008023 grep -v '^ *+' conftest.er1 >conftest.err
8024 rm -f conftest.er1
8025 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008027 (exit $ac_status); } && {
8028 test -z "$ac_c_werror_flag" ||
8029 test ! -s conftest.err
8030 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008031 ac_lo=0 ac_mid=0
8032 while :; do
8033 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008034/* confdefs.h. */
8035_ACEOF
8036cat confdefs.h >>conftest.$ac_ext
8037cat >>conftest.$ac_ext <<_ACEOF
8038/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008039$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008040 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008041int
8042main ()
8043{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008044static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008045test_array [0] = 0
8046
8047 ;
8048 return 0;
8049}
8050_ACEOF
8051rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008052if { (ac_try="$ac_compile"
8053case "(($ac_try" in
8054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8055 *) ac_try_echo=$ac_try;;
8056esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008058 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008059 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008060 grep -v '^ *+' conftest.er1 >conftest.err
8061 rm -f conftest.er1
8062 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008064 (exit $ac_status); } && {
8065 test -z "$ac_c_werror_flag" ||
8066 test ! -s conftest.err
8067 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008068 ac_hi=$ac_mid; break
8069else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008070 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008071sed 's/^/| /' conftest.$ac_ext >&5
8072
Martin v. Löwiseba40652007-08-30 20:10:57 +00008073 ac_lo=`expr $ac_mid + 1`
8074 if test $ac_lo -le $ac_mid; then
8075 ac_lo= ac_hi=
8076 break
8077 fi
8078 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008080
8081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008082 done
8083else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008085sed 's/^/| /' conftest.$ac_ext >&5
8086
Martin v. Löwiseba40652007-08-30 20:10:57 +00008087 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008088/* confdefs.h. */
8089_ACEOF
8090cat confdefs.h >>conftest.$ac_ext
8091cat >>conftest.$ac_ext <<_ACEOF
8092/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008093$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008094 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008095int
8096main ()
8097{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008098static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008099test_array [0] = 0
8100
8101 ;
8102 return 0;
8103}
8104_ACEOF
8105rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008106if { (ac_try="$ac_compile"
8107case "(($ac_try" in
8108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8109 *) ac_try_echo=$ac_try;;
8110esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008112 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008114 grep -v '^ *+' conftest.er1 >conftest.err
8115 rm -f conftest.er1
8116 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008118 (exit $ac_status); } && {
8119 test -z "$ac_c_werror_flag" ||
8120 test ! -s conftest.err
8121 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008122 ac_hi=-1 ac_mid=-1
8123 while :; do
8124 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008125/* confdefs.h. */
8126_ACEOF
8127cat confdefs.h >>conftest.$ac_ext
8128cat >>conftest.$ac_ext <<_ACEOF
8129/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008130$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008131 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008132int
8133main ()
8134{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008135static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008136test_array [0] = 0
8137
8138 ;
8139 return 0;
8140}
8141_ACEOF
8142rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008143if { (ac_try="$ac_compile"
8144case "(($ac_try" in
8145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8146 *) ac_try_echo=$ac_try;;
8147esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008149 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008150 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008151 grep -v '^ *+' conftest.er1 >conftest.err
8152 rm -f conftest.er1
8153 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008155 (exit $ac_status); } && {
8156 test -z "$ac_c_werror_flag" ||
8157 test ! -s conftest.err
8158 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008159 ac_lo=$ac_mid; break
8160else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008162sed 's/^/| /' conftest.$ac_ext >&5
8163
Martin v. Löwiseba40652007-08-30 20:10:57 +00008164 ac_hi=`expr '(' $ac_mid ')' - 1`
8165 if test $ac_mid -le $ac_hi; then
8166 ac_lo= ac_hi=
8167 break
8168 fi
8169 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008171
8172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008173 done
8174else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008176sed 's/^/| /' conftest.$ac_ext >&5
8177
Martin v. Löwiseba40652007-08-30 20:10:57 +00008178 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008179fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008180
8181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008182fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008183
8184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008185# Binary search between lo and hi bounds.
8186while test "x$ac_lo" != "x$ac_hi"; do
8187 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8188 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008189/* confdefs.h. */
8190_ACEOF
8191cat confdefs.h >>conftest.$ac_ext
8192cat >>conftest.$ac_ext <<_ACEOF
8193/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008194$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008195 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008196int
8197main ()
8198{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008199static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008200test_array [0] = 0
8201
8202 ;
8203 return 0;
8204}
8205_ACEOF
8206rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008207if { (ac_try="$ac_compile"
8208case "(($ac_try" in
8209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8210 *) ac_try_echo=$ac_try;;
8211esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008213 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008214 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008215 grep -v '^ *+' conftest.er1 >conftest.err
8216 rm -f conftest.er1
8217 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008219 (exit $ac_status); } && {
8220 test -z "$ac_c_werror_flag" ||
8221 test ! -s conftest.err
8222 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008223 ac_hi=$ac_mid
8224else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008226sed 's/^/| /' conftest.$ac_ext >&5
8227
Martin v. Löwiseba40652007-08-30 20:10:57 +00008228 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008229fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008230
8231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008232done
8233case $ac_lo in
8234?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008235'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008236 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008237See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008238echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008239See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008240 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008241 else
8242 ac_cv_sizeof_long=0
8243 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008244esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008245else
Martin v. Löwis11437992002-04-12 09:54:03 +00008246 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008247/* confdefs.h. */
8248_ACEOF
8249cat confdefs.h >>conftest.$ac_ext
8250cat >>conftest.$ac_ext <<_ACEOF
8251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008252$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008253 typedef long ac__type_sizeof_;
8254static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8255static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008256#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008257#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008258int
8259main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008260{
Martin v. Löwis11437992002-04-12 09:54:03 +00008261
8262 FILE *f = fopen ("conftest.val", "w");
8263 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008264 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008265 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008266 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008267 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008268 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008269 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008270 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008271 }
8272 else
8273 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008274 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008275 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008276 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008277 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008278 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008279 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008280
8281 ;
8282 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008283}
Martin v. Löwis11437992002-04-12 09:54:03 +00008284_ACEOF
8285rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008286if { (ac_try="$ac_link"
8287case "(($ac_try" in
8288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8289 *) ac_try_echo=$ac_try;;
8290esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008292 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008293 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008295 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008296 { (case "(($ac_try" in
8297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8298 *) ac_try_echo=$ac_try;;
8299esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008301 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008302 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008304 (exit $ac_status); }; }; then
8305 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008306else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008307 echo "$as_me: program exited with status $ac_status" >&5
8308echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008309sed 's/^/| /' conftest.$ac_ext >&5
8310
Martin v. Löwis11437992002-04-12 09:54:03 +00008311( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008312if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008313 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008314See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008315echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008316See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008317 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008318 else
8319 ac_cv_sizeof_long=0
8320 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008322rm -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 +00008323fi
8324rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008325fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008326{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8327echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008328
8329
8330
Martin v. Löwis11437992002-04-12 09:54:03 +00008331cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008332#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008333_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008334
8335
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008336{ echo "$as_me:$LINENO: checking for void *" >&5
8337echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8338if test "${ac_cv_type_void_p+set}" = set; then
8339 echo $ECHO_N "(cached) $ECHO_C" >&6
8340else
8341 cat >conftest.$ac_ext <<_ACEOF
8342/* confdefs.h. */
8343_ACEOF
8344cat confdefs.h >>conftest.$ac_ext
8345cat >>conftest.$ac_ext <<_ACEOF
8346/* end confdefs.h. */
8347$ac_includes_default
8348typedef void * ac__type_new_;
8349int
8350main ()
8351{
8352if ((ac__type_new_ *) 0)
8353 return 0;
8354if (sizeof (ac__type_new_))
8355 return 0;
8356 ;
8357 return 0;
8358}
8359_ACEOF
8360rm -f conftest.$ac_objext
8361if { (ac_try="$ac_compile"
8362case "(($ac_try" in
8363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8364 *) ac_try_echo=$ac_try;;
8365esac
8366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8367 (eval "$ac_compile") 2>conftest.er1
8368 ac_status=$?
8369 grep -v '^ *+' conftest.er1 >conftest.err
8370 rm -f conftest.er1
8371 cat conftest.err >&5
8372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8373 (exit $ac_status); } && {
8374 test -z "$ac_c_werror_flag" ||
8375 test ! -s conftest.err
8376 } && test -s conftest.$ac_objext; then
8377 ac_cv_type_void_p=yes
8378else
8379 echo "$as_me: failed program was:" >&5
8380sed 's/^/| /' conftest.$ac_ext >&5
8381
8382 ac_cv_type_void_p=no
8383fi
8384
8385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8386fi
8387{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8388echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8389
Martin v. Löwiseba40652007-08-30 20:10:57 +00008390# The cast to long int works around a bug in the HP C Compiler
8391# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8392# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8393# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008394{ echo "$as_me:$LINENO: checking size of void *" >&5
8395echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008396if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008397 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008398else
Martin v. Löwis11437992002-04-12 09:54:03 +00008399 if test "$cross_compiling" = yes; then
8400 # Depending upon the size, compute the lo and hi bounds.
8401cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008402/* confdefs.h. */
8403_ACEOF
8404cat confdefs.h >>conftest.$ac_ext
8405cat >>conftest.$ac_ext <<_ACEOF
8406/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008407$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008408 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008409int
8410main ()
8411{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008412static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008413test_array [0] = 0
8414
8415 ;
8416 return 0;
8417}
8418_ACEOF
8419rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008420if { (ac_try="$ac_compile"
8421case "(($ac_try" in
8422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8423 *) ac_try_echo=$ac_try;;
8424esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008426 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008427 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008428 grep -v '^ *+' conftest.er1 >conftest.err
8429 rm -f conftest.er1
8430 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008432 (exit $ac_status); } && {
8433 test -z "$ac_c_werror_flag" ||
8434 test ! -s conftest.err
8435 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008436 ac_lo=0 ac_mid=0
8437 while :; do
8438 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008439/* confdefs.h. */
8440_ACEOF
8441cat confdefs.h >>conftest.$ac_ext
8442cat >>conftest.$ac_ext <<_ACEOF
8443/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008444$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008445 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008446int
8447main ()
8448{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008449static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008450test_array [0] = 0
8451
8452 ;
8453 return 0;
8454}
8455_ACEOF
8456rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008457if { (ac_try="$ac_compile"
8458case "(($ac_try" in
8459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8460 *) ac_try_echo=$ac_try;;
8461esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008463 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008464 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008465 grep -v '^ *+' conftest.er1 >conftest.err
8466 rm -f conftest.er1
8467 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008469 (exit $ac_status); } && {
8470 test -z "$ac_c_werror_flag" ||
8471 test ! -s conftest.err
8472 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008473 ac_hi=$ac_mid; break
8474else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008475 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008476sed 's/^/| /' conftest.$ac_ext >&5
8477
Martin v. Löwiseba40652007-08-30 20:10:57 +00008478 ac_lo=`expr $ac_mid + 1`
8479 if test $ac_lo -le $ac_mid; then
8480 ac_lo= ac_hi=
8481 break
8482 fi
8483 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008484fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008485
8486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008487 done
8488else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008489 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008490sed 's/^/| /' conftest.$ac_ext >&5
8491
Martin v. Löwiseba40652007-08-30 20:10:57 +00008492 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008493/* confdefs.h. */
8494_ACEOF
8495cat confdefs.h >>conftest.$ac_ext
8496cat >>conftest.$ac_ext <<_ACEOF
8497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008498$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008499 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008500int
8501main ()
8502{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008503static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008504test_array [0] = 0
8505
8506 ;
8507 return 0;
8508}
8509_ACEOF
8510rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008511if { (ac_try="$ac_compile"
8512case "(($ac_try" in
8513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8514 *) ac_try_echo=$ac_try;;
8515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008519 grep -v '^ *+' conftest.er1 >conftest.err
8520 rm -f conftest.er1
8521 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008523 (exit $ac_status); } && {
8524 test -z "$ac_c_werror_flag" ||
8525 test ! -s conftest.err
8526 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008527 ac_hi=-1 ac_mid=-1
8528 while :; do
8529 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008530/* confdefs.h. */
8531_ACEOF
8532cat confdefs.h >>conftest.$ac_ext
8533cat >>conftest.$ac_ext <<_ACEOF
8534/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008535$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008536 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008537int
8538main ()
8539{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008540static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008541test_array [0] = 0
8542
8543 ;
8544 return 0;
8545}
8546_ACEOF
8547rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008548if { (ac_try="$ac_compile"
8549case "(($ac_try" in
8550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8551 *) ac_try_echo=$ac_try;;
8552esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008554 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008555 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008556 grep -v '^ *+' conftest.er1 >conftest.err
8557 rm -f conftest.er1
8558 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008560 (exit $ac_status); } && {
8561 test -z "$ac_c_werror_flag" ||
8562 test ! -s conftest.err
8563 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008564 ac_lo=$ac_mid; break
8565else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008566 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008567sed 's/^/| /' conftest.$ac_ext >&5
8568
Martin v. Löwiseba40652007-08-30 20:10:57 +00008569 ac_hi=`expr '(' $ac_mid ')' - 1`
8570 if test $ac_mid -le $ac_hi; then
8571 ac_lo= ac_hi=
8572 break
8573 fi
8574 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008575fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008576
8577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 done
8579else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008581sed 's/^/| /' conftest.$ac_ext >&5
8582
Martin v. Löwiseba40652007-08-30 20:10:57 +00008583 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008584fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008585
8586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008588
8589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008590# Binary search between lo and hi bounds.
8591while test "x$ac_lo" != "x$ac_hi"; do
8592 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8593 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008594/* confdefs.h. */
8595_ACEOF
8596cat confdefs.h >>conftest.$ac_ext
8597cat >>conftest.$ac_ext <<_ACEOF
8598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008599$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008600 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008601int
8602main ()
8603{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008604static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008605test_array [0] = 0
8606
8607 ;
8608 return 0;
8609}
8610_ACEOF
8611rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008612if { (ac_try="$ac_compile"
8613case "(($ac_try" in
8614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8615 *) ac_try_echo=$ac_try;;
8616esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008618 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008619 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008620 grep -v '^ *+' conftest.er1 >conftest.err
8621 rm -f conftest.er1
8622 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008624 (exit $ac_status); } && {
8625 test -z "$ac_c_werror_flag" ||
8626 test ! -s conftest.err
8627 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008628 ac_hi=$ac_mid
8629else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008631sed 's/^/| /' conftest.$ac_ext >&5
8632
Martin v. Löwiseba40652007-08-30 20:10:57 +00008633 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008634fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008635
8636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008637done
8638case $ac_lo in
8639?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008640'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008641 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008642See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008643echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008644See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008645 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008646 else
8647 ac_cv_sizeof_void_p=0
8648 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008649esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008650else
Martin v. Löwis11437992002-04-12 09:54:03 +00008651 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008652/* confdefs.h. */
8653_ACEOF
8654cat confdefs.h >>conftest.$ac_ext
8655cat >>conftest.$ac_ext <<_ACEOF
8656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008657$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008658 typedef void * ac__type_sizeof_;
8659static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8660static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008661#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008662#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008663int
8664main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008665{
Martin v. Löwis11437992002-04-12 09:54:03 +00008666
8667 FILE *f = fopen ("conftest.val", "w");
8668 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008669 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008670 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008671 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008672 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008673 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008674 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008675 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008676 }
8677 else
8678 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008679 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008680 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008681 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008682 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008683 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008684 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008685
8686 ;
8687 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008688}
Martin v. Löwis11437992002-04-12 09:54:03 +00008689_ACEOF
8690rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008691if { (ac_try="$ac_link"
8692case "(($ac_try" in
8693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8694 *) ac_try_echo=$ac_try;;
8695esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008697 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008698 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008700 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008701 { (case "(($ac_try" in
8702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8703 *) ac_try_echo=$ac_try;;
8704esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008706 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008707 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008709 (exit $ac_status); }; }; then
8710 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008711else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008712 echo "$as_me: program exited with status $ac_status" >&5
8713echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008714sed 's/^/| /' conftest.$ac_ext >&5
8715
Martin v. Löwis11437992002-04-12 09:54:03 +00008716( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008717if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008718 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008719See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008720echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008721See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008722 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008723 else
8724 ac_cv_sizeof_void_p=0
8725 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008727rm -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 +00008728fi
8729rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008730fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008731{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8732echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008733
8734
8735
Martin v. Löwis11437992002-04-12 09:54:03 +00008736cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008737#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008738_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008739
8740
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008741{ echo "$as_me:$LINENO: checking for short" >&5
8742echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8743if test "${ac_cv_type_short+set}" = set; then
8744 echo $ECHO_N "(cached) $ECHO_C" >&6
8745else
8746 cat >conftest.$ac_ext <<_ACEOF
8747/* confdefs.h. */
8748_ACEOF
8749cat confdefs.h >>conftest.$ac_ext
8750cat >>conftest.$ac_ext <<_ACEOF
8751/* end confdefs.h. */
8752$ac_includes_default
8753typedef short ac__type_new_;
8754int
8755main ()
8756{
8757if ((ac__type_new_ *) 0)
8758 return 0;
8759if (sizeof (ac__type_new_))
8760 return 0;
8761 ;
8762 return 0;
8763}
8764_ACEOF
8765rm -f conftest.$ac_objext
8766if { (ac_try="$ac_compile"
8767case "(($ac_try" in
8768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8769 *) ac_try_echo=$ac_try;;
8770esac
8771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8772 (eval "$ac_compile") 2>conftest.er1
8773 ac_status=$?
8774 grep -v '^ *+' conftest.er1 >conftest.err
8775 rm -f conftest.er1
8776 cat conftest.err >&5
8777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8778 (exit $ac_status); } && {
8779 test -z "$ac_c_werror_flag" ||
8780 test ! -s conftest.err
8781 } && test -s conftest.$ac_objext; then
8782 ac_cv_type_short=yes
8783else
8784 echo "$as_me: failed program was:" >&5
8785sed 's/^/| /' conftest.$ac_ext >&5
8786
8787 ac_cv_type_short=no
8788fi
8789
8790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8791fi
8792{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8793echo "${ECHO_T}$ac_cv_type_short" >&6; }
8794
Martin v. Löwiseba40652007-08-30 20:10:57 +00008795# The cast to long int works around a bug in the HP C Compiler
8796# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8797# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8798# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008799{ echo "$as_me:$LINENO: checking size of short" >&5
8800echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008801if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008802 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008803else
Martin v. Löwis11437992002-04-12 09:54:03 +00008804 if test "$cross_compiling" = yes; then
8805 # Depending upon the size, compute the lo and hi bounds.
8806cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008807/* confdefs.h. */
8808_ACEOF
8809cat confdefs.h >>conftest.$ac_ext
8810cat >>conftest.$ac_ext <<_ACEOF
8811/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008812$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008813 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008814int
8815main ()
8816{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008817static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008818test_array [0] = 0
8819
8820 ;
8821 return 0;
8822}
8823_ACEOF
8824rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008825if { (ac_try="$ac_compile"
8826case "(($ac_try" in
8827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8828 *) ac_try_echo=$ac_try;;
8829esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008831 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008832 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008833 grep -v '^ *+' conftest.er1 >conftest.err
8834 rm -f conftest.er1
8835 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008837 (exit $ac_status); } && {
8838 test -z "$ac_c_werror_flag" ||
8839 test ! -s conftest.err
8840 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008841 ac_lo=0 ac_mid=0
8842 while :; do
8843 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008844/* confdefs.h. */
8845_ACEOF
8846cat confdefs.h >>conftest.$ac_ext
8847cat >>conftest.$ac_ext <<_ACEOF
8848/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008849$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008850 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008851int
8852main ()
8853{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008854static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008855test_array [0] = 0
8856
8857 ;
8858 return 0;
8859}
8860_ACEOF
8861rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008862if { (ac_try="$ac_compile"
8863case "(($ac_try" in
8864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8865 *) ac_try_echo=$ac_try;;
8866esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008868 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008870 grep -v '^ *+' conftest.er1 >conftest.err
8871 rm -f conftest.er1
8872 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008874 (exit $ac_status); } && {
8875 test -z "$ac_c_werror_flag" ||
8876 test ! -s conftest.err
8877 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008878 ac_hi=$ac_mid; break
8879else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008881sed 's/^/| /' conftest.$ac_ext >&5
8882
Martin v. Löwiseba40652007-08-30 20:10:57 +00008883 ac_lo=`expr $ac_mid + 1`
8884 if test $ac_lo -le $ac_mid; then
8885 ac_lo= ac_hi=
8886 break
8887 fi
8888 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008889fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008890
8891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 done
8893else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008895sed 's/^/| /' conftest.$ac_ext >&5
8896
Martin v. Löwiseba40652007-08-30 20:10:57 +00008897 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008898/* confdefs.h. */
8899_ACEOF
8900cat confdefs.h >>conftest.$ac_ext
8901cat >>conftest.$ac_ext <<_ACEOF
8902/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008903$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008904 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008905int
8906main ()
8907{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008908static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008909test_array [0] = 0
8910
8911 ;
8912 return 0;
8913}
8914_ACEOF
8915rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008916if { (ac_try="$ac_compile"
8917case "(($ac_try" in
8918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8919 *) ac_try_echo=$ac_try;;
8920esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008922 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008923 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008924 grep -v '^ *+' conftest.er1 >conftest.err
8925 rm -f conftest.er1
8926 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008928 (exit $ac_status); } && {
8929 test -z "$ac_c_werror_flag" ||
8930 test ! -s conftest.err
8931 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008932 ac_hi=-1 ac_mid=-1
8933 while :; do
8934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008935/* confdefs.h. */
8936_ACEOF
8937cat confdefs.h >>conftest.$ac_ext
8938cat >>conftest.$ac_ext <<_ACEOF
8939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008940$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008941 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008942int
8943main ()
8944{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008945static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008946test_array [0] = 0
8947
8948 ;
8949 return 0;
8950}
8951_ACEOF
8952rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008953if { (ac_try="$ac_compile"
8954case "(($ac_try" in
8955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8956 *) ac_try_echo=$ac_try;;
8957esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008959 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008961 grep -v '^ *+' conftest.er1 >conftest.err
8962 rm -f conftest.er1
8963 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008965 (exit $ac_status); } && {
8966 test -z "$ac_c_werror_flag" ||
8967 test ! -s conftest.err
8968 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008969 ac_lo=$ac_mid; break
8970else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008971 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008972sed 's/^/| /' conftest.$ac_ext >&5
8973
Martin v. Löwiseba40652007-08-30 20:10:57 +00008974 ac_hi=`expr '(' $ac_mid ')' - 1`
8975 if test $ac_mid -le $ac_hi; then
8976 ac_lo= ac_hi=
8977 break
8978 fi
8979 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008980fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008981
8982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008983 done
8984else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008985 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008986sed 's/^/| /' conftest.$ac_ext >&5
8987
Martin v. Löwiseba40652007-08-30 20:10:57 +00008988 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008990
8991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008992fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008993
8994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008995# Binary search between lo and hi bounds.
8996while test "x$ac_lo" != "x$ac_hi"; do
8997 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8998 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008999/* confdefs.h. */
9000_ACEOF
9001cat confdefs.h >>conftest.$ac_ext
9002cat >>conftest.$ac_ext <<_ACEOF
9003/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009004$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009005 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009006int
9007main ()
9008{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009009static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009010test_array [0] = 0
9011
9012 ;
9013 return 0;
9014}
9015_ACEOF
9016rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009017if { (ac_try="$ac_compile"
9018case "(($ac_try" in
9019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9020 *) ac_try_echo=$ac_try;;
9021esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009023 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009024 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009025 grep -v '^ *+' conftest.er1 >conftest.err
9026 rm -f conftest.er1
9027 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009029 (exit $ac_status); } && {
9030 test -z "$ac_c_werror_flag" ||
9031 test ! -s conftest.err
9032 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009033 ac_hi=$ac_mid
9034else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009035 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009036sed 's/^/| /' conftest.$ac_ext >&5
9037
Martin v. Löwiseba40652007-08-30 20:10:57 +00009038 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009039fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009040
9041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009042done
9043case $ac_lo in
9044?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009045'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009046 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009047See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009048echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009049See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009050 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009051 else
9052 ac_cv_sizeof_short=0
9053 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009054esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009055else
Martin v. Löwis11437992002-04-12 09:54:03 +00009056 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009057/* confdefs.h. */
9058_ACEOF
9059cat confdefs.h >>conftest.$ac_ext
9060cat >>conftest.$ac_ext <<_ACEOF
9061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009062$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009063 typedef short ac__type_sizeof_;
9064static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9065static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009066#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009067#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009068int
9069main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009070{
Martin v. Löwis11437992002-04-12 09:54:03 +00009071
9072 FILE *f = fopen ("conftest.val", "w");
9073 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009074 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009075 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009076 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009077 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009078 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009079 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009080 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009081 }
9082 else
9083 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009084 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009085 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009086 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009087 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009088 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009089 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009090
9091 ;
9092 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009093}
Martin v. Löwis11437992002-04-12 09:54:03 +00009094_ACEOF
9095rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009096if { (ac_try="$ac_link"
9097case "(($ac_try" in
9098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9099 *) ac_try_echo=$ac_try;;
9100esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009102 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009103 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009105 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009106 { (case "(($ac_try" in
9107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9108 *) ac_try_echo=$ac_try;;
9109esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009111 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009112 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009114 (exit $ac_status); }; }; then
9115 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009116else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009117 echo "$as_me: program exited with status $ac_status" >&5
9118echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009119sed 's/^/| /' conftest.$ac_ext >&5
9120
Martin v. Löwis11437992002-04-12 09:54:03 +00009121( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009122if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009123 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009124See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009125echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009126See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009127 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009128 else
9129 ac_cv_sizeof_short=0
9130 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009132rm -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 +00009133fi
9134rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009135fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009136{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9137echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009138
9139
9140
Martin v. Löwis11437992002-04-12 09:54:03 +00009141cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009142#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009143_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009144
9145
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009146{ echo "$as_me:$LINENO: checking for float" >&5
9147echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9148if test "${ac_cv_type_float+set}" = set; then
9149 echo $ECHO_N "(cached) $ECHO_C" >&6
9150else
9151 cat >conftest.$ac_ext <<_ACEOF
9152/* confdefs.h. */
9153_ACEOF
9154cat confdefs.h >>conftest.$ac_ext
9155cat >>conftest.$ac_ext <<_ACEOF
9156/* end confdefs.h. */
9157$ac_includes_default
9158typedef float ac__type_new_;
9159int
9160main ()
9161{
9162if ((ac__type_new_ *) 0)
9163 return 0;
9164if (sizeof (ac__type_new_))
9165 return 0;
9166 ;
9167 return 0;
9168}
9169_ACEOF
9170rm -f conftest.$ac_objext
9171if { (ac_try="$ac_compile"
9172case "(($ac_try" in
9173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9174 *) ac_try_echo=$ac_try;;
9175esac
9176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9177 (eval "$ac_compile") 2>conftest.er1
9178 ac_status=$?
9179 grep -v '^ *+' conftest.er1 >conftest.err
9180 rm -f conftest.er1
9181 cat conftest.err >&5
9182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9183 (exit $ac_status); } && {
9184 test -z "$ac_c_werror_flag" ||
9185 test ! -s conftest.err
9186 } && test -s conftest.$ac_objext; then
9187 ac_cv_type_float=yes
9188else
9189 echo "$as_me: failed program was:" >&5
9190sed 's/^/| /' conftest.$ac_ext >&5
9191
9192 ac_cv_type_float=no
9193fi
9194
9195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9196fi
9197{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9198echo "${ECHO_T}$ac_cv_type_float" >&6; }
9199
Martin v. Löwiseba40652007-08-30 20:10:57 +00009200# The cast to long int works around a bug in the HP C Compiler
9201# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9202# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9203# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009204{ echo "$as_me:$LINENO: checking size of float" >&5
9205echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009206if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009207 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009208else
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 if test "$cross_compiling" = yes; then
9210 # Depending upon the size, compute the lo and hi bounds.
9211cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009212/* confdefs.h. */
9213_ACEOF
9214cat confdefs.h >>conftest.$ac_ext
9215cat >>conftest.$ac_ext <<_ACEOF
9216/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009217$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009218 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009219int
9220main ()
9221{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009222static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009223test_array [0] = 0
9224
9225 ;
9226 return 0;
9227}
9228_ACEOF
9229rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009230if { (ac_try="$ac_compile"
9231case "(($ac_try" in
9232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9233 *) ac_try_echo=$ac_try;;
9234esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009236 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009237 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009238 grep -v '^ *+' conftest.er1 >conftest.err
9239 rm -f conftest.er1
9240 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009242 (exit $ac_status); } && {
9243 test -z "$ac_c_werror_flag" ||
9244 test ! -s conftest.err
9245 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009246 ac_lo=0 ac_mid=0
9247 while :; do
9248 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009249/* confdefs.h. */
9250_ACEOF
9251cat confdefs.h >>conftest.$ac_ext
9252cat >>conftest.$ac_ext <<_ACEOF
9253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009254$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009255 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009256int
9257main ()
9258{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009259static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009260test_array [0] = 0
9261
9262 ;
9263 return 0;
9264}
9265_ACEOF
9266rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009267if { (ac_try="$ac_compile"
9268case "(($ac_try" in
9269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9270 *) ac_try_echo=$ac_try;;
9271esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009273 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009274 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009275 grep -v '^ *+' conftest.er1 >conftest.err
9276 rm -f conftest.er1
9277 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009279 (exit $ac_status); } && {
9280 test -z "$ac_c_werror_flag" ||
9281 test ! -s conftest.err
9282 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009283 ac_hi=$ac_mid; break
9284else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009286sed 's/^/| /' conftest.$ac_ext >&5
9287
Martin v. Löwiseba40652007-08-30 20:10:57 +00009288 ac_lo=`expr $ac_mid + 1`
9289 if test $ac_lo -le $ac_mid; then
9290 ac_lo= ac_hi=
9291 break
9292 fi
9293 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009295
9296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009297 done
9298else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009300sed 's/^/| /' conftest.$ac_ext >&5
9301
Martin v. Löwiseba40652007-08-30 20:10:57 +00009302 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009303/* confdefs.h. */
9304_ACEOF
9305cat confdefs.h >>conftest.$ac_ext
9306cat >>conftest.$ac_ext <<_ACEOF
9307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009308$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009309 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009310int
9311main ()
9312{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009313static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009314test_array [0] = 0
9315
9316 ;
9317 return 0;
9318}
9319_ACEOF
9320rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009321if { (ac_try="$ac_compile"
9322case "(($ac_try" in
9323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9324 *) ac_try_echo=$ac_try;;
9325esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009327 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009329 grep -v '^ *+' conftest.er1 >conftest.err
9330 rm -f conftest.er1
9331 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009333 (exit $ac_status); } && {
9334 test -z "$ac_c_werror_flag" ||
9335 test ! -s conftest.err
9336 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009337 ac_hi=-1 ac_mid=-1
9338 while :; do
9339 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009340/* confdefs.h. */
9341_ACEOF
9342cat confdefs.h >>conftest.$ac_ext
9343cat >>conftest.$ac_ext <<_ACEOF
9344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009345$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009346 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009347int
9348main ()
9349{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009350static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009351test_array [0] = 0
9352
9353 ;
9354 return 0;
9355}
9356_ACEOF
9357rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009358if { (ac_try="$ac_compile"
9359case "(($ac_try" in
9360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9361 *) ac_try_echo=$ac_try;;
9362esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009364 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009365 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009366 grep -v '^ *+' conftest.er1 >conftest.err
9367 rm -f conftest.er1
9368 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009370 (exit $ac_status); } && {
9371 test -z "$ac_c_werror_flag" ||
9372 test ! -s conftest.err
9373 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009374 ac_lo=$ac_mid; break
9375else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009377sed 's/^/| /' conftest.$ac_ext >&5
9378
Martin v. Löwiseba40652007-08-30 20:10:57 +00009379 ac_hi=`expr '(' $ac_mid ')' - 1`
9380 if test $ac_mid -le $ac_hi; then
9381 ac_lo= ac_hi=
9382 break
9383 fi
9384 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009386
9387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009388 done
9389else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009391sed 's/^/| /' conftest.$ac_ext >&5
9392
Martin v. Löwiseba40652007-08-30 20:10:57 +00009393 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009394fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009395
9396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009398
9399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009400# Binary search between lo and hi bounds.
9401while test "x$ac_lo" != "x$ac_hi"; do
9402 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9403 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009404/* confdefs.h. */
9405_ACEOF
9406cat confdefs.h >>conftest.$ac_ext
9407cat >>conftest.$ac_ext <<_ACEOF
9408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009409$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009410 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009411int
9412main ()
9413{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009414static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009415test_array [0] = 0
9416
9417 ;
9418 return 0;
9419}
9420_ACEOF
9421rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009422if { (ac_try="$ac_compile"
9423case "(($ac_try" in
9424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9425 *) ac_try_echo=$ac_try;;
9426esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009428 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009429 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009430 grep -v '^ *+' conftest.er1 >conftest.err
9431 rm -f conftest.er1
9432 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009434 (exit $ac_status); } && {
9435 test -z "$ac_c_werror_flag" ||
9436 test ! -s conftest.err
9437 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009438 ac_hi=$ac_mid
9439else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009440 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009441sed 's/^/| /' conftest.$ac_ext >&5
9442
Martin v. Löwiseba40652007-08-30 20:10:57 +00009443 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009445
9446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009447done
9448case $ac_lo in
9449?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009450'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009451 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009452See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009453echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009454See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009455 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009456 else
9457 ac_cv_sizeof_float=0
9458 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009459esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009460else
Martin v. Löwis11437992002-04-12 09:54:03 +00009461 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009462/* confdefs.h. */
9463_ACEOF
9464cat confdefs.h >>conftest.$ac_ext
9465cat >>conftest.$ac_ext <<_ACEOF
9466/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009467$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009468 typedef float ac__type_sizeof_;
9469static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9470static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009471#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009472#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009473int
9474main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009475{
Martin v. Löwis11437992002-04-12 09:54:03 +00009476
9477 FILE *f = fopen ("conftest.val", "w");
9478 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009479 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009480 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009482 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009483 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009484 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009485 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009486 }
9487 else
9488 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009489 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009490 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009491 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009492 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009493 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009494 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009495
9496 ;
9497 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009498}
Martin v. Löwis11437992002-04-12 09:54:03 +00009499_ACEOF
9500rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009501if { (ac_try="$ac_link"
9502case "(($ac_try" in
9503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9504 *) ac_try_echo=$ac_try;;
9505esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009507 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009508 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009510 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009511 { (case "(($ac_try" in
9512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9513 *) ac_try_echo=$ac_try;;
9514esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009516 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009517 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009519 (exit $ac_status); }; }; then
9520 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009521else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009522 echo "$as_me: program exited with status $ac_status" >&5
9523echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009524sed 's/^/| /' conftest.$ac_ext >&5
9525
Martin v. Löwis11437992002-04-12 09:54:03 +00009526( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009527if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009528 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009529See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009530echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009531See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009532 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009533 else
9534 ac_cv_sizeof_float=0
9535 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009537rm -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 +00009538fi
9539rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009540fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009541{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9542echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009543
9544
9545
Martin v. Löwis11437992002-04-12 09:54:03 +00009546cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009547#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009548_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009549
9550
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009551{ echo "$as_me:$LINENO: checking for double" >&5
9552echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9553if test "${ac_cv_type_double+set}" = set; then
9554 echo $ECHO_N "(cached) $ECHO_C" >&6
9555else
9556 cat >conftest.$ac_ext <<_ACEOF
9557/* confdefs.h. */
9558_ACEOF
9559cat confdefs.h >>conftest.$ac_ext
9560cat >>conftest.$ac_ext <<_ACEOF
9561/* end confdefs.h. */
9562$ac_includes_default
9563typedef double ac__type_new_;
9564int
9565main ()
9566{
9567if ((ac__type_new_ *) 0)
9568 return 0;
9569if (sizeof (ac__type_new_))
9570 return 0;
9571 ;
9572 return 0;
9573}
9574_ACEOF
9575rm -f conftest.$ac_objext
9576if { (ac_try="$ac_compile"
9577case "(($ac_try" in
9578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9579 *) ac_try_echo=$ac_try;;
9580esac
9581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9582 (eval "$ac_compile") 2>conftest.er1
9583 ac_status=$?
9584 grep -v '^ *+' conftest.er1 >conftest.err
9585 rm -f conftest.er1
9586 cat conftest.err >&5
9587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9588 (exit $ac_status); } && {
9589 test -z "$ac_c_werror_flag" ||
9590 test ! -s conftest.err
9591 } && test -s conftest.$ac_objext; then
9592 ac_cv_type_double=yes
9593else
9594 echo "$as_me: failed program was:" >&5
9595sed 's/^/| /' conftest.$ac_ext >&5
9596
9597 ac_cv_type_double=no
9598fi
9599
9600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9601fi
9602{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9603echo "${ECHO_T}$ac_cv_type_double" >&6; }
9604
Martin v. Löwiseba40652007-08-30 20:10:57 +00009605# The cast to long int works around a bug in the HP C Compiler
9606# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9607# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9608# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009609{ echo "$as_me:$LINENO: checking size of double" >&5
9610echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009611if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009612 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009613else
Martin v. Löwis11437992002-04-12 09:54:03 +00009614 if test "$cross_compiling" = yes; then
9615 # Depending upon the size, compute the lo and hi bounds.
9616cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009617/* confdefs.h. */
9618_ACEOF
9619cat confdefs.h >>conftest.$ac_ext
9620cat >>conftest.$ac_ext <<_ACEOF
9621/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009622$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009623 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009624int
9625main ()
9626{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009627static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009628test_array [0] = 0
9629
9630 ;
9631 return 0;
9632}
9633_ACEOF
9634rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009635if { (ac_try="$ac_compile"
9636case "(($ac_try" in
9637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9638 *) ac_try_echo=$ac_try;;
9639esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009641 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009643 grep -v '^ *+' conftest.er1 >conftest.err
9644 rm -f conftest.er1
9645 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009647 (exit $ac_status); } && {
9648 test -z "$ac_c_werror_flag" ||
9649 test ! -s conftest.err
9650 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009651 ac_lo=0 ac_mid=0
9652 while :; do
9653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009654/* confdefs.h. */
9655_ACEOF
9656cat confdefs.h >>conftest.$ac_ext
9657cat >>conftest.$ac_ext <<_ACEOF
9658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009659$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009660 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009661int
9662main ()
9663{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009664static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009665test_array [0] = 0
9666
9667 ;
9668 return 0;
9669}
9670_ACEOF
9671rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009672if { (ac_try="$ac_compile"
9673case "(($ac_try" in
9674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9675 *) ac_try_echo=$ac_try;;
9676esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009678 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009679 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009680 grep -v '^ *+' conftest.er1 >conftest.err
9681 rm -f conftest.er1
9682 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009684 (exit $ac_status); } && {
9685 test -z "$ac_c_werror_flag" ||
9686 test ! -s conftest.err
9687 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 ac_hi=$ac_mid; break
9689else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009690 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009691sed 's/^/| /' conftest.$ac_ext >&5
9692
Martin v. Löwiseba40652007-08-30 20:10:57 +00009693 ac_lo=`expr $ac_mid + 1`
9694 if test $ac_lo -le $ac_mid; then
9695 ac_lo= ac_hi=
9696 break
9697 fi
9698 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009700
9701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009702 done
9703else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009705sed 's/^/| /' conftest.$ac_ext >&5
9706
Martin v. Löwiseba40652007-08-30 20:10:57 +00009707 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009708/* confdefs.h. */
9709_ACEOF
9710cat confdefs.h >>conftest.$ac_ext
9711cat >>conftest.$ac_ext <<_ACEOF
9712/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009713$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009714 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009715int
9716main ()
9717{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009718static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009719test_array [0] = 0
9720
9721 ;
9722 return 0;
9723}
9724_ACEOF
9725rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009726if { (ac_try="$ac_compile"
9727case "(($ac_try" in
9728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9729 *) ac_try_echo=$ac_try;;
9730esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009732 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009734 grep -v '^ *+' conftest.er1 >conftest.err
9735 rm -f conftest.er1
9736 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009738 (exit $ac_status); } && {
9739 test -z "$ac_c_werror_flag" ||
9740 test ! -s conftest.err
9741 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009742 ac_hi=-1 ac_mid=-1
9743 while :; do
9744 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009745/* confdefs.h. */
9746_ACEOF
9747cat confdefs.h >>conftest.$ac_ext
9748cat >>conftest.$ac_ext <<_ACEOF
9749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009750$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009751 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009752int
9753main ()
9754{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009755static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009756test_array [0] = 0
9757
9758 ;
9759 return 0;
9760}
9761_ACEOF
9762rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009763if { (ac_try="$ac_compile"
9764case "(($ac_try" in
9765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9766 *) ac_try_echo=$ac_try;;
9767esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009769 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009771 grep -v '^ *+' conftest.er1 >conftest.err
9772 rm -f conftest.er1
9773 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009775 (exit $ac_status); } && {
9776 test -z "$ac_c_werror_flag" ||
9777 test ! -s conftest.err
9778 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009779 ac_lo=$ac_mid; break
9780else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009782sed 's/^/| /' conftest.$ac_ext >&5
9783
Martin v. Löwiseba40652007-08-30 20:10:57 +00009784 ac_hi=`expr '(' $ac_mid ')' - 1`
9785 if test $ac_mid -le $ac_hi; then
9786 ac_lo= ac_hi=
9787 break
9788 fi
9789 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009790fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009791
9792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 done
9794else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009796sed 's/^/| /' conftest.$ac_ext >&5
9797
Martin v. Löwiseba40652007-08-30 20:10:57 +00009798 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009799fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009800
9801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009802fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009803
9804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009805# Binary search between lo and hi bounds.
9806while test "x$ac_lo" != "x$ac_hi"; do
9807 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9808 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009809/* confdefs.h. */
9810_ACEOF
9811cat confdefs.h >>conftest.$ac_ext
9812cat >>conftest.$ac_ext <<_ACEOF
9813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009814$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009815 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009816int
9817main ()
9818{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009819static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009820test_array [0] = 0
9821
9822 ;
9823 return 0;
9824}
9825_ACEOF
9826rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009827if { (ac_try="$ac_compile"
9828case "(($ac_try" in
9829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9830 *) ac_try_echo=$ac_try;;
9831esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009833 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009835 grep -v '^ *+' conftest.er1 >conftest.err
9836 rm -f conftest.er1
9837 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009839 (exit $ac_status); } && {
9840 test -z "$ac_c_werror_flag" ||
9841 test ! -s conftest.err
9842 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009843 ac_hi=$ac_mid
9844else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009846sed 's/^/| /' conftest.$ac_ext >&5
9847
Martin v. Löwiseba40652007-08-30 20:10:57 +00009848 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009850
9851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009852done
9853case $ac_lo in
9854?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009855'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009856 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009857See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009858echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009859See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009860 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009861 else
9862 ac_cv_sizeof_double=0
9863 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009864esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009865else
Martin v. Löwis11437992002-04-12 09:54:03 +00009866 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009867/* confdefs.h. */
9868_ACEOF
9869cat confdefs.h >>conftest.$ac_ext
9870cat >>conftest.$ac_ext <<_ACEOF
9871/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009872$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009873 typedef double ac__type_sizeof_;
9874static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9875static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009876#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009877#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009878int
9879main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009880{
Martin v. Löwis11437992002-04-12 09:54:03 +00009881
9882 FILE *f = fopen ("conftest.val", "w");
9883 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009884 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009885 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009886 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009887 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009888 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009889 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009890 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009891 }
9892 else
9893 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009894 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009895 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009896 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009897 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009898 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009899 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009900
9901 ;
9902 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009903}
Martin v. Löwis11437992002-04-12 09:54:03 +00009904_ACEOF
9905rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009906if { (ac_try="$ac_link"
9907case "(($ac_try" in
9908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9909 *) ac_try_echo=$ac_try;;
9910esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009912 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009913 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009915 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009916 { (case "(($ac_try" in
9917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9918 *) ac_try_echo=$ac_try;;
9919esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009921 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009922 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009924 (exit $ac_status); }; }; then
9925 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009926else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009927 echo "$as_me: program exited with status $ac_status" >&5
9928echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009929sed 's/^/| /' conftest.$ac_ext >&5
9930
Martin v. Löwis11437992002-04-12 09:54:03 +00009931( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009932if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009933 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009934See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009935echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009936See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009937 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009938 else
9939 ac_cv_sizeof_double=0
9940 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009942rm -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 +00009943fi
9944rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009945fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009946{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9947echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009948
9949
9950
Martin v. Löwis11437992002-04-12 09:54:03 +00009951cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009952#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009953_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009954
9955
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009956{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9957echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9958if test "${ac_cv_type_fpos_t+set}" = set; then
9959 echo $ECHO_N "(cached) $ECHO_C" >&6
9960else
9961 cat >conftest.$ac_ext <<_ACEOF
9962/* confdefs.h. */
9963_ACEOF
9964cat confdefs.h >>conftest.$ac_ext
9965cat >>conftest.$ac_ext <<_ACEOF
9966/* end confdefs.h. */
9967$ac_includes_default
9968typedef fpos_t ac__type_new_;
9969int
9970main ()
9971{
9972if ((ac__type_new_ *) 0)
9973 return 0;
9974if (sizeof (ac__type_new_))
9975 return 0;
9976 ;
9977 return 0;
9978}
9979_ACEOF
9980rm -f conftest.$ac_objext
9981if { (ac_try="$ac_compile"
9982case "(($ac_try" in
9983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9984 *) ac_try_echo=$ac_try;;
9985esac
9986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9987 (eval "$ac_compile") 2>conftest.er1
9988 ac_status=$?
9989 grep -v '^ *+' conftest.er1 >conftest.err
9990 rm -f conftest.er1
9991 cat conftest.err >&5
9992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9993 (exit $ac_status); } && {
9994 test -z "$ac_c_werror_flag" ||
9995 test ! -s conftest.err
9996 } && test -s conftest.$ac_objext; then
9997 ac_cv_type_fpos_t=yes
9998else
9999 echo "$as_me: failed program was:" >&5
10000sed 's/^/| /' conftest.$ac_ext >&5
10001
10002 ac_cv_type_fpos_t=no
10003fi
10004
10005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10006fi
10007{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10008echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10009
Martin v. Löwiseba40652007-08-30 20:10:57 +000010010# The cast to long int works around a bug in the HP C Compiler
10011# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10012# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10013# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010014{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10015echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010016if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010017 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010018else
Martin v. Löwis11437992002-04-12 09:54:03 +000010019 if test "$cross_compiling" = yes; then
10020 # Depending upon the size, compute the lo and hi bounds.
10021cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010022/* confdefs.h. */
10023_ACEOF
10024cat confdefs.h >>conftest.$ac_ext
10025cat >>conftest.$ac_ext <<_ACEOF
10026/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010027$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010028 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010029int
10030main ()
10031{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010032static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010033test_array [0] = 0
10034
10035 ;
10036 return 0;
10037}
10038_ACEOF
10039rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010040if { (ac_try="$ac_compile"
10041case "(($ac_try" in
10042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10043 *) ac_try_echo=$ac_try;;
10044esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010046 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010047 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010048 grep -v '^ *+' conftest.er1 >conftest.err
10049 rm -f conftest.er1
10050 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010052 (exit $ac_status); } && {
10053 test -z "$ac_c_werror_flag" ||
10054 test ! -s conftest.err
10055 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010056 ac_lo=0 ac_mid=0
10057 while :; do
10058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010059/* confdefs.h. */
10060_ACEOF
10061cat confdefs.h >>conftest.$ac_ext
10062cat >>conftest.$ac_ext <<_ACEOF
10063/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010064$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010065 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010066int
10067main ()
10068{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010069static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010070test_array [0] = 0
10071
10072 ;
10073 return 0;
10074}
10075_ACEOF
10076rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010077if { (ac_try="$ac_compile"
10078case "(($ac_try" in
10079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10080 *) ac_try_echo=$ac_try;;
10081esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010083 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010085 grep -v '^ *+' conftest.er1 >conftest.err
10086 rm -f conftest.er1
10087 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010089 (exit $ac_status); } && {
10090 test -z "$ac_c_werror_flag" ||
10091 test ! -s conftest.err
10092 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010093 ac_hi=$ac_mid; break
10094else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010096sed 's/^/| /' conftest.$ac_ext >&5
10097
Martin v. Löwiseba40652007-08-30 20:10:57 +000010098 ac_lo=`expr $ac_mid + 1`
10099 if test $ac_lo -le $ac_mid; then
10100 ac_lo= ac_hi=
10101 break
10102 fi
10103 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010104fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010105
10106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010107 done
10108else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010110sed 's/^/| /' conftest.$ac_ext >&5
10111
Martin v. Löwiseba40652007-08-30 20:10:57 +000010112 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010113/* confdefs.h. */
10114_ACEOF
10115cat confdefs.h >>conftest.$ac_ext
10116cat >>conftest.$ac_ext <<_ACEOF
10117/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010118$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010119 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010120int
10121main ()
10122{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010123static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010124test_array [0] = 0
10125
10126 ;
10127 return 0;
10128}
10129_ACEOF
10130rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010131if { (ac_try="$ac_compile"
10132case "(($ac_try" in
10133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10134 *) ac_try_echo=$ac_try;;
10135esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010137 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010138 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010139 grep -v '^ *+' conftest.er1 >conftest.err
10140 rm -f conftest.er1
10141 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010143 (exit $ac_status); } && {
10144 test -z "$ac_c_werror_flag" ||
10145 test ! -s conftest.err
10146 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010147 ac_hi=-1 ac_mid=-1
10148 while :; do
10149 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010150/* confdefs.h. */
10151_ACEOF
10152cat confdefs.h >>conftest.$ac_ext
10153cat >>conftest.$ac_ext <<_ACEOF
10154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010155$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010156 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010157int
10158main ()
10159{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010160static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010161test_array [0] = 0
10162
10163 ;
10164 return 0;
10165}
10166_ACEOF
10167rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010168if { (ac_try="$ac_compile"
10169case "(($ac_try" in
10170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10171 *) ac_try_echo=$ac_try;;
10172esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010174 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010176 grep -v '^ *+' conftest.er1 >conftest.err
10177 rm -f conftest.er1
10178 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010180 (exit $ac_status); } && {
10181 test -z "$ac_c_werror_flag" ||
10182 test ! -s conftest.err
10183 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010184 ac_lo=$ac_mid; break
10185else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010186 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010187sed 's/^/| /' conftest.$ac_ext >&5
10188
Martin v. Löwiseba40652007-08-30 20:10:57 +000010189 ac_hi=`expr '(' $ac_mid ')' - 1`
10190 if test $ac_mid -le $ac_hi; then
10191 ac_lo= ac_hi=
10192 break
10193 fi
10194 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010196
10197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010198 done
10199else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010200 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010201sed 's/^/| /' conftest.$ac_ext >&5
10202
Martin v. Löwiseba40652007-08-30 20:10:57 +000010203 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010204fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010205
10206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010207fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010208
10209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010210# Binary search between lo and hi bounds.
10211while test "x$ac_lo" != "x$ac_hi"; do
10212 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10213 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010214/* confdefs.h. */
10215_ACEOF
10216cat confdefs.h >>conftest.$ac_ext
10217cat >>conftest.$ac_ext <<_ACEOF
10218/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010219$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010220 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010221int
10222main ()
10223{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010224static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010225test_array [0] = 0
10226
10227 ;
10228 return 0;
10229}
10230_ACEOF
10231rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010232if { (ac_try="$ac_compile"
10233case "(($ac_try" in
10234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10235 *) ac_try_echo=$ac_try;;
10236esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010238 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010239 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010240 grep -v '^ *+' conftest.er1 >conftest.err
10241 rm -f conftest.er1
10242 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010244 (exit $ac_status); } && {
10245 test -z "$ac_c_werror_flag" ||
10246 test ! -s conftest.err
10247 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010248 ac_hi=$ac_mid
10249else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010250 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010251sed 's/^/| /' conftest.$ac_ext >&5
10252
Martin v. Löwiseba40652007-08-30 20:10:57 +000010253 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010254fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010255
10256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010257done
10258case $ac_lo in
10259?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010260'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010261 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010262See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010263echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010264See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010265 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010266 else
10267 ac_cv_sizeof_fpos_t=0
10268 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010269esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010270else
Martin v. Löwis11437992002-04-12 09:54:03 +000010271 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010272/* confdefs.h. */
10273_ACEOF
10274cat confdefs.h >>conftest.$ac_ext
10275cat >>conftest.$ac_ext <<_ACEOF
10276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010277$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010278 typedef fpos_t ac__type_sizeof_;
10279static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10280static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010281#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010282#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010283int
10284main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010285{
Martin v. Löwis11437992002-04-12 09:54:03 +000010286
10287 FILE *f = fopen ("conftest.val", "w");
10288 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010289 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010290 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010292 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010293 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010294 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010295 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010296 }
10297 else
10298 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010299 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010300 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010301 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010302 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010303 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010304 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010305
10306 ;
10307 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010308}
Martin v. Löwis11437992002-04-12 09:54:03 +000010309_ACEOF
10310rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010311if { (ac_try="$ac_link"
10312case "(($ac_try" in
10313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10314 *) ac_try_echo=$ac_try;;
10315esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010317 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010318 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010320 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010321 { (case "(($ac_try" in
10322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10323 *) ac_try_echo=$ac_try;;
10324esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010326 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010327 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010329 (exit $ac_status); }; }; then
10330 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010331else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010332 echo "$as_me: program exited with status $ac_status" >&5
10333echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010334sed 's/^/| /' conftest.$ac_ext >&5
10335
Martin v. Löwis11437992002-04-12 09:54:03 +000010336( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010337if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010338 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010339See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010340echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010341See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010342 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010343 else
10344 ac_cv_sizeof_fpos_t=0
10345 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010347rm -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 +000010348fi
10349rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010350fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010351{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10352echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010353
10354
10355
Martin v. Löwis11437992002-04-12 09:54:03 +000010356cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010357#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010358_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010359
Michael W. Hudson54241132001-12-07 15:38:26 +000010360
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010361{ echo "$as_me:$LINENO: checking for size_t" >&5
10362echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10363if test "${ac_cv_type_size_t+set}" = set; then
10364 echo $ECHO_N "(cached) $ECHO_C" >&6
10365else
10366 cat >conftest.$ac_ext <<_ACEOF
10367/* confdefs.h. */
10368_ACEOF
10369cat confdefs.h >>conftest.$ac_ext
10370cat >>conftest.$ac_ext <<_ACEOF
10371/* end confdefs.h. */
10372$ac_includes_default
10373typedef size_t ac__type_new_;
10374int
10375main ()
10376{
10377if ((ac__type_new_ *) 0)
10378 return 0;
10379if (sizeof (ac__type_new_))
10380 return 0;
10381 ;
10382 return 0;
10383}
10384_ACEOF
10385rm -f conftest.$ac_objext
10386if { (ac_try="$ac_compile"
10387case "(($ac_try" in
10388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10389 *) ac_try_echo=$ac_try;;
10390esac
10391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10392 (eval "$ac_compile") 2>conftest.er1
10393 ac_status=$?
10394 grep -v '^ *+' conftest.er1 >conftest.err
10395 rm -f conftest.er1
10396 cat conftest.err >&5
10397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10398 (exit $ac_status); } && {
10399 test -z "$ac_c_werror_flag" ||
10400 test ! -s conftest.err
10401 } && test -s conftest.$ac_objext; then
10402 ac_cv_type_size_t=yes
10403else
10404 echo "$as_me: failed program was:" >&5
10405sed 's/^/| /' conftest.$ac_ext >&5
10406
10407 ac_cv_type_size_t=no
10408fi
10409
10410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10411fi
10412{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10413echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10414
Martin v. Löwiseba40652007-08-30 20:10:57 +000010415# The cast to long int works around a bug in the HP C Compiler
10416# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10417# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10418# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010419{ echo "$as_me:$LINENO: checking size of size_t" >&5
10420echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010421if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010422 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010423else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010424 if test "$cross_compiling" = yes; then
10425 # Depending upon the size, compute the lo and hi bounds.
10426cat >conftest.$ac_ext <<_ACEOF
10427/* confdefs.h. */
10428_ACEOF
10429cat confdefs.h >>conftest.$ac_ext
10430cat >>conftest.$ac_ext <<_ACEOF
10431/* end confdefs.h. */
10432$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010433 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010434int
10435main ()
10436{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010437static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010438test_array [0] = 0
10439
10440 ;
10441 return 0;
10442}
10443_ACEOF
10444rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010445if { (ac_try="$ac_compile"
10446case "(($ac_try" in
10447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10448 *) ac_try_echo=$ac_try;;
10449esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010451 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010452 ac_status=$?
10453 grep -v '^ *+' conftest.er1 >conftest.err
10454 rm -f conftest.er1
10455 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010457 (exit $ac_status); } && {
10458 test -z "$ac_c_werror_flag" ||
10459 test ! -s conftest.err
10460 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010461 ac_lo=0 ac_mid=0
10462 while :; do
10463 cat >conftest.$ac_ext <<_ACEOF
10464/* confdefs.h. */
10465_ACEOF
10466cat confdefs.h >>conftest.$ac_ext
10467cat >>conftest.$ac_ext <<_ACEOF
10468/* end confdefs.h. */
10469$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010470 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010471int
10472main ()
10473{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010474static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010475test_array [0] = 0
10476
10477 ;
10478 return 0;
10479}
10480_ACEOF
10481rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010482if { (ac_try="$ac_compile"
10483case "(($ac_try" in
10484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10485 *) ac_try_echo=$ac_try;;
10486esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010488 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010489 ac_status=$?
10490 grep -v '^ *+' conftest.er1 >conftest.err
10491 rm -f conftest.er1
10492 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010494 (exit $ac_status); } && {
10495 test -z "$ac_c_werror_flag" ||
10496 test ! -s conftest.err
10497 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010498 ac_hi=$ac_mid; break
10499else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010500 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010501sed 's/^/| /' conftest.$ac_ext >&5
10502
Martin v. Löwiseba40652007-08-30 20:10:57 +000010503 ac_lo=`expr $ac_mid + 1`
10504 if test $ac_lo -le $ac_mid; then
10505 ac_lo= ac_hi=
10506 break
10507 fi
10508 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010509fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010510
10511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010512 done
10513else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010514 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010515sed 's/^/| /' conftest.$ac_ext >&5
10516
Martin v. Löwiseba40652007-08-30 20:10:57 +000010517 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010518/* confdefs.h. */
10519_ACEOF
10520cat confdefs.h >>conftest.$ac_ext
10521cat >>conftest.$ac_ext <<_ACEOF
10522/* end confdefs.h. */
10523$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010524 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010525int
10526main ()
10527{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010528static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010529test_array [0] = 0
10530
10531 ;
10532 return 0;
10533}
10534_ACEOF
10535rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010536if { (ac_try="$ac_compile"
10537case "(($ac_try" in
10538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10539 *) ac_try_echo=$ac_try;;
10540esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010542 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010543 ac_status=$?
10544 grep -v '^ *+' conftest.er1 >conftest.err
10545 rm -f conftest.er1
10546 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010548 (exit $ac_status); } && {
10549 test -z "$ac_c_werror_flag" ||
10550 test ! -s conftest.err
10551 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010552 ac_hi=-1 ac_mid=-1
10553 while :; do
10554 cat >conftest.$ac_ext <<_ACEOF
10555/* confdefs.h. */
10556_ACEOF
10557cat confdefs.h >>conftest.$ac_ext
10558cat >>conftest.$ac_ext <<_ACEOF
10559/* end confdefs.h. */
10560$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010561 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010562int
10563main ()
10564{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010565static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010566test_array [0] = 0
10567
10568 ;
10569 return 0;
10570}
10571_ACEOF
10572rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010573if { (ac_try="$ac_compile"
10574case "(($ac_try" in
10575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10576 *) ac_try_echo=$ac_try;;
10577esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010579 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010580 ac_status=$?
10581 grep -v '^ *+' conftest.er1 >conftest.err
10582 rm -f conftest.er1
10583 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010585 (exit $ac_status); } && {
10586 test -z "$ac_c_werror_flag" ||
10587 test ! -s conftest.err
10588 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010589 ac_lo=$ac_mid; break
10590else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010591 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010592sed 's/^/| /' conftest.$ac_ext >&5
10593
Martin v. Löwiseba40652007-08-30 20:10:57 +000010594 ac_hi=`expr '(' $ac_mid ')' - 1`
10595 if test $ac_mid -le $ac_hi; then
10596 ac_lo= ac_hi=
10597 break
10598 fi
10599 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010600fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010601
10602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010603 done
10604else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010605 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010606sed 's/^/| /' conftest.$ac_ext >&5
10607
Martin v. Löwiseba40652007-08-30 20:10:57 +000010608 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010610
10611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010613
10614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010615# Binary search between lo and hi bounds.
10616while test "x$ac_lo" != "x$ac_hi"; do
10617 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10618 cat >conftest.$ac_ext <<_ACEOF
10619/* confdefs.h. */
10620_ACEOF
10621cat confdefs.h >>conftest.$ac_ext
10622cat >>conftest.$ac_ext <<_ACEOF
10623/* end confdefs.h. */
10624$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010625 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010626int
10627main ()
10628{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010629static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010630test_array [0] = 0
10631
10632 ;
10633 return 0;
10634}
10635_ACEOF
10636rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010637if { (ac_try="$ac_compile"
10638case "(($ac_try" in
10639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10640 *) ac_try_echo=$ac_try;;
10641esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010643 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010644 ac_status=$?
10645 grep -v '^ *+' conftest.er1 >conftest.err
10646 rm -f conftest.er1
10647 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010649 (exit $ac_status); } && {
10650 test -z "$ac_c_werror_flag" ||
10651 test ! -s conftest.err
10652 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010653 ac_hi=$ac_mid
10654else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010655 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010656sed 's/^/| /' conftest.$ac_ext >&5
10657
Martin v. Löwiseba40652007-08-30 20:10:57 +000010658 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010659fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010660
10661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010662done
10663case $ac_lo in
10664?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010665'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010666 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010667See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010668echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010669See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010670 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010671 else
10672 ac_cv_sizeof_size_t=0
10673 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010674esac
10675else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010676 cat >conftest.$ac_ext <<_ACEOF
10677/* confdefs.h. */
10678_ACEOF
10679cat confdefs.h >>conftest.$ac_ext
10680cat >>conftest.$ac_ext <<_ACEOF
10681/* end confdefs.h. */
10682$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010683 typedef size_t ac__type_sizeof_;
10684static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10685static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010686#include <stdio.h>
10687#include <stdlib.h>
10688int
10689main ()
10690{
10691
10692 FILE *f = fopen ("conftest.val", "w");
10693 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010694 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010695 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010696 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010697 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010698 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010699 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010700 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010701 }
10702 else
10703 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010704 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010705 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010706 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010707 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010708 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010709 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010710
10711 ;
10712 return 0;
10713}
10714_ACEOF
10715rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010716if { (ac_try="$ac_link"
10717case "(($ac_try" in
10718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10719 *) ac_try_echo=$ac_try;;
10720esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010722 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010723 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010725 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010726 { (case "(($ac_try" in
10727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10728 *) ac_try_echo=$ac_try;;
10729esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010731 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010732 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010734 (exit $ac_status); }; }; then
10735 ac_cv_sizeof_size_t=`cat conftest.val`
10736else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010737 echo "$as_me: program exited with status $ac_status" >&5
10738echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010739sed 's/^/| /' conftest.$ac_ext >&5
10740
10741( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010742if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010743 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010744See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010745echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010746See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010747 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010748 else
10749 ac_cv_sizeof_size_t=0
10750 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010752rm -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 +000010753fi
10754rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010755fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010756{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10757echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010758
10759
10760
Martin v. Löwis18e16552006-02-15 17:27:45 +000010761cat >>confdefs.h <<_ACEOF
10762#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10763_ACEOF
10764
10765
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010766{ echo "$as_me:$LINENO: checking for pid_t" >&5
10767echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10768if test "${ac_cv_type_pid_t+set}" = set; then
10769 echo $ECHO_N "(cached) $ECHO_C" >&6
10770else
10771 cat >conftest.$ac_ext <<_ACEOF
10772/* confdefs.h. */
10773_ACEOF
10774cat confdefs.h >>conftest.$ac_ext
10775cat >>conftest.$ac_ext <<_ACEOF
10776/* end confdefs.h. */
10777$ac_includes_default
10778typedef pid_t ac__type_new_;
10779int
10780main ()
10781{
10782if ((ac__type_new_ *) 0)
10783 return 0;
10784if (sizeof (ac__type_new_))
10785 return 0;
10786 ;
10787 return 0;
10788}
10789_ACEOF
10790rm -f conftest.$ac_objext
10791if { (ac_try="$ac_compile"
10792case "(($ac_try" in
10793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10794 *) ac_try_echo=$ac_try;;
10795esac
10796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10797 (eval "$ac_compile") 2>conftest.er1
10798 ac_status=$?
10799 grep -v '^ *+' conftest.er1 >conftest.err
10800 rm -f conftest.er1
10801 cat conftest.err >&5
10802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10803 (exit $ac_status); } && {
10804 test -z "$ac_c_werror_flag" ||
10805 test ! -s conftest.err
10806 } && test -s conftest.$ac_objext; then
10807 ac_cv_type_pid_t=yes
10808else
10809 echo "$as_me: failed program was:" >&5
10810sed 's/^/| /' conftest.$ac_ext >&5
10811
10812 ac_cv_type_pid_t=no
10813fi
10814
10815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10816fi
10817{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10818echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10819
Christian Heimes951cc0f2008-01-31 23:08:23 +000010820# The cast to long int works around a bug in the HP C Compiler
10821# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10822# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10823# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010824{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10825echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010826if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010827 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010828else
10829 if test "$cross_compiling" = yes; then
10830 # Depending upon the size, compute the lo and hi bounds.
10831cat >conftest.$ac_ext <<_ACEOF
10832/* confdefs.h. */
10833_ACEOF
10834cat confdefs.h >>conftest.$ac_ext
10835cat >>conftest.$ac_ext <<_ACEOF
10836/* end confdefs.h. */
10837$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010838 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010839int
10840main ()
10841{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010842static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010843test_array [0] = 0
10844
10845 ;
10846 return 0;
10847}
10848_ACEOF
10849rm -f conftest.$ac_objext
10850if { (ac_try="$ac_compile"
10851case "(($ac_try" in
10852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10853 *) ac_try_echo=$ac_try;;
10854esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010856 (eval "$ac_compile") 2>conftest.er1
10857 ac_status=$?
10858 grep -v '^ *+' conftest.er1 >conftest.err
10859 rm -f conftest.er1
10860 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010862 (exit $ac_status); } && {
10863 test -z "$ac_c_werror_flag" ||
10864 test ! -s conftest.err
10865 } && test -s conftest.$ac_objext; then
10866 ac_lo=0 ac_mid=0
10867 while :; do
10868 cat >conftest.$ac_ext <<_ACEOF
10869/* confdefs.h. */
10870_ACEOF
10871cat confdefs.h >>conftest.$ac_ext
10872cat >>conftest.$ac_ext <<_ACEOF
10873/* end confdefs.h. */
10874$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010875 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010876int
10877main ()
10878{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010879static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010880test_array [0] = 0
10881
10882 ;
10883 return 0;
10884}
10885_ACEOF
10886rm -f conftest.$ac_objext
10887if { (ac_try="$ac_compile"
10888case "(($ac_try" in
10889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10890 *) ac_try_echo=$ac_try;;
10891esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010893 (eval "$ac_compile") 2>conftest.er1
10894 ac_status=$?
10895 grep -v '^ *+' conftest.er1 >conftest.err
10896 rm -f conftest.er1
10897 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010899 (exit $ac_status); } && {
10900 test -z "$ac_c_werror_flag" ||
10901 test ! -s conftest.err
10902 } && test -s conftest.$ac_objext; then
10903 ac_hi=$ac_mid; break
10904else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010905 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010906sed 's/^/| /' conftest.$ac_ext >&5
10907
10908 ac_lo=`expr $ac_mid + 1`
10909 if test $ac_lo -le $ac_mid; then
10910 ac_lo= ac_hi=
10911 break
10912 fi
10913 ac_mid=`expr 2 '*' $ac_mid + 1`
10914fi
10915
10916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10917 done
10918else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010919 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010920sed 's/^/| /' conftest.$ac_ext >&5
10921
10922 cat >conftest.$ac_ext <<_ACEOF
10923/* confdefs.h. */
10924_ACEOF
10925cat confdefs.h >>conftest.$ac_ext
10926cat >>conftest.$ac_ext <<_ACEOF
10927/* end confdefs.h. */
10928$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010929 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010930int
10931main ()
10932{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010933static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010934test_array [0] = 0
10935
10936 ;
10937 return 0;
10938}
10939_ACEOF
10940rm -f conftest.$ac_objext
10941if { (ac_try="$ac_compile"
10942case "(($ac_try" in
10943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10944 *) ac_try_echo=$ac_try;;
10945esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010947 (eval "$ac_compile") 2>conftest.er1
10948 ac_status=$?
10949 grep -v '^ *+' conftest.er1 >conftest.err
10950 rm -f conftest.er1
10951 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010953 (exit $ac_status); } && {
10954 test -z "$ac_c_werror_flag" ||
10955 test ! -s conftest.err
10956 } && test -s conftest.$ac_objext; then
10957 ac_hi=-1 ac_mid=-1
10958 while :; do
10959 cat >conftest.$ac_ext <<_ACEOF
10960/* confdefs.h. */
10961_ACEOF
10962cat confdefs.h >>conftest.$ac_ext
10963cat >>conftest.$ac_ext <<_ACEOF
10964/* end confdefs.h. */
10965$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010966 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010967int
10968main ()
10969{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010970static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010971test_array [0] = 0
10972
10973 ;
10974 return 0;
10975}
10976_ACEOF
10977rm -f conftest.$ac_objext
10978if { (ac_try="$ac_compile"
10979case "(($ac_try" in
10980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10981 *) ac_try_echo=$ac_try;;
10982esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010984 (eval "$ac_compile") 2>conftest.er1
10985 ac_status=$?
10986 grep -v '^ *+' conftest.er1 >conftest.err
10987 rm -f conftest.er1
10988 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010990 (exit $ac_status); } && {
10991 test -z "$ac_c_werror_flag" ||
10992 test ! -s conftest.err
10993 } && test -s conftest.$ac_objext; then
10994 ac_lo=$ac_mid; break
10995else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010996 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010997sed 's/^/| /' conftest.$ac_ext >&5
10998
10999 ac_hi=`expr '(' $ac_mid ')' - 1`
11000 if test $ac_mid -le $ac_hi; then
11001 ac_lo= ac_hi=
11002 break
11003 fi
11004 ac_mid=`expr 2 '*' $ac_mid`
11005fi
11006
11007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11008 done
11009else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011010 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011011sed 's/^/| /' conftest.$ac_ext >&5
11012
11013 ac_lo= ac_hi=
11014fi
11015
11016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11017fi
11018
11019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11020# Binary search between lo and hi bounds.
11021while test "x$ac_lo" != "x$ac_hi"; do
11022 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11023 cat >conftest.$ac_ext <<_ACEOF
11024/* confdefs.h. */
11025_ACEOF
11026cat confdefs.h >>conftest.$ac_ext
11027cat >>conftest.$ac_ext <<_ACEOF
11028/* end confdefs.h. */
11029$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011030 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011031int
11032main ()
11033{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011034static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011035test_array [0] = 0
11036
11037 ;
11038 return 0;
11039}
11040_ACEOF
11041rm -f conftest.$ac_objext
11042if { (ac_try="$ac_compile"
11043case "(($ac_try" in
11044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11045 *) ac_try_echo=$ac_try;;
11046esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011048 (eval "$ac_compile") 2>conftest.er1
11049 ac_status=$?
11050 grep -v '^ *+' conftest.er1 >conftest.err
11051 rm -f conftest.er1
11052 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011054 (exit $ac_status); } && {
11055 test -z "$ac_c_werror_flag" ||
11056 test ! -s conftest.err
11057 } && test -s conftest.$ac_objext; then
11058 ac_hi=$ac_mid
11059else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011060 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011061sed 's/^/| /' conftest.$ac_ext >&5
11062
11063 ac_lo=`expr '(' $ac_mid ')' + 1`
11064fi
11065
11066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11067done
11068case $ac_lo in
11069?*) ac_cv_sizeof_pid_t=$ac_lo;;
11070'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011071 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011072See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011073echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011074See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011075 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011076 else
11077 ac_cv_sizeof_pid_t=0
11078 fi ;;
11079esac
11080else
11081 cat >conftest.$ac_ext <<_ACEOF
11082/* confdefs.h. */
11083_ACEOF
11084cat confdefs.h >>conftest.$ac_ext
11085cat >>conftest.$ac_ext <<_ACEOF
11086/* end confdefs.h. */
11087$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011088 typedef pid_t ac__type_sizeof_;
11089static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11090static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011091#include <stdio.h>
11092#include <stdlib.h>
11093int
11094main ()
11095{
11096
11097 FILE *f = fopen ("conftest.val", "w");
11098 if (! f)
11099 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011100 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011101 {
11102 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011103 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011104 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011105 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011106 }
11107 else
11108 {
11109 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011110 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011111 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011112 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011113 }
11114 return ferror (f) || fclose (f) != 0;
11115
11116 ;
11117 return 0;
11118}
11119_ACEOF
11120rm -f conftest$ac_exeext
11121if { (ac_try="$ac_link"
11122case "(($ac_try" in
11123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11124 *) ac_try_echo=$ac_try;;
11125esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011127 (eval "$ac_link") 2>&5
11128 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011130 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11131 { (case "(($ac_try" in
11132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11133 *) ac_try_echo=$ac_try;;
11134esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011136 (eval "$ac_try") 2>&5
11137 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011139 (exit $ac_status); }; }; then
11140 ac_cv_sizeof_pid_t=`cat conftest.val`
11141else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011142 echo "$as_me: program exited with status $ac_status" >&5
11143echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011144sed 's/^/| /' conftest.$ac_ext >&5
11145
11146( exit $ac_status )
11147if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011148 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011149See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011150echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011151See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011152 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011153 else
11154 ac_cv_sizeof_pid_t=0
11155 fi
11156fi
11157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11158fi
11159rm -f conftest.val
11160fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011161{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11162echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011163
11164
11165
11166cat >>confdefs.h <<_ACEOF
11167#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11168_ACEOF
11169
11170
Michael W. Hudson54241132001-12-07 15:38:26 +000011171
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011172{ echo "$as_me:$LINENO: checking for long long support" >&5
11173echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011174have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011175cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011176/* confdefs.h. */
11177_ACEOF
11178cat confdefs.h >>conftest.$ac_ext
11179cat >>conftest.$ac_ext <<_ACEOF
11180/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011181
Martin v. Löwis11437992002-04-12 09:54:03 +000011182int
11183main ()
11184{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011185long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011186 ;
11187 return 0;
11188}
11189_ACEOF
11190rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011191if { (ac_try="$ac_compile"
11192case "(($ac_try" in
11193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11194 *) ac_try_echo=$ac_try;;
11195esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011197 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011198 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011199 grep -v '^ *+' conftest.er1 >conftest.err
11200 rm -f conftest.er1
11201 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011203 (exit $ac_status); } && {
11204 test -z "$ac_c_werror_flag" ||
11205 test ! -s conftest.err
11206 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011207
11208
11209cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011210#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011211_ACEOF
11212
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011213 have_long_long=yes
11214
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011215else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011217sed 's/^/| /' conftest.$ac_ext >&5
11218
Martin v. Löwiseba40652007-08-30 20:10:57 +000011219
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011221
11222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011223{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11224echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011225if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011226{ echo "$as_me:$LINENO: checking for long long" >&5
11227echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11228if test "${ac_cv_type_long_long+set}" = set; then
11229 echo $ECHO_N "(cached) $ECHO_C" >&6
11230else
11231 cat >conftest.$ac_ext <<_ACEOF
11232/* confdefs.h. */
11233_ACEOF
11234cat confdefs.h >>conftest.$ac_ext
11235cat >>conftest.$ac_ext <<_ACEOF
11236/* end confdefs.h. */
11237$ac_includes_default
11238typedef long long ac__type_new_;
11239int
11240main ()
11241{
11242if ((ac__type_new_ *) 0)
11243 return 0;
11244if (sizeof (ac__type_new_))
11245 return 0;
11246 ;
11247 return 0;
11248}
11249_ACEOF
11250rm -f conftest.$ac_objext
11251if { (ac_try="$ac_compile"
11252case "(($ac_try" in
11253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11254 *) ac_try_echo=$ac_try;;
11255esac
11256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11257 (eval "$ac_compile") 2>conftest.er1
11258 ac_status=$?
11259 grep -v '^ *+' conftest.er1 >conftest.err
11260 rm -f conftest.er1
11261 cat conftest.err >&5
11262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11263 (exit $ac_status); } && {
11264 test -z "$ac_c_werror_flag" ||
11265 test ! -s conftest.err
11266 } && test -s conftest.$ac_objext; then
11267 ac_cv_type_long_long=yes
11268else
11269 echo "$as_me: failed program was:" >&5
11270sed 's/^/| /' conftest.$ac_ext >&5
11271
11272 ac_cv_type_long_long=no
11273fi
11274
11275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11276fi
11277{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11278echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11279
Martin v. Löwiseba40652007-08-30 20:10:57 +000011280# The cast to long int works around a bug in the HP C Compiler
11281# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11282# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11283# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011284{ echo "$as_me:$LINENO: checking size of long long" >&5
11285echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011286if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011287 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011288else
Martin v. Löwis11437992002-04-12 09:54:03 +000011289 if test "$cross_compiling" = yes; then
11290 # Depending upon the size, compute the lo and hi bounds.
11291cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011292/* confdefs.h. */
11293_ACEOF
11294cat confdefs.h >>conftest.$ac_ext
11295cat >>conftest.$ac_ext <<_ACEOF
11296/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011297$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011298 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011299int
11300main ()
11301{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011302static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011303test_array [0] = 0
11304
11305 ;
11306 return 0;
11307}
11308_ACEOF
11309rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011310if { (ac_try="$ac_compile"
11311case "(($ac_try" in
11312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11313 *) ac_try_echo=$ac_try;;
11314esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011316 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011317 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011318 grep -v '^ *+' conftest.er1 >conftest.err
11319 rm -f conftest.er1
11320 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011322 (exit $ac_status); } && {
11323 test -z "$ac_c_werror_flag" ||
11324 test ! -s conftest.err
11325 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011326 ac_lo=0 ac_mid=0
11327 while :; do
11328 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011329/* confdefs.h. */
11330_ACEOF
11331cat confdefs.h >>conftest.$ac_ext
11332cat >>conftest.$ac_ext <<_ACEOF
11333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011334$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011335 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011336int
11337main ()
11338{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011339static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011340test_array [0] = 0
11341
11342 ;
11343 return 0;
11344}
11345_ACEOF
11346rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011347if { (ac_try="$ac_compile"
11348case "(($ac_try" in
11349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11350 *) ac_try_echo=$ac_try;;
11351esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011353 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011355 grep -v '^ *+' conftest.er1 >conftest.err
11356 rm -f conftest.er1
11357 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011359 (exit $ac_status); } && {
11360 test -z "$ac_c_werror_flag" ||
11361 test ! -s conftest.err
11362 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011363 ac_hi=$ac_mid; break
11364else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011366sed 's/^/| /' conftest.$ac_ext >&5
11367
Martin v. Löwiseba40652007-08-30 20:10:57 +000011368 ac_lo=`expr $ac_mid + 1`
11369 if test $ac_lo -le $ac_mid; then
11370 ac_lo= ac_hi=
11371 break
11372 fi
11373 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011374fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011375
11376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011377 done
11378else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011379 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011380sed 's/^/| /' conftest.$ac_ext >&5
11381
Martin v. Löwiseba40652007-08-30 20:10:57 +000011382 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011383/* confdefs.h. */
11384_ACEOF
11385cat confdefs.h >>conftest.$ac_ext
11386cat >>conftest.$ac_ext <<_ACEOF
11387/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011388$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011389 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011390int
11391main ()
11392{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011393static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011394test_array [0] = 0
11395
11396 ;
11397 return 0;
11398}
11399_ACEOF
11400rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011401if { (ac_try="$ac_compile"
11402case "(($ac_try" in
11403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11404 *) ac_try_echo=$ac_try;;
11405esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011407 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011408 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011409 grep -v '^ *+' conftest.er1 >conftest.err
11410 rm -f conftest.er1
11411 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011413 (exit $ac_status); } && {
11414 test -z "$ac_c_werror_flag" ||
11415 test ! -s conftest.err
11416 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011417 ac_hi=-1 ac_mid=-1
11418 while :; do
11419 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011420/* confdefs.h. */
11421_ACEOF
11422cat confdefs.h >>conftest.$ac_ext
11423cat >>conftest.$ac_ext <<_ACEOF
11424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011425$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011426 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011427int
11428main ()
11429{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011430static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011431test_array [0] = 0
11432
11433 ;
11434 return 0;
11435}
11436_ACEOF
11437rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011438if { (ac_try="$ac_compile"
11439case "(($ac_try" in
11440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11441 *) ac_try_echo=$ac_try;;
11442esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011444 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011445 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011446 grep -v '^ *+' conftest.er1 >conftest.err
11447 rm -f conftest.er1
11448 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011450 (exit $ac_status); } && {
11451 test -z "$ac_c_werror_flag" ||
11452 test ! -s conftest.err
11453 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011454 ac_lo=$ac_mid; break
11455else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011456 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011457sed 's/^/| /' conftest.$ac_ext >&5
11458
Martin v. Löwiseba40652007-08-30 20:10:57 +000011459 ac_hi=`expr '(' $ac_mid ')' - 1`
11460 if test $ac_mid -le $ac_hi; then
11461 ac_lo= ac_hi=
11462 break
11463 fi
11464 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011466
11467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011468 done
11469else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011470 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011471sed 's/^/| /' conftest.$ac_ext >&5
11472
Martin v. Löwiseba40652007-08-30 20:10:57 +000011473 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011475
11476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011478
11479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011480# Binary search between lo and hi bounds.
11481while test "x$ac_lo" != "x$ac_hi"; do
11482 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11483 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011484/* confdefs.h. */
11485_ACEOF
11486cat confdefs.h >>conftest.$ac_ext
11487cat >>conftest.$ac_ext <<_ACEOF
11488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011489$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011490 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011491int
11492main ()
11493{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011494static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011495test_array [0] = 0
11496
11497 ;
11498 return 0;
11499}
11500_ACEOF
11501rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011502if { (ac_try="$ac_compile"
11503case "(($ac_try" in
11504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11505 *) ac_try_echo=$ac_try;;
11506esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011508 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011509 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011510 grep -v '^ *+' conftest.er1 >conftest.err
11511 rm -f conftest.er1
11512 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011514 (exit $ac_status); } && {
11515 test -z "$ac_c_werror_flag" ||
11516 test ! -s conftest.err
11517 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011518 ac_hi=$ac_mid
11519else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011521sed 's/^/| /' conftest.$ac_ext >&5
11522
Martin v. Löwiseba40652007-08-30 20:10:57 +000011523 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011524fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011525
11526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011527done
11528case $ac_lo in
11529?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011530'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011531 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011532See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011533echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011534See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011535 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011536 else
11537 ac_cv_sizeof_long_long=0
11538 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011539esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011540else
Martin v. Löwis11437992002-04-12 09:54:03 +000011541 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011542/* confdefs.h. */
11543_ACEOF
11544cat confdefs.h >>conftest.$ac_ext
11545cat >>conftest.$ac_ext <<_ACEOF
11546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011547$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011548 typedef long long ac__type_sizeof_;
11549static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11550static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011551#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011552#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011553int
11554main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011555{
Martin v. Löwis11437992002-04-12 09:54:03 +000011556
11557 FILE *f = fopen ("conftest.val", "w");
11558 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011559 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011560 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011561 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011562 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011563 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011564 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011565 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011566 }
11567 else
11568 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011569 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011570 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011571 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011572 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011573 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011574 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011575
11576 ;
11577 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011578}
Martin v. Löwis11437992002-04-12 09:54:03 +000011579_ACEOF
11580rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011581if { (ac_try="$ac_link"
11582case "(($ac_try" in
11583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11584 *) ac_try_echo=$ac_try;;
11585esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011587 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011588 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011590 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011591 { (case "(($ac_try" in
11592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11593 *) ac_try_echo=$ac_try;;
11594esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011596 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011597 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011599 (exit $ac_status); }; }; then
11600 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011601else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011602 echo "$as_me: program exited with status $ac_status" >&5
11603echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011604sed 's/^/| /' conftest.$ac_ext >&5
11605
Martin v. Löwis11437992002-04-12 09:54:03 +000011606( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011607if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011608 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011609See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011610echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011611See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011612 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011613 else
11614 ac_cv_sizeof_long_long=0
11615 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011617rm -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 +000011618fi
11619rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011620fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011621{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11622echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011623
11624
11625
Martin v. Löwis11437992002-04-12 09:54:03 +000011626cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011627#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011628_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011629
Michael W. Hudson54241132001-12-07 15:38:26 +000011630
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011631fi
11632
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011633{ echo "$as_me:$LINENO: checking for long double support" >&5
11634echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011635have_long_double=no
11636cat >conftest.$ac_ext <<_ACEOF
11637/* confdefs.h. */
11638_ACEOF
11639cat confdefs.h >>conftest.$ac_ext
11640cat >>conftest.$ac_ext <<_ACEOF
11641/* end confdefs.h. */
11642
11643int
11644main ()
11645{
11646long double x; x = (long double)0.;
11647 ;
11648 return 0;
11649}
11650_ACEOF
11651rm -f conftest.$ac_objext
11652if { (ac_try="$ac_compile"
11653case "(($ac_try" in
11654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11655 *) ac_try_echo=$ac_try;;
11656esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011658 (eval "$ac_compile") 2>conftest.er1
11659 ac_status=$?
11660 grep -v '^ *+' conftest.er1 >conftest.err
11661 rm -f conftest.er1
11662 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011664 (exit $ac_status); } && {
11665 test -z "$ac_c_werror_flag" ||
11666 test ! -s conftest.err
11667 } && test -s conftest.$ac_objext; then
11668
11669
11670cat >>confdefs.h <<\_ACEOF
11671#define HAVE_LONG_DOUBLE 1
11672_ACEOF
11673
11674 have_long_double=yes
11675
11676else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011677 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011678sed 's/^/| /' conftest.$ac_ext >&5
11679
11680
11681fi
11682
11683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011684{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11685echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011686if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011687{ echo "$as_me:$LINENO: checking for long double" >&5
11688echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11689if test "${ac_cv_type_long_double+set}" = set; then
11690 echo $ECHO_N "(cached) $ECHO_C" >&6
11691else
11692 cat >conftest.$ac_ext <<_ACEOF
11693/* confdefs.h. */
11694_ACEOF
11695cat confdefs.h >>conftest.$ac_ext
11696cat >>conftest.$ac_ext <<_ACEOF
11697/* end confdefs.h. */
11698$ac_includes_default
11699typedef long double ac__type_new_;
11700int
11701main ()
11702{
11703if ((ac__type_new_ *) 0)
11704 return 0;
11705if (sizeof (ac__type_new_))
11706 return 0;
11707 ;
11708 return 0;
11709}
11710_ACEOF
11711rm -f conftest.$ac_objext
11712if { (ac_try="$ac_compile"
11713case "(($ac_try" in
11714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11715 *) ac_try_echo=$ac_try;;
11716esac
11717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11718 (eval "$ac_compile") 2>conftest.er1
11719 ac_status=$?
11720 grep -v '^ *+' conftest.er1 >conftest.err
11721 rm -f conftest.er1
11722 cat conftest.err >&5
11723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11724 (exit $ac_status); } && {
11725 test -z "$ac_c_werror_flag" ||
11726 test ! -s conftest.err
11727 } && test -s conftest.$ac_objext; then
11728 ac_cv_type_long_double=yes
11729else
11730 echo "$as_me: failed program was:" >&5
11731sed 's/^/| /' conftest.$ac_ext >&5
11732
11733 ac_cv_type_long_double=no
11734fi
11735
11736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11737fi
11738{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11739echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11740
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011741# The cast to long int works around a bug in the HP C Compiler
11742# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11743# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11744# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011745{ echo "$as_me:$LINENO: checking size of long double" >&5
11746echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011747if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011748 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011749else
11750 if test "$cross_compiling" = yes; then
11751 # Depending upon the size, compute the lo and hi bounds.
11752cat >conftest.$ac_ext <<_ACEOF
11753/* confdefs.h. */
11754_ACEOF
11755cat confdefs.h >>conftest.$ac_ext
11756cat >>conftest.$ac_ext <<_ACEOF
11757/* end confdefs.h. */
11758$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011759 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011760int
11761main ()
11762{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011763static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011764test_array [0] = 0
11765
11766 ;
11767 return 0;
11768}
11769_ACEOF
11770rm -f conftest.$ac_objext
11771if { (ac_try="$ac_compile"
11772case "(($ac_try" in
11773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11774 *) ac_try_echo=$ac_try;;
11775esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011777 (eval "$ac_compile") 2>conftest.er1
11778 ac_status=$?
11779 grep -v '^ *+' conftest.er1 >conftest.err
11780 rm -f conftest.er1
11781 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011783 (exit $ac_status); } && {
11784 test -z "$ac_c_werror_flag" ||
11785 test ! -s conftest.err
11786 } && test -s conftest.$ac_objext; then
11787 ac_lo=0 ac_mid=0
11788 while :; do
11789 cat >conftest.$ac_ext <<_ACEOF
11790/* confdefs.h. */
11791_ACEOF
11792cat confdefs.h >>conftest.$ac_ext
11793cat >>conftest.$ac_ext <<_ACEOF
11794/* end confdefs.h. */
11795$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011796 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011797int
11798main ()
11799{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011800static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011801test_array [0] = 0
11802
11803 ;
11804 return 0;
11805}
11806_ACEOF
11807rm -f conftest.$ac_objext
11808if { (ac_try="$ac_compile"
11809case "(($ac_try" in
11810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11811 *) ac_try_echo=$ac_try;;
11812esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011814 (eval "$ac_compile") 2>conftest.er1
11815 ac_status=$?
11816 grep -v '^ *+' conftest.er1 >conftest.err
11817 rm -f conftest.er1
11818 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011820 (exit $ac_status); } && {
11821 test -z "$ac_c_werror_flag" ||
11822 test ! -s conftest.err
11823 } && test -s conftest.$ac_objext; then
11824 ac_hi=$ac_mid; break
11825else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011826 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011827sed 's/^/| /' conftest.$ac_ext >&5
11828
11829 ac_lo=`expr $ac_mid + 1`
11830 if test $ac_lo -le $ac_mid; then
11831 ac_lo= ac_hi=
11832 break
11833 fi
11834 ac_mid=`expr 2 '*' $ac_mid + 1`
11835fi
11836
11837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11838 done
11839else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011840 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011841sed 's/^/| /' conftest.$ac_ext >&5
11842
11843 cat >conftest.$ac_ext <<_ACEOF
11844/* confdefs.h. */
11845_ACEOF
11846cat confdefs.h >>conftest.$ac_ext
11847cat >>conftest.$ac_ext <<_ACEOF
11848/* end confdefs.h. */
11849$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011850 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011851int
11852main ()
11853{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011854static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011855test_array [0] = 0
11856
11857 ;
11858 return 0;
11859}
11860_ACEOF
11861rm -f conftest.$ac_objext
11862if { (ac_try="$ac_compile"
11863case "(($ac_try" in
11864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11865 *) ac_try_echo=$ac_try;;
11866esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011868 (eval "$ac_compile") 2>conftest.er1
11869 ac_status=$?
11870 grep -v '^ *+' conftest.er1 >conftest.err
11871 rm -f conftest.er1
11872 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011874 (exit $ac_status); } && {
11875 test -z "$ac_c_werror_flag" ||
11876 test ! -s conftest.err
11877 } && test -s conftest.$ac_objext; then
11878 ac_hi=-1 ac_mid=-1
11879 while :; do
11880 cat >conftest.$ac_ext <<_ACEOF
11881/* confdefs.h. */
11882_ACEOF
11883cat confdefs.h >>conftest.$ac_ext
11884cat >>conftest.$ac_ext <<_ACEOF
11885/* end confdefs.h. */
11886$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011887 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011888int
11889main ()
11890{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011891static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011892test_array [0] = 0
11893
11894 ;
11895 return 0;
11896}
11897_ACEOF
11898rm -f conftest.$ac_objext
11899if { (ac_try="$ac_compile"
11900case "(($ac_try" in
11901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11902 *) ac_try_echo=$ac_try;;
11903esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011905 (eval "$ac_compile") 2>conftest.er1
11906 ac_status=$?
11907 grep -v '^ *+' conftest.er1 >conftest.err
11908 rm -f conftest.er1
11909 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011911 (exit $ac_status); } && {
11912 test -z "$ac_c_werror_flag" ||
11913 test ! -s conftest.err
11914 } && test -s conftest.$ac_objext; then
11915 ac_lo=$ac_mid; break
11916else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011917 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011918sed 's/^/| /' conftest.$ac_ext >&5
11919
11920 ac_hi=`expr '(' $ac_mid ')' - 1`
11921 if test $ac_mid -le $ac_hi; then
11922 ac_lo= ac_hi=
11923 break
11924 fi
11925 ac_mid=`expr 2 '*' $ac_mid`
11926fi
11927
11928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11929 done
11930else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011931 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011932sed 's/^/| /' conftest.$ac_ext >&5
11933
11934 ac_lo= ac_hi=
11935fi
11936
11937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11938fi
11939
11940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11941# Binary search between lo and hi bounds.
11942while test "x$ac_lo" != "x$ac_hi"; do
11943 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11944 cat >conftest.$ac_ext <<_ACEOF
11945/* confdefs.h. */
11946_ACEOF
11947cat confdefs.h >>conftest.$ac_ext
11948cat >>conftest.$ac_ext <<_ACEOF
11949/* end confdefs.h. */
11950$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011951 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011952int
11953main ()
11954{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011955static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011956test_array [0] = 0
11957
11958 ;
11959 return 0;
11960}
11961_ACEOF
11962rm -f conftest.$ac_objext
11963if { (ac_try="$ac_compile"
11964case "(($ac_try" in
11965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11966 *) ac_try_echo=$ac_try;;
11967esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011969 (eval "$ac_compile") 2>conftest.er1
11970 ac_status=$?
11971 grep -v '^ *+' conftest.er1 >conftest.err
11972 rm -f conftest.er1
11973 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011975 (exit $ac_status); } && {
11976 test -z "$ac_c_werror_flag" ||
11977 test ! -s conftest.err
11978 } && test -s conftest.$ac_objext; then
11979 ac_hi=$ac_mid
11980else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011981 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011982sed 's/^/| /' conftest.$ac_ext >&5
11983
11984 ac_lo=`expr '(' $ac_mid ')' + 1`
11985fi
11986
11987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11988done
11989case $ac_lo in
11990?*) ac_cv_sizeof_long_double=$ac_lo;;
11991'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011992 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011993See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011994echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011995See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011996 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011997 else
11998 ac_cv_sizeof_long_double=0
11999 fi ;;
12000esac
12001else
12002 cat >conftest.$ac_ext <<_ACEOF
12003/* confdefs.h. */
12004_ACEOF
12005cat confdefs.h >>conftest.$ac_ext
12006cat >>conftest.$ac_ext <<_ACEOF
12007/* end confdefs.h. */
12008$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012009 typedef long double ac__type_sizeof_;
12010static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12011static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012012#include <stdio.h>
12013#include <stdlib.h>
12014int
12015main ()
12016{
12017
12018 FILE *f = fopen ("conftest.val", "w");
12019 if (! f)
12020 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012021 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012022 {
12023 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012024 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012025 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012026 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012027 }
12028 else
12029 {
12030 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012031 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012032 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012033 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012034 }
12035 return ferror (f) || fclose (f) != 0;
12036
12037 ;
12038 return 0;
12039}
12040_ACEOF
12041rm -f conftest$ac_exeext
12042if { (ac_try="$ac_link"
12043case "(($ac_try" in
12044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12045 *) ac_try_echo=$ac_try;;
12046esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012048 (eval "$ac_link") 2>&5
12049 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012051 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12052 { (case "(($ac_try" in
12053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12054 *) ac_try_echo=$ac_try;;
12055esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012057 (eval "$ac_try") 2>&5
12058 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012060 (exit $ac_status); }; }; then
12061 ac_cv_sizeof_long_double=`cat conftest.val`
12062else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012063 echo "$as_me: program exited with status $ac_status" >&5
12064echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012065sed 's/^/| /' conftest.$ac_ext >&5
12066
12067( exit $ac_status )
12068if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012069 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012070See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012071echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012072See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012073 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012074 else
12075 ac_cv_sizeof_long_double=0
12076 fi
12077fi
12078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12079fi
12080rm -f conftest.val
12081fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012082{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12083echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012084
12085
12086
12087cat >>confdefs.h <<_ACEOF
12088#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12089_ACEOF
12090
12091
12092fi
12093
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012094{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12095echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012096have_c99_bool=no
12097cat >conftest.$ac_ext <<_ACEOF
12098/* confdefs.h. */
12099_ACEOF
12100cat confdefs.h >>conftest.$ac_ext
12101cat >>conftest.$ac_ext <<_ACEOF
12102/* end confdefs.h. */
12103
12104int
12105main ()
12106{
12107_Bool x; x = (_Bool)0;
12108 ;
12109 return 0;
12110}
12111_ACEOF
12112rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012113if { (ac_try="$ac_compile"
12114case "(($ac_try" in
12115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12116 *) ac_try_echo=$ac_try;;
12117esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012119 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012120 ac_status=$?
12121 grep -v '^ *+' conftest.er1 >conftest.err
12122 rm -f conftest.er1
12123 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012125 (exit $ac_status); } && {
12126 test -z "$ac_c_werror_flag" ||
12127 test ! -s conftest.err
12128 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012129
12130
12131cat >>confdefs.h <<\_ACEOF
12132#define HAVE_C99_BOOL 1
12133_ACEOF
12134
12135 have_c99_bool=yes
12136
12137else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012138 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012139sed 's/^/| /' conftest.$ac_ext >&5
12140
Martin v. Löwiseba40652007-08-30 20:10:57 +000012141
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012143
12144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012145{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12146echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012147if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012148{ echo "$as_me:$LINENO: checking for _Bool" >&5
12149echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12150if test "${ac_cv_type__Bool+set}" = set; then
12151 echo $ECHO_N "(cached) $ECHO_C" >&6
12152else
12153 cat >conftest.$ac_ext <<_ACEOF
12154/* confdefs.h. */
12155_ACEOF
12156cat confdefs.h >>conftest.$ac_ext
12157cat >>conftest.$ac_ext <<_ACEOF
12158/* end confdefs.h. */
12159$ac_includes_default
12160typedef _Bool ac__type_new_;
12161int
12162main ()
12163{
12164if ((ac__type_new_ *) 0)
12165 return 0;
12166if (sizeof (ac__type_new_))
12167 return 0;
12168 ;
12169 return 0;
12170}
12171_ACEOF
12172rm -f conftest.$ac_objext
12173if { (ac_try="$ac_compile"
12174case "(($ac_try" in
12175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12176 *) ac_try_echo=$ac_try;;
12177esac
12178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12179 (eval "$ac_compile") 2>conftest.er1
12180 ac_status=$?
12181 grep -v '^ *+' conftest.er1 >conftest.err
12182 rm -f conftest.er1
12183 cat conftest.err >&5
12184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12185 (exit $ac_status); } && {
12186 test -z "$ac_c_werror_flag" ||
12187 test ! -s conftest.err
12188 } && test -s conftest.$ac_objext; then
12189 ac_cv_type__Bool=yes
12190else
12191 echo "$as_me: failed program was:" >&5
12192sed 's/^/| /' conftest.$ac_ext >&5
12193
12194 ac_cv_type__Bool=no
12195fi
12196
12197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12198fi
12199{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12200echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12201
Martin v. Löwiseba40652007-08-30 20:10:57 +000012202# The cast to long int works around a bug in the HP C Compiler
12203# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12204# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12205# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012206{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12207echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012208if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012209 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012210else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012211 if test "$cross_compiling" = yes; then
12212 # Depending upon the size, compute the lo and hi bounds.
12213cat >conftest.$ac_ext <<_ACEOF
12214/* confdefs.h. */
12215_ACEOF
12216cat confdefs.h >>conftest.$ac_ext
12217cat >>conftest.$ac_ext <<_ACEOF
12218/* end confdefs.h. */
12219$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012220 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012221int
12222main ()
12223{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012224static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012225test_array [0] = 0
12226
12227 ;
12228 return 0;
12229}
12230_ACEOF
12231rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012232if { (ac_try="$ac_compile"
12233case "(($ac_try" in
12234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12235 *) ac_try_echo=$ac_try;;
12236esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012238 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012239 ac_status=$?
12240 grep -v '^ *+' conftest.er1 >conftest.err
12241 rm -f conftest.er1
12242 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012244 (exit $ac_status); } && {
12245 test -z "$ac_c_werror_flag" ||
12246 test ! -s conftest.err
12247 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012248 ac_lo=0 ac_mid=0
12249 while :; do
12250 cat >conftest.$ac_ext <<_ACEOF
12251/* confdefs.h. */
12252_ACEOF
12253cat confdefs.h >>conftest.$ac_ext
12254cat >>conftest.$ac_ext <<_ACEOF
12255/* end confdefs.h. */
12256$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012257 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012258int
12259main ()
12260{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012261static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012262test_array [0] = 0
12263
12264 ;
12265 return 0;
12266}
12267_ACEOF
12268rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012269if { (ac_try="$ac_compile"
12270case "(($ac_try" in
12271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12272 *) ac_try_echo=$ac_try;;
12273esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012275 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012276 ac_status=$?
12277 grep -v '^ *+' conftest.er1 >conftest.err
12278 rm -f conftest.er1
12279 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012281 (exit $ac_status); } && {
12282 test -z "$ac_c_werror_flag" ||
12283 test ! -s conftest.err
12284 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012285 ac_hi=$ac_mid; break
12286else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012287 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012288sed 's/^/| /' conftest.$ac_ext >&5
12289
Martin v. Löwiseba40652007-08-30 20:10:57 +000012290 ac_lo=`expr $ac_mid + 1`
12291 if test $ac_lo -le $ac_mid; then
12292 ac_lo= ac_hi=
12293 break
12294 fi
12295 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012297
12298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012299 done
12300else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012301 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012302sed 's/^/| /' conftest.$ac_ext >&5
12303
Martin v. Löwiseba40652007-08-30 20:10:57 +000012304 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012305/* confdefs.h. */
12306_ACEOF
12307cat confdefs.h >>conftest.$ac_ext
12308cat >>conftest.$ac_ext <<_ACEOF
12309/* end confdefs.h. */
12310$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012311 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012312int
12313main ()
12314{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012315static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012316test_array [0] = 0
12317
12318 ;
12319 return 0;
12320}
12321_ACEOF
12322rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012323if { (ac_try="$ac_compile"
12324case "(($ac_try" in
12325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12326 *) ac_try_echo=$ac_try;;
12327esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012329 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012330 ac_status=$?
12331 grep -v '^ *+' conftest.er1 >conftest.err
12332 rm -f conftest.er1
12333 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012335 (exit $ac_status); } && {
12336 test -z "$ac_c_werror_flag" ||
12337 test ! -s conftest.err
12338 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012339 ac_hi=-1 ac_mid=-1
12340 while :; do
12341 cat >conftest.$ac_ext <<_ACEOF
12342/* confdefs.h. */
12343_ACEOF
12344cat confdefs.h >>conftest.$ac_ext
12345cat >>conftest.$ac_ext <<_ACEOF
12346/* end confdefs.h. */
12347$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012348 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012349int
12350main ()
12351{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012352static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012353test_array [0] = 0
12354
12355 ;
12356 return 0;
12357}
12358_ACEOF
12359rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012360if { (ac_try="$ac_compile"
12361case "(($ac_try" in
12362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12363 *) ac_try_echo=$ac_try;;
12364esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012366 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012367 ac_status=$?
12368 grep -v '^ *+' conftest.er1 >conftest.err
12369 rm -f conftest.er1
12370 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012372 (exit $ac_status); } && {
12373 test -z "$ac_c_werror_flag" ||
12374 test ! -s conftest.err
12375 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012376 ac_lo=$ac_mid; break
12377else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012378 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012379sed 's/^/| /' conftest.$ac_ext >&5
12380
Martin v. Löwiseba40652007-08-30 20:10:57 +000012381 ac_hi=`expr '(' $ac_mid ')' - 1`
12382 if test $ac_mid -le $ac_hi; then
12383 ac_lo= ac_hi=
12384 break
12385 fi
12386 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012388
12389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012390 done
12391else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012392 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012393sed 's/^/| /' conftest.$ac_ext >&5
12394
Martin v. Löwiseba40652007-08-30 20:10:57 +000012395 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012397
12398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012399fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012400
12401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012402# Binary search between lo and hi bounds.
12403while test "x$ac_lo" != "x$ac_hi"; do
12404 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12405 cat >conftest.$ac_ext <<_ACEOF
12406/* confdefs.h. */
12407_ACEOF
12408cat confdefs.h >>conftest.$ac_ext
12409cat >>conftest.$ac_ext <<_ACEOF
12410/* end confdefs.h. */
12411$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012412 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012413int
12414main ()
12415{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012416static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012417test_array [0] = 0
12418
12419 ;
12420 return 0;
12421}
12422_ACEOF
12423rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012424if { (ac_try="$ac_compile"
12425case "(($ac_try" in
12426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12427 *) ac_try_echo=$ac_try;;
12428esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012430 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012431 ac_status=$?
12432 grep -v '^ *+' conftest.er1 >conftest.err
12433 rm -f conftest.er1
12434 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012436 (exit $ac_status); } && {
12437 test -z "$ac_c_werror_flag" ||
12438 test ! -s conftest.err
12439 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012440 ac_hi=$ac_mid
12441else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012442 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012443sed 's/^/| /' conftest.$ac_ext >&5
12444
Martin v. Löwiseba40652007-08-30 20:10:57 +000012445 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012447
12448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012449done
12450case $ac_lo in
12451?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012452'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012453 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012454See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012455echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012456See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012457 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012458 else
12459 ac_cv_sizeof__Bool=0
12460 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012461esac
12462else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012463 cat >conftest.$ac_ext <<_ACEOF
12464/* confdefs.h. */
12465_ACEOF
12466cat confdefs.h >>conftest.$ac_ext
12467cat >>conftest.$ac_ext <<_ACEOF
12468/* end confdefs.h. */
12469$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012470 typedef _Bool ac__type_sizeof_;
12471static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12472static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012473#include <stdio.h>
12474#include <stdlib.h>
12475int
12476main ()
12477{
12478
12479 FILE *f = fopen ("conftest.val", "w");
12480 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012481 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012482 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012483 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012484 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012485 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012486 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012487 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012488 }
12489 else
12490 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012491 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012492 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012493 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012494 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012495 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012496 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012497
12498 ;
12499 return 0;
12500}
12501_ACEOF
12502rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012503if { (ac_try="$ac_link"
12504case "(($ac_try" in
12505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12506 *) ac_try_echo=$ac_try;;
12507esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012509 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012510 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012512 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012513 { (case "(($ac_try" in
12514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12515 *) ac_try_echo=$ac_try;;
12516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012518 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012519 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012521 (exit $ac_status); }; }; then
12522 ac_cv_sizeof__Bool=`cat conftest.val`
12523else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012524 echo "$as_me: program exited with status $ac_status" >&5
12525echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012526sed 's/^/| /' conftest.$ac_ext >&5
12527
12528( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012529if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012530 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012531See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012532echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012533See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012534 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012535 else
12536 ac_cv_sizeof__Bool=0
12537 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012539rm -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 +000012540fi
12541rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012542fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012543{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12544echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012545
12546
12547
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012548cat >>confdefs.h <<_ACEOF
12549#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12550_ACEOF
12551
12552
12553fi
12554
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012555{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12556echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012557if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012558 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012559else
12560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012561/* confdefs.h. */
12562_ACEOF
12563cat confdefs.h >>conftest.$ac_ext
12564cat >>conftest.$ac_ext <<_ACEOF
12565/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012566#ifdef HAVE_STDINT_H
12567 #include <stdint.h>
12568 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012569
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012570typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012571int
12572main ()
12573{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012574if ((ac__type_new_ *) 0)
12575 return 0;
12576if (sizeof (ac__type_new_))
12577 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012578 ;
12579 return 0;
12580}
12581_ACEOF
12582rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012583if { (ac_try="$ac_compile"
12584case "(($ac_try" in
12585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12586 *) ac_try_echo=$ac_try;;
12587esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012589 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012591 grep -v '^ *+' conftest.er1 >conftest.err
12592 rm -f conftest.er1
12593 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012595 (exit $ac_status); } && {
12596 test -z "$ac_c_werror_flag" ||
12597 test ! -s conftest.err
12598 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012599 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012600else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012601 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012602sed 's/^/| /' conftest.$ac_ext >&5
12603
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012604 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012605fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012606
12607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012608fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012609{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12610echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12611if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012612
12613cat >>confdefs.h <<_ACEOF
12614#define HAVE_UINTPTR_T 1
12615_ACEOF
12616
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012617{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12618echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12619if test "${ac_cv_type_uintptr_t+set}" = set; then
12620 echo $ECHO_N "(cached) $ECHO_C" >&6
12621else
12622 cat >conftest.$ac_ext <<_ACEOF
12623/* confdefs.h. */
12624_ACEOF
12625cat confdefs.h >>conftest.$ac_ext
12626cat >>conftest.$ac_ext <<_ACEOF
12627/* end confdefs.h. */
12628$ac_includes_default
12629typedef uintptr_t ac__type_new_;
12630int
12631main ()
12632{
12633if ((ac__type_new_ *) 0)
12634 return 0;
12635if (sizeof (ac__type_new_))
12636 return 0;
12637 ;
12638 return 0;
12639}
12640_ACEOF
12641rm -f conftest.$ac_objext
12642if { (ac_try="$ac_compile"
12643case "(($ac_try" in
12644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12645 *) ac_try_echo=$ac_try;;
12646esac
12647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12648 (eval "$ac_compile") 2>conftest.er1
12649 ac_status=$?
12650 grep -v '^ *+' conftest.er1 >conftest.err
12651 rm -f conftest.er1
12652 cat conftest.err >&5
12653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12654 (exit $ac_status); } && {
12655 test -z "$ac_c_werror_flag" ||
12656 test ! -s conftest.err
12657 } && test -s conftest.$ac_objext; then
12658 ac_cv_type_uintptr_t=yes
12659else
12660 echo "$as_me: failed program was:" >&5
12661sed 's/^/| /' conftest.$ac_ext >&5
12662
12663 ac_cv_type_uintptr_t=no
12664fi
12665
12666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12667fi
12668{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12669echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12670
Martin v. Löwiseba40652007-08-30 20:10:57 +000012671# The cast to long int works around a bug in the HP C Compiler
12672# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12673# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12674# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012675{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12676echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012677if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012678 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012679else
Martin v. Löwis11437992002-04-12 09:54:03 +000012680 if test "$cross_compiling" = yes; then
12681 # Depending upon the size, compute the lo and hi bounds.
12682cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012683/* confdefs.h. */
12684_ACEOF
12685cat confdefs.h >>conftest.$ac_ext
12686cat >>conftest.$ac_ext <<_ACEOF
12687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012688$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012689 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012690int
12691main ()
12692{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012693static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012694test_array [0] = 0
12695
12696 ;
12697 return 0;
12698}
12699_ACEOF
12700rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012701if { (ac_try="$ac_compile"
12702case "(($ac_try" in
12703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12704 *) ac_try_echo=$ac_try;;
12705esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012707 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012709 grep -v '^ *+' conftest.er1 >conftest.err
12710 rm -f conftest.er1
12711 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012713 (exit $ac_status); } && {
12714 test -z "$ac_c_werror_flag" ||
12715 test ! -s conftest.err
12716 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012717 ac_lo=0 ac_mid=0
12718 while :; do
12719 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012720/* confdefs.h. */
12721_ACEOF
12722cat confdefs.h >>conftest.$ac_ext
12723cat >>conftest.$ac_ext <<_ACEOF
12724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012725$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012726 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012727int
12728main ()
12729{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012730static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012731test_array [0] = 0
12732
12733 ;
12734 return 0;
12735}
12736_ACEOF
12737rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012738if { (ac_try="$ac_compile"
12739case "(($ac_try" in
12740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12741 *) ac_try_echo=$ac_try;;
12742esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012744 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012746 grep -v '^ *+' conftest.er1 >conftest.err
12747 rm -f conftest.er1
12748 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012750 (exit $ac_status); } && {
12751 test -z "$ac_c_werror_flag" ||
12752 test ! -s conftest.err
12753 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012754 ac_hi=$ac_mid; break
12755else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012757sed 's/^/| /' conftest.$ac_ext >&5
12758
Martin v. Löwiseba40652007-08-30 20:10:57 +000012759 ac_lo=`expr $ac_mid + 1`
12760 if test $ac_lo -le $ac_mid; then
12761 ac_lo= ac_hi=
12762 break
12763 fi
12764 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012765fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012766
12767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012768 done
12769else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012771sed 's/^/| /' conftest.$ac_ext >&5
12772
Martin v. Löwiseba40652007-08-30 20:10:57 +000012773 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012774/* confdefs.h. */
12775_ACEOF
12776cat confdefs.h >>conftest.$ac_ext
12777cat >>conftest.$ac_ext <<_ACEOF
12778/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012779$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012780 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012781int
12782main ()
12783{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012784static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012785test_array [0] = 0
12786
12787 ;
12788 return 0;
12789}
12790_ACEOF
12791rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012792if { (ac_try="$ac_compile"
12793case "(($ac_try" in
12794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12795 *) ac_try_echo=$ac_try;;
12796esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012798 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012799 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012800 grep -v '^ *+' conftest.er1 >conftest.err
12801 rm -f conftest.er1
12802 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012804 (exit $ac_status); } && {
12805 test -z "$ac_c_werror_flag" ||
12806 test ! -s conftest.err
12807 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012808 ac_hi=-1 ac_mid=-1
12809 while :; do
12810 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012811/* confdefs.h. */
12812_ACEOF
12813cat confdefs.h >>conftest.$ac_ext
12814cat >>conftest.$ac_ext <<_ACEOF
12815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012816$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012817 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012818int
12819main ()
12820{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012821static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012822test_array [0] = 0
12823
12824 ;
12825 return 0;
12826}
12827_ACEOF
12828rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012829if { (ac_try="$ac_compile"
12830case "(($ac_try" in
12831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12832 *) ac_try_echo=$ac_try;;
12833esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012835 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012836 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012837 grep -v '^ *+' conftest.er1 >conftest.err
12838 rm -f conftest.er1
12839 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012841 (exit $ac_status); } && {
12842 test -z "$ac_c_werror_flag" ||
12843 test ! -s conftest.err
12844 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012845 ac_lo=$ac_mid; break
12846else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012848sed 's/^/| /' conftest.$ac_ext >&5
12849
Martin v. Löwiseba40652007-08-30 20:10:57 +000012850 ac_hi=`expr '(' $ac_mid ')' - 1`
12851 if test $ac_mid -le $ac_hi; then
12852 ac_lo= ac_hi=
12853 break
12854 fi
12855 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012856fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012857
12858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012859 done
12860else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012862sed 's/^/| /' conftest.$ac_ext >&5
12863
Martin v. Löwiseba40652007-08-30 20:10:57 +000012864 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012866
12867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012869
12870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012871# Binary search between lo and hi bounds.
12872while test "x$ac_lo" != "x$ac_hi"; do
12873 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12874 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012875/* confdefs.h. */
12876_ACEOF
12877cat confdefs.h >>conftest.$ac_ext
12878cat >>conftest.$ac_ext <<_ACEOF
12879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012880$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012881 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012882int
12883main ()
12884{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012885static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012886test_array [0] = 0
12887
12888 ;
12889 return 0;
12890}
12891_ACEOF
12892rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012893if { (ac_try="$ac_compile"
12894case "(($ac_try" in
12895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12896 *) ac_try_echo=$ac_try;;
12897esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012899 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012900 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012901 grep -v '^ *+' conftest.er1 >conftest.err
12902 rm -f conftest.er1
12903 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012905 (exit $ac_status); } && {
12906 test -z "$ac_c_werror_flag" ||
12907 test ! -s conftest.err
12908 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012909 ac_hi=$ac_mid
12910else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012912sed 's/^/| /' conftest.$ac_ext >&5
12913
Martin v. Löwiseba40652007-08-30 20:10:57 +000012914 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012916
12917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012918done
12919case $ac_lo in
12920?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012921'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012922 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012923See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012924echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012925See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012926 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012927 else
12928 ac_cv_sizeof_uintptr_t=0
12929 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012930esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012931else
Martin v. Löwis11437992002-04-12 09:54:03 +000012932 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012933/* confdefs.h. */
12934_ACEOF
12935cat confdefs.h >>conftest.$ac_ext
12936cat >>conftest.$ac_ext <<_ACEOF
12937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012938$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012939 typedef uintptr_t ac__type_sizeof_;
12940static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12941static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012942#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012943#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012944int
12945main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012946{
Martin v. Löwis11437992002-04-12 09:54:03 +000012947
12948 FILE *f = fopen ("conftest.val", "w");
12949 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012950 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012951 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012952 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012953 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012954 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012955 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012956 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012957 }
12958 else
12959 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012960 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012961 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012962 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012963 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012964 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012965 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012966
12967 ;
12968 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012969}
Martin v. Löwis11437992002-04-12 09:54:03 +000012970_ACEOF
12971rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012972if { (ac_try="$ac_link"
12973case "(($ac_try" in
12974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12975 *) ac_try_echo=$ac_try;;
12976esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012978 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012979 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012981 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012982 { (case "(($ac_try" in
12983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12984 *) ac_try_echo=$ac_try;;
12985esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012987 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012988 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012990 (exit $ac_status); }; }; then
12991 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012992else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012993 echo "$as_me: program exited with status $ac_status" >&5
12994echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012995sed 's/^/| /' conftest.$ac_ext >&5
12996
Martin v. Löwis11437992002-04-12 09:54:03 +000012997( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012998if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012999 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013000See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013001echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013002See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013003 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013004 else
13005 ac_cv_sizeof_uintptr_t=0
13006 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013008rm -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 +000013009fi
13010rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013011fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013012{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13013echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013014
13015
13016
Martin v. Löwis11437992002-04-12 09:54:03 +000013017cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013018#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013019_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013020
Michael W. Hudson54241132001-12-07 15:38:26 +000013021
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013022fi
13023
Martin v. Löwisebe26702006-10-02 14:55:51 +000013024
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013025{ echo "$as_me:$LINENO: checking for off_t" >&5
13026echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13027if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013028 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013029else
Martin v. Löwis11437992002-04-12 09:54:03 +000013030 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013031/* confdefs.h. */
13032_ACEOF
13033cat confdefs.h >>conftest.$ac_ext
13034cat >>conftest.$ac_ext <<_ACEOF
13035/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013036
13037#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013038#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013039#endif
13040
13041
13042typedef off_t ac__type_new_;
13043int
13044main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013045{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013046if ((ac__type_new_ *) 0)
13047 return 0;
13048if (sizeof (ac__type_new_))
13049 return 0;
13050 ;
13051 return 0;
13052}
13053_ACEOF
13054rm -f conftest.$ac_objext
13055if { (ac_try="$ac_compile"
13056case "(($ac_try" in
13057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13058 *) ac_try_echo=$ac_try;;
13059esac
13060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13061 (eval "$ac_compile") 2>conftest.er1
13062 ac_status=$?
13063 grep -v '^ *+' conftest.er1 >conftest.err
13064 rm -f conftest.er1
13065 cat conftest.err >&5
13066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13067 (exit $ac_status); } && {
13068 test -z "$ac_c_werror_flag" ||
13069 test ! -s conftest.err
13070 } && test -s conftest.$ac_objext; then
13071 ac_cv_type_off_t=yes
13072else
13073 echo "$as_me: failed program was:" >&5
13074sed 's/^/| /' conftest.$ac_ext >&5
13075
13076 ac_cv_type_off_t=no
13077fi
13078
13079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13080fi
13081{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13082echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13083
13084# The cast to long int works around a bug in the HP C Compiler
13085# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13086# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13087# This bug is HP SR number 8606223364.
13088{ echo "$as_me:$LINENO: checking size of off_t" >&5
13089echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13090if test "${ac_cv_sizeof_off_t+set}" = set; then
13091 echo $ECHO_N "(cached) $ECHO_C" >&6
13092else
13093 if test "$cross_compiling" = yes; then
13094 # Depending upon the size, compute the lo and hi bounds.
13095cat >conftest.$ac_ext <<_ACEOF
13096/* confdefs.h. */
13097_ACEOF
13098cat confdefs.h >>conftest.$ac_ext
13099cat >>conftest.$ac_ext <<_ACEOF
13100/* end confdefs.h. */
13101
13102#ifdef HAVE_SYS_TYPES_H
13103#include <sys/types.h>
13104#endif
13105
13106
13107 typedef off_t ac__type_sizeof_;
13108int
13109main ()
13110{
13111static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13112test_array [0] = 0
13113
13114 ;
13115 return 0;
13116}
13117_ACEOF
13118rm -f conftest.$ac_objext
13119if { (ac_try="$ac_compile"
13120case "(($ac_try" in
13121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13122 *) ac_try_echo=$ac_try;;
13123esac
13124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13125 (eval "$ac_compile") 2>conftest.er1
13126 ac_status=$?
13127 grep -v '^ *+' conftest.er1 >conftest.err
13128 rm -f conftest.er1
13129 cat conftest.err >&5
13130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13131 (exit $ac_status); } && {
13132 test -z "$ac_c_werror_flag" ||
13133 test ! -s conftest.err
13134 } && test -s conftest.$ac_objext; then
13135 ac_lo=0 ac_mid=0
13136 while :; do
13137 cat >conftest.$ac_ext <<_ACEOF
13138/* confdefs.h. */
13139_ACEOF
13140cat confdefs.h >>conftest.$ac_ext
13141cat >>conftest.$ac_ext <<_ACEOF
13142/* end confdefs.h. */
13143
13144#ifdef HAVE_SYS_TYPES_H
13145#include <sys/types.h>
13146#endif
13147
13148
13149 typedef off_t ac__type_sizeof_;
13150int
13151main ()
13152{
13153static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13154test_array [0] = 0
13155
13156 ;
13157 return 0;
13158}
13159_ACEOF
13160rm -f conftest.$ac_objext
13161if { (ac_try="$ac_compile"
13162case "(($ac_try" in
13163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13164 *) ac_try_echo=$ac_try;;
13165esac
13166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13167 (eval "$ac_compile") 2>conftest.er1
13168 ac_status=$?
13169 grep -v '^ *+' conftest.er1 >conftest.err
13170 rm -f conftest.er1
13171 cat conftest.err >&5
13172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13173 (exit $ac_status); } && {
13174 test -z "$ac_c_werror_flag" ||
13175 test ! -s conftest.err
13176 } && test -s conftest.$ac_objext; then
13177 ac_hi=$ac_mid; break
13178else
13179 echo "$as_me: failed program was:" >&5
13180sed 's/^/| /' conftest.$ac_ext >&5
13181
13182 ac_lo=`expr $ac_mid + 1`
13183 if test $ac_lo -le $ac_mid; then
13184 ac_lo= ac_hi=
13185 break
13186 fi
13187 ac_mid=`expr 2 '*' $ac_mid + 1`
13188fi
13189
13190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13191 done
13192else
13193 echo "$as_me: failed program was:" >&5
13194sed 's/^/| /' conftest.$ac_ext >&5
13195
13196 cat >conftest.$ac_ext <<_ACEOF
13197/* confdefs.h. */
13198_ACEOF
13199cat confdefs.h >>conftest.$ac_ext
13200cat >>conftest.$ac_ext <<_ACEOF
13201/* end confdefs.h. */
13202
13203#ifdef HAVE_SYS_TYPES_H
13204#include <sys/types.h>
13205#endif
13206
13207
13208 typedef off_t ac__type_sizeof_;
13209int
13210main ()
13211{
13212static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13213test_array [0] = 0
13214
13215 ;
13216 return 0;
13217}
13218_ACEOF
13219rm -f conftest.$ac_objext
13220if { (ac_try="$ac_compile"
13221case "(($ac_try" in
13222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13223 *) ac_try_echo=$ac_try;;
13224esac
13225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13226 (eval "$ac_compile") 2>conftest.er1
13227 ac_status=$?
13228 grep -v '^ *+' conftest.er1 >conftest.err
13229 rm -f conftest.er1
13230 cat conftest.err >&5
13231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13232 (exit $ac_status); } && {
13233 test -z "$ac_c_werror_flag" ||
13234 test ! -s conftest.err
13235 } && test -s conftest.$ac_objext; then
13236 ac_hi=-1 ac_mid=-1
13237 while :; do
13238 cat >conftest.$ac_ext <<_ACEOF
13239/* confdefs.h. */
13240_ACEOF
13241cat confdefs.h >>conftest.$ac_ext
13242cat >>conftest.$ac_ext <<_ACEOF
13243/* end confdefs.h. */
13244
13245#ifdef HAVE_SYS_TYPES_H
13246#include <sys/types.h>
13247#endif
13248
13249
13250 typedef off_t ac__type_sizeof_;
13251int
13252main ()
13253{
13254static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13255test_array [0] = 0
13256
13257 ;
13258 return 0;
13259}
13260_ACEOF
13261rm -f conftest.$ac_objext
13262if { (ac_try="$ac_compile"
13263case "(($ac_try" in
13264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13265 *) ac_try_echo=$ac_try;;
13266esac
13267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13268 (eval "$ac_compile") 2>conftest.er1
13269 ac_status=$?
13270 grep -v '^ *+' conftest.er1 >conftest.err
13271 rm -f conftest.er1
13272 cat conftest.err >&5
13273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13274 (exit $ac_status); } && {
13275 test -z "$ac_c_werror_flag" ||
13276 test ! -s conftest.err
13277 } && test -s conftest.$ac_objext; then
13278 ac_lo=$ac_mid; break
13279else
13280 echo "$as_me: failed program was:" >&5
13281sed 's/^/| /' conftest.$ac_ext >&5
13282
13283 ac_hi=`expr '(' $ac_mid ')' - 1`
13284 if test $ac_mid -le $ac_hi; then
13285 ac_lo= ac_hi=
13286 break
13287 fi
13288 ac_mid=`expr 2 '*' $ac_mid`
13289fi
13290
13291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13292 done
13293else
13294 echo "$as_me: failed program was:" >&5
13295sed 's/^/| /' conftest.$ac_ext >&5
13296
13297 ac_lo= ac_hi=
13298fi
13299
13300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13301fi
13302
13303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13304# Binary search between lo and hi bounds.
13305while test "x$ac_lo" != "x$ac_hi"; do
13306 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13307 cat >conftest.$ac_ext <<_ACEOF
13308/* confdefs.h. */
13309_ACEOF
13310cat confdefs.h >>conftest.$ac_ext
13311cat >>conftest.$ac_ext <<_ACEOF
13312/* end confdefs.h. */
13313
13314#ifdef HAVE_SYS_TYPES_H
13315#include <sys/types.h>
13316#endif
13317
13318
13319 typedef off_t ac__type_sizeof_;
13320int
13321main ()
13322{
13323static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13324test_array [0] = 0
13325
13326 ;
13327 return 0;
13328}
13329_ACEOF
13330rm -f conftest.$ac_objext
13331if { (ac_try="$ac_compile"
13332case "(($ac_try" in
13333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13334 *) ac_try_echo=$ac_try;;
13335esac
13336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13337 (eval "$ac_compile") 2>conftest.er1
13338 ac_status=$?
13339 grep -v '^ *+' conftest.er1 >conftest.err
13340 rm -f conftest.er1
13341 cat conftest.err >&5
13342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13343 (exit $ac_status); } && {
13344 test -z "$ac_c_werror_flag" ||
13345 test ! -s conftest.err
13346 } && test -s conftest.$ac_objext; then
13347 ac_hi=$ac_mid
13348else
13349 echo "$as_me: failed program was:" >&5
13350sed 's/^/| /' conftest.$ac_ext >&5
13351
13352 ac_lo=`expr '(' $ac_mid ')' + 1`
13353fi
13354
13355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13356done
13357case $ac_lo in
13358?*) ac_cv_sizeof_off_t=$ac_lo;;
13359'') if test "$ac_cv_type_off_t" = yes; then
13360 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13361See \`config.log' for more details." >&5
13362echo "$as_me: error: cannot compute sizeof (off_t)
13363See \`config.log' for more details." >&2;}
13364 { (exit 77); exit 77; }; }
13365 else
13366 ac_cv_sizeof_off_t=0
13367 fi ;;
13368esac
13369else
13370 cat >conftest.$ac_ext <<_ACEOF
13371/* confdefs.h. */
13372_ACEOF
13373cat confdefs.h >>conftest.$ac_ext
13374cat >>conftest.$ac_ext <<_ACEOF
13375/* end confdefs.h. */
13376
13377#ifdef HAVE_SYS_TYPES_H
13378#include <sys/types.h>
13379#endif
13380
13381
13382 typedef off_t ac__type_sizeof_;
13383static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13384static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13385#include <stdio.h>
13386#include <stdlib.h>
13387int
13388main ()
13389{
13390
13391 FILE *f = fopen ("conftest.val", "w");
13392 if (! f)
13393 return 1;
13394 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13395 {
13396 long int i = longval ();
13397 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13398 return 1;
13399 fprintf (f, "%ld\n", i);
13400 }
13401 else
13402 {
13403 unsigned long int i = ulongval ();
13404 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13405 return 1;
13406 fprintf (f, "%lu\n", i);
13407 }
13408 return ferror (f) || fclose (f) != 0;
13409
13410 ;
13411 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013412}
Martin v. Löwis11437992002-04-12 09:54:03 +000013413_ACEOF
13414rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013415if { (ac_try="$ac_link"
13416case "(($ac_try" in
13417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13418 *) ac_try_echo=$ac_try;;
13419esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013421 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013422 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013424 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013425 { (case "(($ac_try" in
13426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13427 *) ac_try_echo=$ac_try;;
13428esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013430 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013431 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013433 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013434 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013435else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013436 echo "$as_me: program exited with status $ac_status" >&5
13437echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013438sed 's/^/| /' conftest.$ac_ext >&5
13439
Martin v. Löwis11437992002-04-12 09:54:03 +000013440( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013441if test "$ac_cv_type_off_t" = yes; then
13442 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13443See \`config.log' for more details." >&5
13444echo "$as_me: error: cannot compute sizeof (off_t)
13445See \`config.log' for more details." >&2;}
13446 { (exit 77); exit 77; }; }
13447 else
13448 ac_cv_sizeof_off_t=0
13449 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013451rm -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 +000013452fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013453rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013454fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013455{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13456echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013457
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013458
13459
Martin v. Löwis11437992002-04-12 09:54:03 +000013460cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013461#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013462_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013463
Michael W. Hudson54241132001-12-07 15:38:26 +000013464
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013465
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013466{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13467echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013468if test "$have_long_long" = yes
13469then
13470if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013471 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013472
Martin v. Löwis11437992002-04-12 09:54:03 +000013473cat >>confdefs.h <<\_ACEOF
13474#define HAVE_LARGEFILE_SUPPORT 1
13475_ACEOF
13476
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013477 { echo "$as_me:$LINENO: result: yes" >&5
13478echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013479else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013480 { echo "$as_me:$LINENO: result: no" >&5
13481echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013482fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013483else
13484 { echo "$as_me:$LINENO: result: no" >&5
13485echo "${ECHO_T}no" >&6; }
13486fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013487
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013488{ echo "$as_me:$LINENO: checking for time_t" >&5
13489echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13490if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013491 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013492else
Martin v. Löwis11437992002-04-12 09:54:03 +000013493 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013494/* confdefs.h. */
13495_ACEOF
13496cat confdefs.h >>conftest.$ac_ext
13497cat >>conftest.$ac_ext <<_ACEOF
13498/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013499
13500#ifdef HAVE_SYS_TYPES_H
13501#include <sys/types.h>
13502#endif
13503#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013504#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013505#endif
13506
13507
13508typedef time_t ac__type_new_;
13509int
13510main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013511{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013512if ((ac__type_new_ *) 0)
13513 return 0;
13514if (sizeof (ac__type_new_))
13515 return 0;
13516 ;
13517 return 0;
13518}
13519_ACEOF
13520rm -f conftest.$ac_objext
13521if { (ac_try="$ac_compile"
13522case "(($ac_try" in
13523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13524 *) ac_try_echo=$ac_try;;
13525esac
13526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13527 (eval "$ac_compile") 2>conftest.er1
13528 ac_status=$?
13529 grep -v '^ *+' conftest.er1 >conftest.err
13530 rm -f conftest.er1
13531 cat conftest.err >&5
13532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13533 (exit $ac_status); } && {
13534 test -z "$ac_c_werror_flag" ||
13535 test ! -s conftest.err
13536 } && test -s conftest.$ac_objext; then
13537 ac_cv_type_time_t=yes
13538else
13539 echo "$as_me: failed program was:" >&5
13540sed 's/^/| /' conftest.$ac_ext >&5
13541
13542 ac_cv_type_time_t=no
13543fi
13544
13545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13546fi
13547{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13548echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13549
13550# The cast to long int works around a bug in the HP C Compiler
13551# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13552# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13553# This bug is HP SR number 8606223364.
13554{ echo "$as_me:$LINENO: checking size of time_t" >&5
13555echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13556if test "${ac_cv_sizeof_time_t+set}" = set; then
13557 echo $ECHO_N "(cached) $ECHO_C" >&6
13558else
13559 if test "$cross_compiling" = yes; then
13560 # Depending upon the size, compute the lo and hi bounds.
13561cat >conftest.$ac_ext <<_ACEOF
13562/* confdefs.h. */
13563_ACEOF
13564cat confdefs.h >>conftest.$ac_ext
13565cat >>conftest.$ac_ext <<_ACEOF
13566/* end confdefs.h. */
13567
13568#ifdef HAVE_SYS_TYPES_H
13569#include <sys/types.h>
13570#endif
13571#ifdef HAVE_TIME_H
13572#include <time.h>
13573#endif
13574
13575
13576 typedef time_t ac__type_sizeof_;
13577int
13578main ()
13579{
13580static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13581test_array [0] = 0
13582
13583 ;
13584 return 0;
13585}
13586_ACEOF
13587rm -f conftest.$ac_objext
13588if { (ac_try="$ac_compile"
13589case "(($ac_try" in
13590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13591 *) ac_try_echo=$ac_try;;
13592esac
13593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13594 (eval "$ac_compile") 2>conftest.er1
13595 ac_status=$?
13596 grep -v '^ *+' conftest.er1 >conftest.err
13597 rm -f conftest.er1
13598 cat conftest.err >&5
13599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13600 (exit $ac_status); } && {
13601 test -z "$ac_c_werror_flag" ||
13602 test ! -s conftest.err
13603 } && test -s conftest.$ac_objext; then
13604 ac_lo=0 ac_mid=0
13605 while :; do
13606 cat >conftest.$ac_ext <<_ACEOF
13607/* confdefs.h. */
13608_ACEOF
13609cat confdefs.h >>conftest.$ac_ext
13610cat >>conftest.$ac_ext <<_ACEOF
13611/* end confdefs.h. */
13612
13613#ifdef HAVE_SYS_TYPES_H
13614#include <sys/types.h>
13615#endif
13616#ifdef HAVE_TIME_H
13617#include <time.h>
13618#endif
13619
13620
13621 typedef time_t ac__type_sizeof_;
13622int
13623main ()
13624{
13625static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13626test_array [0] = 0
13627
13628 ;
13629 return 0;
13630}
13631_ACEOF
13632rm -f conftest.$ac_objext
13633if { (ac_try="$ac_compile"
13634case "(($ac_try" in
13635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13636 *) ac_try_echo=$ac_try;;
13637esac
13638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13639 (eval "$ac_compile") 2>conftest.er1
13640 ac_status=$?
13641 grep -v '^ *+' conftest.er1 >conftest.err
13642 rm -f conftest.er1
13643 cat conftest.err >&5
13644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13645 (exit $ac_status); } && {
13646 test -z "$ac_c_werror_flag" ||
13647 test ! -s conftest.err
13648 } && test -s conftest.$ac_objext; then
13649 ac_hi=$ac_mid; break
13650else
13651 echo "$as_me: failed program was:" >&5
13652sed 's/^/| /' conftest.$ac_ext >&5
13653
13654 ac_lo=`expr $ac_mid + 1`
13655 if test $ac_lo -le $ac_mid; then
13656 ac_lo= ac_hi=
13657 break
13658 fi
13659 ac_mid=`expr 2 '*' $ac_mid + 1`
13660fi
13661
13662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13663 done
13664else
13665 echo "$as_me: failed program was:" >&5
13666sed 's/^/| /' conftest.$ac_ext >&5
13667
13668 cat >conftest.$ac_ext <<_ACEOF
13669/* confdefs.h. */
13670_ACEOF
13671cat confdefs.h >>conftest.$ac_ext
13672cat >>conftest.$ac_ext <<_ACEOF
13673/* end confdefs.h. */
13674
13675#ifdef HAVE_SYS_TYPES_H
13676#include <sys/types.h>
13677#endif
13678#ifdef HAVE_TIME_H
13679#include <time.h>
13680#endif
13681
13682
13683 typedef time_t ac__type_sizeof_;
13684int
13685main ()
13686{
13687static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13688test_array [0] = 0
13689
13690 ;
13691 return 0;
13692}
13693_ACEOF
13694rm -f conftest.$ac_objext
13695if { (ac_try="$ac_compile"
13696case "(($ac_try" in
13697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13698 *) ac_try_echo=$ac_try;;
13699esac
13700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13701 (eval "$ac_compile") 2>conftest.er1
13702 ac_status=$?
13703 grep -v '^ *+' conftest.er1 >conftest.err
13704 rm -f conftest.er1
13705 cat conftest.err >&5
13706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13707 (exit $ac_status); } && {
13708 test -z "$ac_c_werror_flag" ||
13709 test ! -s conftest.err
13710 } && test -s conftest.$ac_objext; then
13711 ac_hi=-1 ac_mid=-1
13712 while :; do
13713 cat >conftest.$ac_ext <<_ACEOF
13714/* confdefs.h. */
13715_ACEOF
13716cat confdefs.h >>conftest.$ac_ext
13717cat >>conftest.$ac_ext <<_ACEOF
13718/* end confdefs.h. */
13719
13720#ifdef HAVE_SYS_TYPES_H
13721#include <sys/types.h>
13722#endif
13723#ifdef HAVE_TIME_H
13724#include <time.h>
13725#endif
13726
13727
13728 typedef time_t ac__type_sizeof_;
13729int
13730main ()
13731{
13732static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13733test_array [0] = 0
13734
13735 ;
13736 return 0;
13737}
13738_ACEOF
13739rm -f conftest.$ac_objext
13740if { (ac_try="$ac_compile"
13741case "(($ac_try" in
13742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13743 *) ac_try_echo=$ac_try;;
13744esac
13745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13746 (eval "$ac_compile") 2>conftest.er1
13747 ac_status=$?
13748 grep -v '^ *+' conftest.er1 >conftest.err
13749 rm -f conftest.er1
13750 cat conftest.err >&5
13751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13752 (exit $ac_status); } && {
13753 test -z "$ac_c_werror_flag" ||
13754 test ! -s conftest.err
13755 } && test -s conftest.$ac_objext; then
13756 ac_lo=$ac_mid; break
13757else
13758 echo "$as_me: failed program was:" >&5
13759sed 's/^/| /' conftest.$ac_ext >&5
13760
13761 ac_hi=`expr '(' $ac_mid ')' - 1`
13762 if test $ac_mid -le $ac_hi; then
13763 ac_lo= ac_hi=
13764 break
13765 fi
13766 ac_mid=`expr 2 '*' $ac_mid`
13767fi
13768
13769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13770 done
13771else
13772 echo "$as_me: failed program was:" >&5
13773sed 's/^/| /' conftest.$ac_ext >&5
13774
13775 ac_lo= ac_hi=
13776fi
13777
13778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13779fi
13780
13781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13782# Binary search between lo and hi bounds.
13783while test "x$ac_lo" != "x$ac_hi"; do
13784 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13785 cat >conftest.$ac_ext <<_ACEOF
13786/* confdefs.h. */
13787_ACEOF
13788cat confdefs.h >>conftest.$ac_ext
13789cat >>conftest.$ac_ext <<_ACEOF
13790/* end confdefs.h. */
13791
13792#ifdef HAVE_SYS_TYPES_H
13793#include <sys/types.h>
13794#endif
13795#ifdef HAVE_TIME_H
13796#include <time.h>
13797#endif
13798
13799
13800 typedef time_t ac__type_sizeof_;
13801int
13802main ()
13803{
13804static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13805test_array [0] = 0
13806
13807 ;
13808 return 0;
13809}
13810_ACEOF
13811rm -f conftest.$ac_objext
13812if { (ac_try="$ac_compile"
13813case "(($ac_try" in
13814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13815 *) ac_try_echo=$ac_try;;
13816esac
13817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13818 (eval "$ac_compile") 2>conftest.er1
13819 ac_status=$?
13820 grep -v '^ *+' conftest.er1 >conftest.err
13821 rm -f conftest.er1
13822 cat conftest.err >&5
13823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13824 (exit $ac_status); } && {
13825 test -z "$ac_c_werror_flag" ||
13826 test ! -s conftest.err
13827 } && test -s conftest.$ac_objext; then
13828 ac_hi=$ac_mid
13829else
13830 echo "$as_me: failed program was:" >&5
13831sed 's/^/| /' conftest.$ac_ext >&5
13832
13833 ac_lo=`expr '(' $ac_mid ')' + 1`
13834fi
13835
13836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13837done
13838case $ac_lo in
13839?*) ac_cv_sizeof_time_t=$ac_lo;;
13840'') if test "$ac_cv_type_time_t" = yes; then
13841 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13842See \`config.log' for more details." >&5
13843echo "$as_me: error: cannot compute sizeof (time_t)
13844See \`config.log' for more details." >&2;}
13845 { (exit 77); exit 77; }; }
13846 else
13847 ac_cv_sizeof_time_t=0
13848 fi ;;
13849esac
13850else
13851 cat >conftest.$ac_ext <<_ACEOF
13852/* confdefs.h. */
13853_ACEOF
13854cat confdefs.h >>conftest.$ac_ext
13855cat >>conftest.$ac_ext <<_ACEOF
13856/* end confdefs.h. */
13857
13858#ifdef HAVE_SYS_TYPES_H
13859#include <sys/types.h>
13860#endif
13861#ifdef HAVE_TIME_H
13862#include <time.h>
13863#endif
13864
13865
13866 typedef time_t ac__type_sizeof_;
13867static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13868static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13869#include <stdio.h>
13870#include <stdlib.h>
13871int
13872main ()
13873{
13874
13875 FILE *f = fopen ("conftest.val", "w");
13876 if (! f)
13877 return 1;
13878 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13879 {
13880 long int i = longval ();
13881 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13882 return 1;
13883 fprintf (f, "%ld\n", i);
13884 }
13885 else
13886 {
13887 unsigned long int i = ulongval ();
13888 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13889 return 1;
13890 fprintf (f, "%lu\n", i);
13891 }
13892 return ferror (f) || fclose (f) != 0;
13893
13894 ;
13895 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013896}
Martin v. Löwis11437992002-04-12 09:54:03 +000013897_ACEOF
13898rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013899if { (ac_try="$ac_link"
13900case "(($ac_try" in
13901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13902 *) ac_try_echo=$ac_try;;
13903esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013905 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013906 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013908 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013909 { (case "(($ac_try" in
13910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13911 *) ac_try_echo=$ac_try;;
13912esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013914 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013915 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013917 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013918 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013919else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013920 echo "$as_me: program exited with status $ac_status" >&5
13921echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013922sed 's/^/| /' conftest.$ac_ext >&5
13923
Martin v. Löwis11437992002-04-12 09:54:03 +000013924( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013925if test "$ac_cv_type_time_t" = yes; then
13926 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13927See \`config.log' for more details." >&5
13928echo "$as_me: error: cannot compute sizeof (time_t)
13929See \`config.log' for more details." >&2;}
13930 { (exit 77); exit 77; }; }
13931 else
13932 ac_cv_sizeof_time_t=0
13933 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013934fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013935rm -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 +000013936fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013937rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013938fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013939{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13940echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013941
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013942
13943
Martin v. Löwis11437992002-04-12 09:54:03 +000013944cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013945#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013946_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013947
Michael W. Hudson54241132001-12-07 15:38:26 +000013948
13949
Trent Mick635f6fb2000-08-23 21:33:05 +000013950# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013951ac_save_cc="$CC"
13952if test "$ac_cv_kpthread" = "yes"
13953then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013954elif test "$ac_cv_kthread" = "yes"
13955then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013956elif test "$ac_cv_pthread" = "yes"
13957then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013958fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013959{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13960echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013961have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013962cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013963/* confdefs.h. */
13964_ACEOF
13965cat confdefs.h >>conftest.$ac_ext
13966cat >>conftest.$ac_ext <<_ACEOF
13967/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013968#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013969int
13970main ()
13971{
Guido van Rossum12580492000-09-24 16:47:19 +000013972pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013973 ;
13974 return 0;
13975}
13976_ACEOF
13977rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013978if { (ac_try="$ac_compile"
13979case "(($ac_try" in
13980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13981 *) ac_try_echo=$ac_try;;
13982esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013984 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013986 grep -v '^ *+' conftest.er1 >conftest.err
13987 rm -f conftest.er1
13988 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013990 (exit $ac_status); } && {
13991 test -z "$ac_c_werror_flag" ||
13992 test ! -s conftest.err
13993 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013994 have_pthread_t=yes
13995else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013997sed 's/^/| /' conftest.$ac_ext >&5
13998
Martin v. Löwiseba40652007-08-30 20:10:57 +000013999
Trent Mick635f6fb2000-08-23 21:33:05 +000014000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014001
14002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014003{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14004echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014005if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014006 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14007echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14008if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014009 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014010else
Martin v. Löwis11437992002-04-12 09:54:03 +000014011 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014012/* confdefs.h. */
14013_ACEOF
14014cat confdefs.h >>conftest.$ac_ext
14015cat >>conftest.$ac_ext <<_ACEOF
14016/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014017
14018#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014019#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014020#endif
14021
14022
14023typedef pthread_t ac__type_new_;
14024int
14025main ()
14026{
14027if ((ac__type_new_ *) 0)
14028 return 0;
14029if (sizeof (ac__type_new_))
14030 return 0;
14031 ;
14032 return 0;
14033}
14034_ACEOF
14035rm -f conftest.$ac_objext
14036if { (ac_try="$ac_compile"
14037case "(($ac_try" in
14038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14039 *) ac_try_echo=$ac_try;;
14040esac
14041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14042 (eval "$ac_compile") 2>conftest.er1
14043 ac_status=$?
14044 grep -v '^ *+' conftest.er1 >conftest.err
14045 rm -f conftest.er1
14046 cat conftest.err >&5
14047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14048 (exit $ac_status); } && {
14049 test -z "$ac_c_werror_flag" ||
14050 test ! -s conftest.err
14051 } && test -s conftest.$ac_objext; then
14052 ac_cv_type_pthread_t=yes
14053else
14054 echo "$as_me: failed program was:" >&5
14055sed 's/^/| /' conftest.$ac_ext >&5
14056
14057 ac_cv_type_pthread_t=no
14058fi
14059
14060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14061fi
14062{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14063echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14064
14065# The cast to long int works around a bug in the HP C Compiler
14066# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14067# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14068# This bug is HP SR number 8606223364.
14069{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14070echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14071if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14072 echo $ECHO_N "(cached) $ECHO_C" >&6
14073else
14074 if test "$cross_compiling" = yes; then
14075 # Depending upon the size, compute the lo and hi bounds.
14076cat >conftest.$ac_ext <<_ACEOF
14077/* confdefs.h. */
14078_ACEOF
14079cat confdefs.h >>conftest.$ac_ext
14080cat >>conftest.$ac_ext <<_ACEOF
14081/* end confdefs.h. */
14082
14083#ifdef HAVE_PTHREAD_H
14084#include <pthread.h>
14085#endif
14086
14087
14088 typedef pthread_t ac__type_sizeof_;
14089int
14090main ()
14091{
14092static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14093test_array [0] = 0
14094
14095 ;
14096 return 0;
14097}
14098_ACEOF
14099rm -f conftest.$ac_objext
14100if { (ac_try="$ac_compile"
14101case "(($ac_try" in
14102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14103 *) ac_try_echo=$ac_try;;
14104esac
14105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14106 (eval "$ac_compile") 2>conftest.er1
14107 ac_status=$?
14108 grep -v '^ *+' conftest.er1 >conftest.err
14109 rm -f conftest.er1
14110 cat conftest.err >&5
14111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14112 (exit $ac_status); } && {
14113 test -z "$ac_c_werror_flag" ||
14114 test ! -s conftest.err
14115 } && test -s conftest.$ac_objext; then
14116 ac_lo=0 ac_mid=0
14117 while :; do
14118 cat >conftest.$ac_ext <<_ACEOF
14119/* confdefs.h. */
14120_ACEOF
14121cat confdefs.h >>conftest.$ac_ext
14122cat >>conftest.$ac_ext <<_ACEOF
14123/* end confdefs.h. */
14124
14125#ifdef HAVE_PTHREAD_H
14126#include <pthread.h>
14127#endif
14128
14129
14130 typedef pthread_t ac__type_sizeof_;
14131int
14132main ()
14133{
14134static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14135test_array [0] = 0
14136
14137 ;
14138 return 0;
14139}
14140_ACEOF
14141rm -f conftest.$ac_objext
14142if { (ac_try="$ac_compile"
14143case "(($ac_try" in
14144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14145 *) ac_try_echo=$ac_try;;
14146esac
14147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14148 (eval "$ac_compile") 2>conftest.er1
14149 ac_status=$?
14150 grep -v '^ *+' conftest.er1 >conftest.err
14151 rm -f conftest.er1
14152 cat conftest.err >&5
14153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14154 (exit $ac_status); } && {
14155 test -z "$ac_c_werror_flag" ||
14156 test ! -s conftest.err
14157 } && test -s conftest.$ac_objext; then
14158 ac_hi=$ac_mid; break
14159else
14160 echo "$as_me: failed program was:" >&5
14161sed 's/^/| /' conftest.$ac_ext >&5
14162
14163 ac_lo=`expr $ac_mid + 1`
14164 if test $ac_lo -le $ac_mid; then
14165 ac_lo= ac_hi=
14166 break
14167 fi
14168 ac_mid=`expr 2 '*' $ac_mid + 1`
14169fi
14170
14171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14172 done
14173else
14174 echo "$as_me: failed program was:" >&5
14175sed 's/^/| /' conftest.$ac_ext >&5
14176
14177 cat >conftest.$ac_ext <<_ACEOF
14178/* confdefs.h. */
14179_ACEOF
14180cat confdefs.h >>conftest.$ac_ext
14181cat >>conftest.$ac_ext <<_ACEOF
14182/* end confdefs.h. */
14183
14184#ifdef HAVE_PTHREAD_H
14185#include <pthread.h>
14186#endif
14187
14188
14189 typedef pthread_t ac__type_sizeof_;
14190int
14191main ()
14192{
14193static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14194test_array [0] = 0
14195
14196 ;
14197 return 0;
14198}
14199_ACEOF
14200rm -f conftest.$ac_objext
14201if { (ac_try="$ac_compile"
14202case "(($ac_try" in
14203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14204 *) ac_try_echo=$ac_try;;
14205esac
14206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14207 (eval "$ac_compile") 2>conftest.er1
14208 ac_status=$?
14209 grep -v '^ *+' conftest.er1 >conftest.err
14210 rm -f conftest.er1
14211 cat conftest.err >&5
14212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14213 (exit $ac_status); } && {
14214 test -z "$ac_c_werror_flag" ||
14215 test ! -s conftest.err
14216 } && test -s conftest.$ac_objext; then
14217 ac_hi=-1 ac_mid=-1
14218 while :; do
14219 cat >conftest.$ac_ext <<_ACEOF
14220/* confdefs.h. */
14221_ACEOF
14222cat confdefs.h >>conftest.$ac_ext
14223cat >>conftest.$ac_ext <<_ACEOF
14224/* end confdefs.h. */
14225
14226#ifdef HAVE_PTHREAD_H
14227#include <pthread.h>
14228#endif
14229
14230
14231 typedef pthread_t ac__type_sizeof_;
14232int
14233main ()
14234{
14235static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14236test_array [0] = 0
14237
14238 ;
14239 return 0;
14240}
14241_ACEOF
14242rm -f conftest.$ac_objext
14243if { (ac_try="$ac_compile"
14244case "(($ac_try" in
14245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14246 *) ac_try_echo=$ac_try;;
14247esac
14248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14249 (eval "$ac_compile") 2>conftest.er1
14250 ac_status=$?
14251 grep -v '^ *+' conftest.er1 >conftest.err
14252 rm -f conftest.er1
14253 cat conftest.err >&5
14254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14255 (exit $ac_status); } && {
14256 test -z "$ac_c_werror_flag" ||
14257 test ! -s conftest.err
14258 } && test -s conftest.$ac_objext; then
14259 ac_lo=$ac_mid; break
14260else
14261 echo "$as_me: failed program was:" >&5
14262sed 's/^/| /' conftest.$ac_ext >&5
14263
14264 ac_hi=`expr '(' $ac_mid ')' - 1`
14265 if test $ac_mid -le $ac_hi; then
14266 ac_lo= ac_hi=
14267 break
14268 fi
14269 ac_mid=`expr 2 '*' $ac_mid`
14270fi
14271
14272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14273 done
14274else
14275 echo "$as_me: failed program was:" >&5
14276sed 's/^/| /' conftest.$ac_ext >&5
14277
14278 ac_lo= ac_hi=
14279fi
14280
14281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14282fi
14283
14284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14285# Binary search between lo and hi bounds.
14286while test "x$ac_lo" != "x$ac_hi"; do
14287 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14288 cat >conftest.$ac_ext <<_ACEOF
14289/* confdefs.h. */
14290_ACEOF
14291cat confdefs.h >>conftest.$ac_ext
14292cat >>conftest.$ac_ext <<_ACEOF
14293/* end confdefs.h. */
14294
14295#ifdef HAVE_PTHREAD_H
14296#include <pthread.h>
14297#endif
14298
14299
14300 typedef pthread_t ac__type_sizeof_;
14301int
14302main ()
14303{
14304static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14305test_array [0] = 0
14306
14307 ;
14308 return 0;
14309}
14310_ACEOF
14311rm -f conftest.$ac_objext
14312if { (ac_try="$ac_compile"
14313case "(($ac_try" in
14314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14315 *) ac_try_echo=$ac_try;;
14316esac
14317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14318 (eval "$ac_compile") 2>conftest.er1
14319 ac_status=$?
14320 grep -v '^ *+' conftest.er1 >conftest.err
14321 rm -f conftest.er1
14322 cat conftest.err >&5
14323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14324 (exit $ac_status); } && {
14325 test -z "$ac_c_werror_flag" ||
14326 test ! -s conftest.err
14327 } && test -s conftest.$ac_objext; then
14328 ac_hi=$ac_mid
14329else
14330 echo "$as_me: failed program was:" >&5
14331sed 's/^/| /' conftest.$ac_ext >&5
14332
14333 ac_lo=`expr '(' $ac_mid ')' + 1`
14334fi
14335
14336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14337done
14338case $ac_lo in
14339?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14340'') if test "$ac_cv_type_pthread_t" = yes; then
14341 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14342See \`config.log' for more details." >&5
14343echo "$as_me: error: cannot compute sizeof (pthread_t)
14344See \`config.log' for more details." >&2;}
14345 { (exit 77); exit 77; }; }
14346 else
14347 ac_cv_sizeof_pthread_t=0
14348 fi ;;
14349esac
14350else
14351 cat >conftest.$ac_ext <<_ACEOF
14352/* confdefs.h. */
14353_ACEOF
14354cat confdefs.h >>conftest.$ac_ext
14355cat >>conftest.$ac_ext <<_ACEOF
14356/* end confdefs.h. */
14357
14358#ifdef HAVE_PTHREAD_H
14359#include <pthread.h>
14360#endif
14361
14362
14363 typedef pthread_t ac__type_sizeof_;
14364static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14365static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14366#include <stdio.h>
14367#include <stdlib.h>
14368int
14369main ()
14370{
14371
14372 FILE *f = fopen ("conftest.val", "w");
14373 if (! f)
14374 return 1;
14375 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14376 {
14377 long int i = longval ();
14378 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14379 return 1;
14380 fprintf (f, "%ld\n", i);
14381 }
14382 else
14383 {
14384 unsigned long int i = ulongval ();
14385 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14386 return 1;
14387 fprintf (f, "%lu\n", i);
14388 }
14389 return ferror (f) || fclose (f) != 0;
14390
14391 ;
14392 return 0;
14393}
Martin v. Löwis11437992002-04-12 09:54:03 +000014394_ACEOF
14395rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014396if { (ac_try="$ac_link"
14397case "(($ac_try" in
14398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14399 *) ac_try_echo=$ac_try;;
14400esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014402 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014403 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014405 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014406 { (case "(($ac_try" in
14407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14408 *) ac_try_echo=$ac_try;;
14409esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014411 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014412 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014414 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014415 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014416else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014417 echo "$as_me: program exited with status $ac_status" >&5
14418echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014419sed 's/^/| /' conftest.$ac_ext >&5
14420
Martin v. Löwis11437992002-04-12 09:54:03 +000014421( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014422if test "$ac_cv_type_pthread_t" = yes; then
14423 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14424See \`config.log' for more details." >&5
14425echo "$as_me: error: cannot compute sizeof (pthread_t)
14426See \`config.log' for more details." >&2;}
14427 { (exit 77); exit 77; }; }
14428 else
14429 ac_cv_sizeof_pthread_t=0
14430 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014431fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014432rm -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 +000014433fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014434rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014435fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014436{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014437echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014438
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014439
14440
Martin v. Löwis11437992002-04-12 09:54:03 +000014441cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014442#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014443_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014444
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014445
Trent Mick635f6fb2000-08-23 21:33:05 +000014446fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014447CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014448
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014449{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14450echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014451# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014452if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014453 enableval=$enable_toolbox_glue;
14454fi
Jack Jansene578a632001-08-15 01:27:14 +000014455
14456
14457if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014458then
Jack Jansene578a632001-08-15 01:27:14 +000014459 case $ac_sys_system/$ac_sys_release in
14460 Darwin/*)
14461 enable_toolbox_glue="yes";;
14462 *)
14463 enable_toolbox_glue="no";;
14464 esac
14465fi
14466case "$enable_toolbox_glue" in
14467yes)
Jack Jansene578a632001-08-15 01:27:14 +000014468 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014469 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014470
14471cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014472#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014473_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014474
14475 ;;
14476*)
Jack Jansene578a632001-08-15 01:27:14 +000014477 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014478 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014479 ;;
14480esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014481{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14482echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014483
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014484
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014485
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014486case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014487 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014488 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14489 ;;
14490 Darwin/*)
14491 OTHER_LIBTOOL_OPT=""
14492 ;;
14493esac
14494
14495
Ronald Oussoren25967582009-09-06 10:00:26 +000014496ARCH_RUN_32BIT=""
14497
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014498case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014499 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014500 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14501 if test "${enable_universalsdk}"; then
14502 :
14503 else
Ronald Oussoren25967582009-09-06 10:00:26 +000014504 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014505 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014506 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014507 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014508 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014509 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14510 if test ${gcc_version} '<' 4.0
14511 then
14512 LIBTOOL_CRUFT="-lcc_dynamic"
14513 else
14514 LIBTOOL_CRUFT=""
14515 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014516 if test "$cross_compiling" = yes; then
Ronald Oussoren23d92532009-09-07 06:12:00 +000014517 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +000014518else
14519 cat >conftest.$ac_ext <<_ACEOF
14520/* confdefs.h. */
14521_ACEOF
14522cat confdefs.h >>conftest.$ac_ext
14523cat >>conftest.$ac_ext <<_ACEOF
14524/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +000014525
Ronald Oussoren25967582009-09-06 10:00:26 +000014526 #include <unistd.h>
14527 int main(int argc, char*argv[])
14528 {
14529 if (sizeof(long) == 4) {
14530 return 0;
14531 } else {
14532 return 1;
14533 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +000014534 }
Ronald Oussoren23d92532009-09-07 06:12:00 +000014535
Ronald Oussoren25967582009-09-06 10:00:26 +000014536_ACEOF
14537rm -f conftest$ac_exeext
14538if { (ac_try="$ac_link"
14539case "(($ac_try" in
14540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14541 *) ac_try_echo=$ac_try;;
14542esac
14543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14544 (eval "$ac_link") 2>&5
14545 ac_status=$?
14546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14547 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14548 { (case "(($ac_try" in
14549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14550 *) ac_try_echo=$ac_try;;
14551esac
14552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14553 (eval "$ac_try") 2>&5
14554 ac_status=$?
14555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14556 (exit $ac_status); }; }; then
14557 ac_osx_32bit=yes
14558else
14559 echo "$as_me: program exited with status $ac_status" >&5
14560echo "$as_me: failed program was:" >&5
14561sed 's/^/| /' conftest.$ac_ext >&5
14562
14563( exit $ac_status )
14564ac_osx_32bit=no
14565fi
14566rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14567fi
14568
14569
14570
14571 if test "${ac_osx_32bit}" = "yes"; then
14572 case `arch` in
14573 i386)
14574 MACOSX_DEFAULT_ARCH="i386"
14575 ;;
14576 ppc)
14577 MACOSX_DEFAULT_ARCH="ppc"
14578 ;;
14579 *)
14580 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14581echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14582 { (exit 1); exit 1; }; }
14583 ;;
14584 esac
14585 else
14586 case `arch` in
14587 i386)
14588 MACOSX_DEFAULT_ARCH="x86_64"
14589 ;;
14590 ppc)
14591 MACOSX_DEFAULT_ARCH="ppc64"
14592 ;;
14593 *)
14594 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14595echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14596 { (exit 1); exit 1; }; }
14597 ;;
14598 esac
14599
14600 #ARCH_RUN_32BIT="true"
14601 fi
14602
14603 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014604 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014605 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014606esac
14607
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014608{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14609echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014610if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014611then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014612 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014613 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014614 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014615
Martin v. Löwis11437992002-04-12 09:54:03 +000014616cat >>confdefs.h <<\_ACEOF
14617#define WITH_NEXT_FRAMEWORK 1
14618_ACEOF
14619
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014620 { echo "$as_me:$LINENO: result: yes" >&5
14621echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014622 if test $enable_shared = "yes"
14623 then
Ronald Oussoren9ebd2422009-09-29 13:00:44 +000014624 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
14625echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&2;}
Ronald Oussoren450d5612009-06-08 21:12:41 +000014626 { (exit 1); exit 1; }; }
14627 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014628else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014629 { echo "$as_me:$LINENO: result: no" >&5
14630echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014631fi
14632
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014633{ echo "$as_me:$LINENO: checking for dyld" >&5
14634echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014635case $ac_sys_system/$ac_sys_release in
14636 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014637
Martin v. Löwis11437992002-04-12 09:54:03 +000014638cat >>confdefs.h <<\_ACEOF
14639#define WITH_DYLD 1
14640_ACEOF
14641
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014642 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14643echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014644 ;;
14645 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014646 { echo "$as_me:$LINENO: result: no" >&5
14647echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014648 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014649esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014650
Guido van Rossum0a516c91994-09-12 10:58:40 +000014651# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014652
Michael W. Hudson54241132001-12-07 15:38:26 +000014653
14654
14655
14656
Guido van Rossum0a516c91994-09-12 10:58:40 +000014657# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014658# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014659{ echo "$as_me:$LINENO: checking SO" >&5
14660echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014661if test -z "$SO"
14662then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014663 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014664 hp*|HP*)
14665 case `uname -m` in
14666 ia64) SO=.so;;
14667 *) SO=.sl;;
14668 esac
14669 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014670 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014671 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014672 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014673else
14674 # this might also be a termcap variable, see #610332
14675 echo
14676 echo '====================================================================='
14677 echo '+ +'
14678 echo '+ WARNING: You have set SO in your environment. +'
14679 echo '+ Do you really mean to change the extension for shared libraries? +'
14680 echo '+ Continuing in 10 seconds to let you to ponder. +'
14681 echo '+ +'
14682 echo '====================================================================='
14683 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014684fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014685{ echo "$as_me:$LINENO: result: $SO" >&5
14686echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014687
Ronald Oussoren79f90492009-01-02 10:44:46 +000014688
Neal Norwitz58e28882006-05-19 07:00:58 +000014689cat >>confdefs.h <<_ACEOF
14690#define SHLIB_EXT "$SO"
14691_ACEOF
14692
Guido van Rossum0a516c91994-09-12 10:58:40 +000014693# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014694# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014695# (Shared libraries in this instance are shared modules to be loaded into
14696# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014697{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14698echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014699if test -z "$LDSHARED"
14700then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014701 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014702 AIX*)
14703 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014704 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014705 ;;
14706 BeOS*)
14707 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014708 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014709 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014710 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014711 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014712 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000014713 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014714 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014715 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000014716 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014717 hp*|HP*)
14718 if test "$GCC" = "yes"
14719 then LDSHARED='$(CC) -shared'
14720 else LDSHARED='ld -b';
14721 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014722 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014723 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014724 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14725 if test "$enable_framework" ; then
14726 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014727 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14728 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014729 else
14730 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014731 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014732 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014733 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014734 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14735 if test "$enable_framework" ; then
14736 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014737 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14738 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014739 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014740 # No framework, use the Python app as bundle-loader
14741 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014742 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014743 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014744 Darwin/*)
14745 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14746 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014747
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014748 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014749 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014750 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014751 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014752 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014753 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14754 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014755 else
14756 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14757 if test "$enable_framework" ; then
14758 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014759 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14760 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014761 else
14762 # No framework, use the Python app as bundle-loader
14763 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14764 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14765 fi
14766 fi
14767 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014768 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014769 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014770 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014771 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014772 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014773 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014774 else
14775 LDSHARED="ld -Bshareable ${LDFLAGS}"
14776 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014777 OpenBSD*)
14778 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14779 then
14780 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14781 else
14782 case `uname -r` in
14783 [01].* | 2.[0-7] | 2.[0-7].*)
14784 LDSHARED="ld -Bshareable ${LDFLAGS}"
14785 ;;
14786 *)
14787 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14788 ;;
14789 esac
14790 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014791 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014792 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014793 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014794 then LDSHARED='$(CC) -shared'
14795 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014796 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014797 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014798 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014799 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014800 *) LDSHARED="ld";;
14801 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014802fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014803{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14804echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014805BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014806# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014807# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014808{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14809echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014810if test -z "$CCSHARED"
14811then
Guido van Rossum07397971997-04-29 21:49:50 +000014812 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014813 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014814 then CCSHARED="-fPIC";
14815 elif test `uname -p` = sparc;
14816 then CCSHARED="-xcode=pic32";
14817 else CCSHARED="-Kpic";
14818 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014819 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014820 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014821 else CCSHARED="+z";
14822 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014823 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014824 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014825 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014826 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014827 if test "$GCC" = "yes"
14828 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014829 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014830 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014831 SCO_SV*)
14832 if test "$GCC" = "yes"
14833 then CCSHARED="-fPIC"
14834 else CCSHARED="-Kpic -belf"
14835 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014836 IRIX*/6*) case $CC in
14837 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014838 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014839 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014840 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014841 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014842fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014843{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14844echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014845# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014846# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014847{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14848echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014849if test -z "$LINKFORSHARED"
14850then
Guido van Rossum07397971997-04-29 21:49:50 +000014851 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014852 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014853 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014854 LINKFORSHARED="-Wl,-E -Wl,+s";;
14855# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014856 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014857 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014858 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014859 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014860 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14861 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014862 # not used by the core itself but which needs to be in the core so
14863 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014864 # -prebind is no longer used, because it actually seems to give a
14865 # slowdown in stead of a speedup, maybe due to the large number of
14866 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014867
14868 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014869 if test "$enable_framework"
14870 then
Jack Jansenda49e192005-01-07 13:08:22 +000014871 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014872 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014873 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014874 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014875 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014876 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014877 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014878 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14879 then
14880 LINKFORSHARED="-Wl,--export-dynamic"
14881 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014882 SunOS/5*) case $CC in
14883 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014884 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014885 then
14886 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014887 fi;;
14888 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014889 CYGWIN*)
14890 if test $enable_shared = "no"
14891 then
14892 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14893 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014894 QNX*)
14895 # -Wl,-E causes the symbols to be added to the dynamic
14896 # symbol table so that they can be found when a module
14897 # is loaded. -N 2048K causes the stack size to be set
14898 # to 2048 kilobytes so that the stack doesn't overflow
14899 # when running test_compile.py.
14900 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014901 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014902fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014903{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14904echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014905
Michael W. Hudson54241132001-12-07 15:38:26 +000014906
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014907
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014908{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14909echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014910if test ! "$LIBRARY" = "$LDLIBRARY"
14911then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014912 case $ac_sys_system in
14913 CYGWIN*)
14914 # Cygwin needs CCSHARED when building extension DLLs
14915 # but not when building the interpreter DLL.
14916 CFLAGSFORSHARED='';;
14917 *)
14918 CFLAGSFORSHARED='$(CCSHARED)'
14919 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014920fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014921{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14922echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014923
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014924# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14925# library (with --enable-shared).
14926# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014927# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14928# if it is not required, since it creates a dependency of the shared library
14929# to LIBS. This, in turn, means that applications linking the shared libpython
14930# don't need to link LIBS explicitly. The default should be only changed
14931# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014932
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014933{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14934echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014935case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014936 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014937 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014938esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014939{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14940echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014941
14942
Guido van Rossum627b2d71993-12-24 10:39:16 +000014943# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014944
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014945{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14946echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014947if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014948 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014949else
Martin v. Löwis11437992002-04-12 09:54:03 +000014950 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014951LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014952cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014953/* confdefs.h. */
14954_ACEOF
14955cat confdefs.h >>conftest.$ac_ext
14956cat >>conftest.$ac_ext <<_ACEOF
14957/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014958
Martin v. Löwiseba40652007-08-30 20:10:57 +000014959/* Override any GCC internal prototype to avoid an error.
14960 Use char because int might match the return type of a GCC
14961 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014962#ifdef __cplusplus
14963extern "C"
14964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014965char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014966int
14967main ()
14968{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014969return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014970 ;
14971 return 0;
14972}
14973_ACEOF
14974rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014975if { (ac_try="$ac_link"
14976case "(($ac_try" in
14977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14978 *) ac_try_echo=$ac_try;;
14979esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014981 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014983 grep -v '^ *+' conftest.er1 >conftest.err
14984 rm -f conftest.er1
14985 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014987 (exit $ac_status); } && {
14988 test -z "$ac_c_werror_flag" ||
14989 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014990 } && test -s conftest$ac_exeext &&
14991 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014992 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014993else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014995sed 's/^/| /' conftest.$ac_ext >&5
14996
Martin v. Löwiseba40652007-08-30 20:10:57 +000014997 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014998fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014999
15000rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015001 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015002LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015003fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015004{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
15005echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
15006if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015007 cat >>confdefs.h <<_ACEOF
15008#define HAVE_LIBDL 1
15009_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015010
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015011 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015012
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015013fi
15014 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015015
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015016{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15017echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015018if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015019 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015020else
Martin v. Löwis11437992002-04-12 09:54:03 +000015021 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015022LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015023cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015024/* confdefs.h. */
15025_ACEOF
15026cat confdefs.h >>conftest.$ac_ext
15027cat >>conftest.$ac_ext <<_ACEOF
15028/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015029
Martin v. Löwiseba40652007-08-30 20:10:57 +000015030/* Override any GCC internal prototype to avoid an error.
15031 Use char because int might match the return type of a GCC
15032 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015033#ifdef __cplusplus
15034extern "C"
15035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015036char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015037int
15038main ()
15039{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015040return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015041 ;
15042 return 0;
15043}
15044_ACEOF
15045rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015046if { (ac_try="$ac_link"
15047case "(($ac_try" in
15048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15049 *) ac_try_echo=$ac_try;;
15050esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015052 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015054 grep -v '^ *+' conftest.er1 >conftest.err
15055 rm -f conftest.er1
15056 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015058 (exit $ac_status); } && {
15059 test -z "$ac_c_werror_flag" ||
15060 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015061 } && test -s conftest$ac_exeext &&
15062 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015063 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015064else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015066sed 's/^/| /' conftest.$ac_ext >&5
15067
Martin v. Löwiseba40652007-08-30 20:10:57 +000015068 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015070
15071rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015072 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015073LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015074fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015075{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15076echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15077if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015078 cat >>confdefs.h <<_ACEOF
15079#define HAVE_LIBDLD 1
15080_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015081
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015082 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015083
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015084fi
15085 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015086
Ronald Oussoren79f90492009-01-02 10:44:46 +000015087# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015088if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015089 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15090echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015091if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015092 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015093else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015094 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015095cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015096/* confdefs.h. */
15097_ACEOF
15098cat confdefs.h >>conftest.$ac_ext
15099cat >>conftest.$ac_ext <<_ACEOF
15100/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015101
Martin v. Löwiseba40652007-08-30 20:10:57 +000015102/* Override any GCC internal prototype to avoid an error.
15103 Use char because int might match the return type of a GCC
15104 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015105#ifdef __cplusplus
15106extern "C"
15107#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015108char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015109int
15110main ()
15111{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015112return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015113 ;
15114 return 0;
15115}
15116_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015117for ac_lib in '' pthread rt posix4; do
15118 if test -z "$ac_lib"; then
15119 ac_res="none required"
15120 else
15121 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015122 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015123 fi
15124 rm -f conftest.$ac_objext conftest$ac_exeext
15125if { (ac_try="$ac_link"
15126case "(($ac_try" in
15127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15128 *) ac_try_echo=$ac_try;;
15129esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015131 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015132 ac_status=$?
15133 grep -v '^ *+' conftest.er1 >conftest.err
15134 rm -f conftest.er1
15135 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015137 (exit $ac_status); } && {
15138 test -z "$ac_c_werror_flag" ||
15139 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015140 } && test -s conftest$ac_exeext &&
15141 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015142 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015143else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015144 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015145sed 's/^/| /' conftest.$ac_ext >&5
15146
Martin v. Löwiseba40652007-08-30 20:10:57 +000015147
Brett Cannon19fab762007-06-02 03:02:29 +000015148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015149
15150rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15151 conftest$ac_exeext
15152 if test "${ac_cv_search_sem_init+set}" = set; then
15153 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015155done
15156if test "${ac_cv_search_sem_init+set}" = set; then
15157 :
15158else
15159 ac_cv_search_sem_init=no
15160fi
15161rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015162LIBS=$ac_func_search_save_LIBS
15163fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015164{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15165echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015166ac_res=$ac_cv_search_sem_init
15167if test "$ac_res" != no; then
15168 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015169
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015170fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015171 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015172 # posix4 on Solaris 2.6
15173 # pthread (first!) on Linux
15174fi
15175
Martin v. Löwis19d17342003-06-14 21:03:05 +000015176# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015177{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15178echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015179if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015180 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015181else
15182 ac_check_lib_save_LIBS=$LIBS
15183LIBS="-lintl $LIBS"
15184cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015185/* confdefs.h. */
15186_ACEOF
15187cat confdefs.h >>conftest.$ac_ext
15188cat >>conftest.$ac_ext <<_ACEOF
15189/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015190
Martin v. Löwiseba40652007-08-30 20:10:57 +000015191/* Override any GCC internal prototype to avoid an error.
15192 Use char because int might match the return type of a GCC
15193 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015194#ifdef __cplusplus
15195extern "C"
15196#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015197char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015198int
15199main ()
15200{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015201return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015202 ;
15203 return 0;
15204}
15205_ACEOF
15206rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015207if { (ac_try="$ac_link"
15208case "(($ac_try" in
15209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15210 *) ac_try_echo=$ac_try;;
15211esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015213 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015214 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015215 grep -v '^ *+' conftest.er1 >conftest.err
15216 rm -f conftest.er1
15217 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015219 (exit $ac_status); } && {
15220 test -z "$ac_c_werror_flag" ||
15221 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015222 } && test -s conftest$ac_exeext &&
15223 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015224 ac_cv_lib_intl_textdomain=yes
15225else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015227sed 's/^/| /' conftest.$ac_ext >&5
15228
Martin v. Löwiseba40652007-08-30 20:10:57 +000015229 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015231
15232rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015233 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015234LIBS=$ac_check_lib_save_LIBS
15235fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015236{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15237echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15238if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015239
15240cat >>confdefs.h <<\_ACEOF
15241#define WITH_LIBINTL 1
15242_ACEOF
15243
15244fi
15245
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015246
15247# checks for system dependent C++ extensions support
15248case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015249 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15250echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015251 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015252/* confdefs.h. */
15253_ACEOF
15254cat confdefs.h >>conftest.$ac_ext
15255cat >>conftest.$ac_ext <<_ACEOF
15256/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015257#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015258int
15259main ()
15260{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015261loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015262 ;
15263 return 0;
15264}
15265_ACEOF
15266rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015267if { (ac_try="$ac_link"
15268case "(($ac_try" in
15269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15270 *) ac_try_echo=$ac_try;;
15271esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015273 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015274 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015275 grep -v '^ *+' conftest.er1 >conftest.err
15276 rm -f conftest.er1
15277 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015279 (exit $ac_status); } && {
15280 test -z "$ac_c_werror_flag" ||
15281 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015282 } && test -s conftest$ac_exeext &&
15283 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015284
Martin v. Löwis11437992002-04-12 09:54:03 +000015285cat >>confdefs.h <<\_ACEOF
15286#define AIX_GENUINE_CPLUSPLUS 1
15287_ACEOF
15288
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015289 { echo "$as_me:$LINENO: result: yes" >&5
15290echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015291else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015293sed 's/^/| /' conftest.$ac_ext >&5
15294
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015295 { echo "$as_me:$LINENO: result: no" >&5
15296echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015298
15299rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015300 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015301 *) ;;
15302esac
15303
Guido van Rossum70c7f481998-03-26 18:44:10 +000015304# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015305# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015306{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15307echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015308if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015309 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015310else
Martin v. Löwis11437992002-04-12 09:54:03 +000015311 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015312LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015313cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015314/* confdefs.h. */
15315_ACEOF
15316cat confdefs.h >>conftest.$ac_ext
15317cat >>conftest.$ac_ext <<_ACEOF
15318/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015319
Martin v. Löwiseba40652007-08-30 20:10:57 +000015320/* Override any GCC internal prototype to avoid an error.
15321 Use char because int might match the return type of a GCC
15322 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015323#ifdef __cplusplus
15324extern "C"
15325#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015326char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015327int
15328main ()
15329{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015330return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015331 ;
15332 return 0;
15333}
15334_ACEOF
15335rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015336if { (ac_try="$ac_link"
15337case "(($ac_try" in
15338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15339 *) ac_try_echo=$ac_try;;
15340esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015342 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015343 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015344 grep -v '^ *+' conftest.er1 >conftest.err
15345 rm -f conftest.er1
15346 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015348 (exit $ac_status); } && {
15349 test -z "$ac_c_werror_flag" ||
15350 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015351 } && test -s conftest$ac_exeext &&
15352 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015353 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015354else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015356sed 's/^/| /' conftest.$ac_ext >&5
15357
Martin v. Löwiseba40652007-08-30 20:10:57 +000015358 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015359fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015360
15361rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015362 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015363LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015364fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015365{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15366echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15367if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015368 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015369fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015370 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015371{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15372echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015373if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015374 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015375else
Martin v. Löwis11437992002-04-12 09:54:03 +000015376 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015377LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015378cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015379/* confdefs.h. */
15380_ACEOF
15381cat confdefs.h >>conftest.$ac_ext
15382cat >>conftest.$ac_ext <<_ACEOF
15383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015384
Martin v. Löwiseba40652007-08-30 20:10:57 +000015385/* Override any GCC internal prototype to avoid an error.
15386 Use char because int might match the return type of a GCC
15387 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015388#ifdef __cplusplus
15389extern "C"
15390#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015391char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015392int
15393main ()
15394{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015395return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015396 ;
15397 return 0;
15398}
15399_ACEOF
15400rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015401if { (ac_try="$ac_link"
15402case "(($ac_try" in
15403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15404 *) ac_try_echo=$ac_try;;
15405esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015407 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015408 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015409 grep -v '^ *+' conftest.er1 >conftest.err
15410 rm -f conftest.er1
15411 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015413 (exit $ac_status); } && {
15414 test -z "$ac_c_werror_flag" ||
15415 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015416 } && test -s conftest$ac_exeext &&
15417 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015418 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015419else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015420 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015421sed 's/^/| /' conftest.$ac_ext >&5
15422
Martin v. Löwiseba40652007-08-30 20:10:57 +000015423 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015424fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015425
15426rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015427 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015428LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015429fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015430{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15431echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15432if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015433 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015434fi
15435 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015436
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015437case "$ac_sys_system" in
15438BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015439{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15440echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015441if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015442 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015443else
Martin v. Löwis11437992002-04-12 09:54:03 +000015444 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015445LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015446cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015447/* confdefs.h. */
15448_ACEOF
15449cat confdefs.h >>conftest.$ac_ext
15450cat >>conftest.$ac_ext <<_ACEOF
15451/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015452
Martin v. Löwiseba40652007-08-30 20:10:57 +000015453/* Override any GCC internal prototype to avoid an error.
15454 Use char because int might match the return type of a GCC
15455 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015456#ifdef __cplusplus
15457extern "C"
15458#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015459char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015460int
15461main ()
15462{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015463return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015464 ;
15465 return 0;
15466}
15467_ACEOF
15468rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015469if { (ac_try="$ac_link"
15470case "(($ac_try" in
15471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15472 *) ac_try_echo=$ac_try;;
15473esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015475 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015476 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015477 grep -v '^ *+' conftest.er1 >conftest.err
15478 rm -f conftest.er1
15479 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015481 (exit $ac_status); } && {
15482 test -z "$ac_c_werror_flag" ||
15483 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015484 } && test -s conftest$ac_exeext &&
15485 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015486 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015487else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015488 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015489sed 's/^/| /' conftest.$ac_ext >&5
15490
Martin v. Löwiseba40652007-08-30 20:10:57 +000015491 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015493
15494rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015495 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015496LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015497fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015498{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15499echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15500if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015501 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015502fi
15503 # BeOS
15504;;
15505esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015506
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015507{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15508echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015509
Martin v. Löwiseba40652007-08-30 20:10:57 +000015510# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015511if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015512 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015513{ echo "$as_me:$LINENO: result: $withval" >&5
15514echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015515LIBS="$withval $LIBS"
15516
15517else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015518 { echo "$as_me:$LINENO: result: no" >&5
15519echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015520fi
15521
Guido van Rossum7f43da71994-08-01 12:15:30 +000015522
Benjamin Peterson2c196742009-12-31 03:17:18 +000015523# Check for use of the system expat library
15524{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15525echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15526
15527# Check whether --with-system_expat was given.
15528if test "${with_system_expat+set}" = set; then
15529 withval=$with_system_expat;
15530fi
15531
15532
15533{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15534echo "${ECHO_T}$with_system_expat" >&6; }
15535
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015536# Check for use of the system libffi library
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015537{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15538echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015539
Martin v. Löwiseba40652007-08-30 20:10:57 +000015540# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015541if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015542 withval=$with_system_ffi;
15543fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015544
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015545
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015546{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15547echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015548
Benjamin Peterson867475c2009-04-29 20:36:25 +000015549# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015550{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15551echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015552
15553# Check whether --with-dbmliborder was given.
15554if test "${with_dbmliborder+set}" = set; then
15555 withval=$with_dbmliborder;
15556if test x$with_dbmliborder = xyes
15557then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015558{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15559echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015560 { (exit 1); exit 1; }; }
15561else
15562 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15563 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15564 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015565 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15566echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015567 { (exit 1); exit 1; }; }
15568 fi
15569 done
15570fi
15571fi
15572
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015573{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15574echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015575
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015576# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015577
15578
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015579{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15580echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015581
Martin v. Löwiseba40652007-08-30 20:10:57 +000015582# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015583if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015584 withval=$with_signal_module;
15585fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015586
15587
15588if test -z "$with_signal_module"
15589then with_signal_module="yes"
15590fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015591{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15592echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015593
15594if test "${with_signal_module}" = "yes"; then
15595 USE_SIGNAL_MODULE=""
15596 SIGNAL_OBJS=""
15597else
15598 USE_SIGNAL_MODULE="#"
15599 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15600fi
15601
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015602# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015603
Barry Warsawc0d24d82000-06-29 16:12:00 +000015604USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015605
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015606{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15607echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015608
Guido van Rossumec2f0731997-01-22 20:54:01 +000015609
Martin v. Löwiseba40652007-08-30 20:10:57 +000015610# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015611if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015612 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015613{ echo "$as_me:$LINENO: result: $withval" >&5
15614echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015615LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015616if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015617 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015618fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015619else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015620 { echo "$as_me:$LINENO: result: no" >&5
15621echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015622fi
15623
Martin v. Löwis11437992002-04-12 09:54:03 +000015624
15625# Templates for things AC_DEFINEd more than once.
15626# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015627
15628
Martin v. Löwis11437992002-04-12 09:54:03 +000015629
15630
15631
15632
15633
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015634{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15635echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015636
Martin v. Löwiseba40652007-08-30 20:10:57 +000015637# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015638if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015639 withval=$with_threads;
15640fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015641
15642
Barry Warsawc0d24d82000-06-29 16:12:00 +000015643# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015644
Martin v. Löwiseba40652007-08-30 20:10:57 +000015645# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015646if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015647 withval=$with_thread; with_threads=$with_thread
15648fi
15649
Barry Warsawc0d24d82000-06-29 16:12:00 +000015650
15651if test -z "$with_threads"
15652then with_threads="yes"
15653fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015654{ echo "$as_me:$LINENO: result: $with_threads" >&5
15655echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015656
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015657
Barry Warsawc0d24d82000-06-29 16:12:00 +000015658if test "$with_threads" = "no"
15659then
15660 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015661elif test "$ac_cv_pthread_is_default" = yes
15662then
Martin v. Löwis11437992002-04-12 09:54:03 +000015663 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015664#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015665_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015666
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015667 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015668 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015669#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015670_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015671
15672 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015673 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015674elif test "$ac_cv_kpthread" = "yes"
15675then
15676 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015677 if test "$ac_cv_cxx_thread" = "yes"; then
15678 CXX="$CXX -Kpthread"
15679 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015680 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015681#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015682_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015683
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015684 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015685 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015686elif test "$ac_cv_kthread" = "yes"
15687then
15688 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015689 if test "$ac_cv_cxx_thread" = "yes"; then
15690 CXX="$CXX -Kthread"
15691 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015692 cat >>confdefs.h <<\_ACEOF
15693#define WITH_THREAD 1
15694_ACEOF
15695
15696 posix_threads=yes
15697 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015698elif test "$ac_cv_pthread" = "yes"
15699then
15700 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015701 if test "$ac_cv_cxx_thread" = "yes"; then
15702 CXX="$CXX -pthread"
15703 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015704 cat >>confdefs.h <<\_ACEOF
15705#define WITH_THREAD 1
15706_ACEOF
15707
15708 posix_threads=yes
15709 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015710else
15711 if test ! -z "$with_threads" -a -d "$with_threads"
15712 then LDFLAGS="$LDFLAGS -L$with_threads"
15713 fi
15714 if test ! -z "$withval" -a -d "$withval"
15715 then LDFLAGS="$LDFLAGS -L$withval"
15716 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015717
15718 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015719 # define _POSIX_THREADS in unistd.h. Some apparently don't
15720 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015721 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15722echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015723 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015724/* confdefs.h. */
15725_ACEOF
15726cat confdefs.h >>conftest.$ac_ext
15727cat >>conftest.$ac_ext <<_ACEOF
15728/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015729
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015730#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015731#ifdef _POSIX_THREADS
15732yes
15733#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015734
15735_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015736if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015737 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015738 unistd_defines_pthreads=yes
15739else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015740 unistd_defines_pthreads=no
15741fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000015742rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015743
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015744 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15745echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015746
Martin v. Löwis11437992002-04-12 09:54:03 +000015747 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015748#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015749_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015750
Martin v. Löwis11437992002-04-12 09:54:03 +000015751 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015752 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15753echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015754if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015755 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015756fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015757{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15758echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015759else
Martin v. Löwis11437992002-04-12 09:54:03 +000015760 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015761{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15762echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015763cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015764/* confdefs.h. */
15765_ACEOF
15766cat confdefs.h >>conftest.$ac_ext
15767cat >>conftest.$ac_ext <<_ACEOF
15768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015769$ac_includes_default
15770#include <cthreads.h>
15771_ACEOF
15772rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015773if { (ac_try="$ac_compile"
15774case "(($ac_try" in
15775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15776 *) ac_try_echo=$ac_try;;
15777esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015779 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015781 grep -v '^ *+' conftest.er1 >conftest.err
15782 rm -f conftest.er1
15783 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015785 (exit $ac_status); } && {
15786 test -z "$ac_c_werror_flag" ||
15787 test ! -s conftest.err
15788 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015789 ac_header_compiler=yes
15790else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015792sed 's/^/| /' conftest.$ac_ext >&5
15793
Martin v. Löwiseba40652007-08-30 20:10:57 +000015794 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015796
15797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015798{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15799echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015800
15801# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015802{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15803echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015804cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015805/* confdefs.h. */
15806_ACEOF
15807cat confdefs.h >>conftest.$ac_ext
15808cat >>conftest.$ac_ext <<_ACEOF
15809/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015810#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015811_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015812if { (ac_try="$ac_cpp conftest.$ac_ext"
15813case "(($ac_try" in
15814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15815 *) ac_try_echo=$ac_try;;
15816esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015818 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015819 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015820 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015821 rm -f conftest.er1
15822 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015824 (exit $ac_status); } >/dev/null && {
15825 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15826 test ! -s conftest.err
15827 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015828 ac_header_preproc=yes
15829else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015831sed 's/^/| /' conftest.$ac_ext >&5
15832
Martin v. Löwis11437992002-04-12 09:54:03 +000015833 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015835
Martin v. Löwis11437992002-04-12 09:54:03 +000015836rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015837{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15838echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015839
15840# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015841case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15842 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015843 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15844echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15845 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15846echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015847 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015848 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015849 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015850 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15851echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15852 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15853echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15854 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15855echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15856 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15857echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15858 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15859echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15860 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15861echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015862 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015863## -------------------------------------- ##
15864## Report this to http://bugs.python.org/ ##
15865## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015866_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015867 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015868 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015869esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015870{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15871echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015872if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015873 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015874else
15875 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015876fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015877{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15878echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015879
15880fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015881if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015882 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015883#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015884_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015885
Martin v. Löwis11437992002-04-12 09:54:03 +000015886 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015887#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015888_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015889
Martin v. Löwis11437992002-04-12 09:54:03 +000015890
15891cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015892#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015893_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015894
15895 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015896 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015897else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015898
Martin v. Löwis11437992002-04-12 09:54:03 +000015899 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015900 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15901echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015902if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015903 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015904fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015905{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15906echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015907else
Martin v. Löwis11437992002-04-12 09:54:03 +000015908 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015909{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15910echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015911cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015912/* confdefs.h. */
15913_ACEOF
15914cat confdefs.h >>conftest.$ac_ext
15915cat >>conftest.$ac_ext <<_ACEOF
15916/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015917$ac_includes_default
15918#include <mach/cthreads.h>
15919_ACEOF
15920rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015921if { (ac_try="$ac_compile"
15922case "(($ac_try" in
15923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15924 *) ac_try_echo=$ac_try;;
15925esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015927 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015928 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015929 grep -v '^ *+' conftest.er1 >conftest.err
15930 rm -f conftest.er1
15931 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015933 (exit $ac_status); } && {
15934 test -z "$ac_c_werror_flag" ||
15935 test ! -s conftest.err
15936 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015937 ac_header_compiler=yes
15938else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015940sed 's/^/| /' conftest.$ac_ext >&5
15941
Martin v. Löwiseba40652007-08-30 20:10:57 +000015942 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015943fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015944
15945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015946{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15947echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015948
15949# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015950{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15951echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015952cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015953/* confdefs.h. */
15954_ACEOF
15955cat confdefs.h >>conftest.$ac_ext
15956cat >>conftest.$ac_ext <<_ACEOF
15957/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015958#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015959_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015960if { (ac_try="$ac_cpp conftest.$ac_ext"
15961case "(($ac_try" in
15962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15963 *) ac_try_echo=$ac_try;;
15964esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015966 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015967 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015968 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015969 rm -f conftest.er1
15970 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015972 (exit $ac_status); } >/dev/null && {
15973 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15974 test ! -s conftest.err
15975 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015976 ac_header_preproc=yes
15977else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015978 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015979sed 's/^/| /' conftest.$ac_ext >&5
15980
Martin v. Löwis11437992002-04-12 09:54:03 +000015981 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015983
Martin v. Löwis11437992002-04-12 09:54:03 +000015984rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015985{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15986echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015987
15988# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015989case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15990 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015991 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15992echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15993 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15994echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015995 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015996 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015997 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015998 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15999echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
16000 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
16001echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
16002 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
16003echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
16004 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16005echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16006 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
16007echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
16008 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
16009echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016010 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016011## -------------------------------------- ##
16012## Report this to http://bugs.python.org/ ##
16013## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016014_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016015 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016016 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016017esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016018{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16019echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016020if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016021 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016022else
16023 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016024fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016025{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16026echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016027
16028fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016029if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016030 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016031#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016032_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016033
Martin v. Löwis11437992002-04-12 09:54:03 +000016034 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016035#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016036_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016037
Martin v. Löwis11437992002-04-12 09:54:03 +000016038
16039cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016040#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016041_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016042
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016043 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016044else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016045
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016046 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16047echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016048
Martin v. Löwiseba40652007-08-30 20:10:57 +000016049# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016050if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016051 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16052echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016053 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016054#define WITH_THREAD 1
16055_ACEOF
16056
16057
16058cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016059#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016060_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016061
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016062 LIBS="-lpth $LIBS"
16063 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016064else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016065 { echo "$as_me:$LINENO: result: no" >&5
16066echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016067
16068 # Just looking for pthread_create in libpthread is not enough:
16069 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16070 # So we really have to include pthread.h, and then link.
16071 _libs=$LIBS
16072 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016073 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16074echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016075 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016076/* confdefs.h. */
16077_ACEOF
16078cat confdefs.h >>conftest.$ac_ext
16079cat >>conftest.$ac_ext <<_ACEOF
16080/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016081#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016082
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016083void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016084int
16085main ()
16086{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016087
16088pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016089 ;
16090 return 0;
16091}
16092_ACEOF
16093rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016094if { (ac_try="$ac_link"
16095case "(($ac_try" in
16096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16097 *) ac_try_echo=$ac_try;;
16098esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016100 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016101 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016102 grep -v '^ *+' conftest.er1 >conftest.err
16103 rm -f conftest.er1
16104 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016106 (exit $ac_status); } && {
16107 test -z "$ac_c_werror_flag" ||
16108 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016109 } && test -s conftest$ac_exeext &&
16110 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016111
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016112 { echo "$as_me:$LINENO: result: yes" >&5
16113echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016114 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016115#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016116_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016117
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016118 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016119 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016120else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016121 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016122sed 's/^/| /' conftest.$ac_ext >&5
16123
Martin v. Löwis11437992002-04-12 09:54:03 +000016124
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016125 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016126 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16127echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016128if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016129 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016130else
Martin v. Löwis11437992002-04-12 09:54:03 +000016131 cat >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öwis4ddc78a2006-01-29 09:53:44 +000016137/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16138 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16139#define pthread_detach innocuous_pthread_detach
16140
Guido van Rossumad678af1998-10-02 14:42:15 +000016141/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016142 which can conflict with char pthread_detach (); below.
16143 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016144 <limits.h> exists even on freestanding compilers. */
16145
16146#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016147# include <limits.h>
16148#else
16149# include <assert.h>
16150#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016151
16152#undef pthread_detach
16153
Martin v. Löwiseba40652007-08-30 20:10:57 +000016154/* Override any GCC internal prototype to avoid an error.
16155 Use char because int might match the return type of a GCC
16156 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016157#ifdef __cplusplus
16158extern "C"
16159#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016160char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016161/* The GNU C library defines this for functions which it implements
16162 to always fail with ENOSYS. Some functions are actually named
16163 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016164#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016165choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016166#endif
16167
Skip Montanaro6dead952003-09-25 14:50:04 +000016168int
16169main ()
16170{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016171return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016172 ;
16173 return 0;
16174}
16175_ACEOF
16176rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016177if { (ac_try="$ac_link"
16178case "(($ac_try" in
16179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16180 *) ac_try_echo=$ac_try;;
16181esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016183 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016184 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016185 grep -v '^ *+' conftest.er1 >conftest.err
16186 rm -f conftest.er1
16187 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016189 (exit $ac_status); } && {
16190 test -z "$ac_c_werror_flag" ||
16191 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016192 } && test -s conftest$ac_exeext &&
16193 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016194 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016195else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016197sed 's/^/| /' conftest.$ac_ext >&5
16198
Martin v. Löwiseba40652007-08-30 20:10:57 +000016199 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016200fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016201
16202rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016203 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016204fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016205{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16206echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16207if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016208 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016209#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016210_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016211
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016212 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016213 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016214else
Guido van Rossumad678af1998-10-02 14:42:15 +000016215
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016216 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016217 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16218echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016219if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016220 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016221fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016222{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16223echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016224else
16225 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016226{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16227echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016228cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016229/* confdefs.h. */
16230_ACEOF
16231cat confdefs.h >>conftest.$ac_ext
16232cat >>conftest.$ac_ext <<_ACEOF
16233/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016234$ac_includes_default
16235#include <atheos/threads.h>
16236_ACEOF
16237rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016238if { (ac_try="$ac_compile"
16239case "(($ac_try" in
16240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16241 *) ac_try_echo=$ac_try;;
16242esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016244 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016245 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016246 grep -v '^ *+' conftest.er1 >conftest.err
16247 rm -f conftest.er1
16248 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016250 (exit $ac_status); } && {
16251 test -z "$ac_c_werror_flag" ||
16252 test ! -s conftest.err
16253 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016254 ac_header_compiler=yes
16255else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016257sed 's/^/| /' conftest.$ac_ext >&5
16258
Martin v. Löwiseba40652007-08-30 20:10:57 +000016259 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016261
16262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016263{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16264echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016265
16266# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016267{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16268echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016269cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016270/* confdefs.h. */
16271_ACEOF
16272cat confdefs.h >>conftest.$ac_ext
16273cat >>conftest.$ac_ext <<_ACEOF
16274/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016275#include <atheos/threads.h>
16276_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016277if { (ac_try="$ac_cpp conftest.$ac_ext"
16278case "(($ac_try" in
16279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16280 *) ac_try_echo=$ac_try;;
16281esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016283 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016284 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016285 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016286 rm -f conftest.er1
16287 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016289 (exit $ac_status); } >/dev/null && {
16290 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16291 test ! -s conftest.err
16292 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016293 ac_header_preproc=yes
16294else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016296sed 's/^/| /' conftest.$ac_ext >&5
16297
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016298 ac_header_preproc=no
16299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016300
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016301rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016302{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16303echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016304
16305# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016306case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16307 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016308 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16309echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16310 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16311echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016312 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016313 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016314 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016315 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16316echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16317 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16318echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16319 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16320echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16321 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16322echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16323 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16324echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16325 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16326echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016327 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016328## -------------------------------------- ##
16329## Report this to http://bugs.python.org/ ##
16330## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016331_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016332 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016333 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016334esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016335{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16336echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016337if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016338 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016339else
16340 ac_cv_header_atheos_threads_h=$ac_header_preproc
16341fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016342{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16343echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016344
16345fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016346if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016347 cat >>confdefs.h <<\_ACEOF
16348#define WITH_THREAD 1
16349_ACEOF
16350
16351
16352cat >>confdefs.h <<\_ACEOF
16353#define ATHEOS_THREADS 1
16354_ACEOF
16355
16356 THREADOBJ="Python/thread.o"
16357else
16358
Martin v. Löwis11437992002-04-12 09:54:03 +000016359 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016360 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16361echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016362if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016363 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016364fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016365{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16366echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016367else
Martin v. Löwis11437992002-04-12 09:54:03 +000016368 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016369{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16370echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
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$ac_includes_default
16378#include <kernel/OS.h>
16379_ACEOF
16380rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016381if { (ac_try="$ac_compile"
16382case "(($ac_try" in
16383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16384 *) ac_try_echo=$ac_try;;
16385esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016387 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016388 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016389 grep -v '^ *+' conftest.er1 >conftest.err
16390 rm -f conftest.er1
16391 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016393 (exit $ac_status); } && {
16394 test -z "$ac_c_werror_flag" ||
16395 test ! -s conftest.err
16396 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016397 ac_header_compiler=yes
16398else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016400sed 's/^/| /' conftest.$ac_ext >&5
16401
Martin v. Löwiseba40652007-08-30 20:10:57 +000016402 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016404
16405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016406{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16407echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016408
16409# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016410{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16411echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016412cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016413/* confdefs.h. */
16414_ACEOF
16415cat confdefs.h >>conftest.$ac_ext
16416cat >>conftest.$ac_ext <<_ACEOF
16417/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016418#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016419_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016420if { (ac_try="$ac_cpp conftest.$ac_ext"
16421case "(($ac_try" in
16422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16423 *) ac_try_echo=$ac_try;;
16424esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016426 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016427 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016428 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016429 rm -f conftest.er1
16430 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016432 (exit $ac_status); } >/dev/null && {
16433 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16434 test ! -s conftest.err
16435 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016436 ac_header_preproc=yes
16437else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016438 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016439sed 's/^/| /' conftest.$ac_ext >&5
16440
Martin v. Löwis11437992002-04-12 09:54:03 +000016441 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016443
Martin v. Löwis11437992002-04-12 09:54:03 +000016444rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016445{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16446echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016447
Martin v. Löwis11437992002-04-12 09:54:03 +000016448# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016449case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16450 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016451 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16452echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16453 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16454echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016455 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016456 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016457 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016458 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16459echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16460 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16461echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16462 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16463echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16464 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16465echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16466 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16467echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16468 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16469echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016470 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016471## -------------------------------------- ##
16472## Report this to http://bugs.python.org/ ##
16473## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016474_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016475 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016476 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016477esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016478{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16479echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016480if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016481 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016482else
16483 ac_cv_header_kernel_OS_h=$ac_header_preproc
16484fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016485{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16486echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016487
16488fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016489if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016490 cat >>confdefs.h <<\_ACEOF
16491#define WITH_THREAD 1
16492_ACEOF
16493
16494
16495cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016496#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016497_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016498
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016499 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016500else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016501
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016502 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16503echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016504if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016505 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016506else
Martin v. Löwis11437992002-04-12 09:54:03 +000016507 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016508LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016509cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016510/* confdefs.h. */
16511_ACEOF
16512cat confdefs.h >>conftest.$ac_ext
16513cat >>conftest.$ac_ext <<_ACEOF
16514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016515
Martin v. Löwiseba40652007-08-30 20:10:57 +000016516/* Override any GCC internal prototype to avoid an error.
16517 Use char because int might match the return type of a GCC
16518 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016519#ifdef __cplusplus
16520extern "C"
16521#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016522char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016523int
16524main ()
16525{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016526return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016527 ;
16528 return 0;
16529}
16530_ACEOF
16531rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016532if { (ac_try="$ac_link"
16533case "(($ac_try" in
16534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16535 *) ac_try_echo=$ac_try;;
16536esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016538 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016539 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016540 grep -v '^ *+' conftest.er1 >conftest.err
16541 rm -f conftest.er1
16542 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016544 (exit $ac_status); } && {
16545 test -z "$ac_c_werror_flag" ||
16546 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016547 } && test -s conftest$ac_exeext &&
16548 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016549 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016550else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016551 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016552sed 's/^/| /' conftest.$ac_ext >&5
16553
Martin v. Löwiseba40652007-08-30 20:10:57 +000016554 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016555fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016556
16557rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016558 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016559LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016560fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016561{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16562echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16563if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016564 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016565#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016566_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016567
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016568 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016569 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016570 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016571else
Greg Steinadf63d62000-07-05 10:38:09 +000016572
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016573 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16574echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016575if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016576 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016577else
Martin v. Löwis11437992002-04-12 09:54:03 +000016578 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016579LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016580cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016581/* confdefs.h. */
16582_ACEOF
16583cat confdefs.h >>conftest.$ac_ext
16584cat >>conftest.$ac_ext <<_ACEOF
16585/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016586
Martin v. Löwiseba40652007-08-30 20:10:57 +000016587/* Override any GCC internal prototype to avoid an error.
16588 Use char because int might match the return type of a GCC
16589 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016590#ifdef __cplusplus
16591extern "C"
16592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016593char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016594int
16595main ()
16596{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016597return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016598 ;
16599 return 0;
16600}
16601_ACEOF
16602rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016603if { (ac_try="$ac_link"
16604case "(($ac_try" in
16605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16606 *) ac_try_echo=$ac_try;;
16607esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016609 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016610 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016611 grep -v '^ *+' conftest.er1 >conftest.err
16612 rm -f conftest.er1
16613 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016615 (exit $ac_status); } && {
16616 test -z "$ac_c_werror_flag" ||
16617 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016618 } && test -s conftest$ac_exeext &&
16619 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016620 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016621else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016623sed 's/^/| /' conftest.$ac_ext >&5
16624
Martin v. Löwiseba40652007-08-30 20:10:57 +000016625 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016627
16628rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016629 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016630LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016631fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016632{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16633echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16634if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016635 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016636#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016637_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016638
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016639 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016640 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016641 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016642else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016643
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016644 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16645echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016646if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016647 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016648else
Martin v. Löwis11437992002-04-12 09:54:03 +000016649 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016650LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016651cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016652/* confdefs.h. */
16653_ACEOF
16654cat confdefs.h >>conftest.$ac_ext
16655cat >>conftest.$ac_ext <<_ACEOF
16656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016657
Martin v. Löwiseba40652007-08-30 20:10:57 +000016658/* Override any GCC internal prototype to avoid an error.
16659 Use char because int might match the return type of a GCC
16660 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016661#ifdef __cplusplus
16662extern "C"
16663#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016664char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016665int
16666main ()
16667{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016668return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016669 ;
16670 return 0;
16671}
16672_ACEOF
16673rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016674if { (ac_try="$ac_link"
16675case "(($ac_try" in
16676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16677 *) ac_try_echo=$ac_try;;
16678esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016680 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016682 grep -v '^ *+' conftest.er1 >conftest.err
16683 rm -f conftest.er1
16684 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016686 (exit $ac_status); } && {
16687 test -z "$ac_c_werror_flag" ||
16688 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016689 } && test -s conftest$ac_exeext &&
16690 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016691 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016692else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016694sed 's/^/| /' conftest.$ac_ext >&5
16695
Martin v. Löwiseba40652007-08-30 20:10:57 +000016696 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016698
16699rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016700 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016701LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016702fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016703{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16704echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16705if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016706 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016707#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016708_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016709
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016710 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016711 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016712 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016713else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016714
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016715 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16716echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016717if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016718 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016719else
Martin v. Löwis11437992002-04-12 09:54:03 +000016720 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016721LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016722cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016723/* confdefs.h. */
16724_ACEOF
16725cat confdefs.h >>conftest.$ac_ext
16726cat >>conftest.$ac_ext <<_ACEOF
16727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016728
Martin v. Löwiseba40652007-08-30 20:10:57 +000016729/* Override any GCC internal prototype to avoid an error.
16730 Use char because int might match the return type of a GCC
16731 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016732#ifdef __cplusplus
16733extern "C"
16734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016735char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016736int
16737main ()
16738{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016739return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016740 ;
16741 return 0;
16742}
16743_ACEOF
16744rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016745if { (ac_try="$ac_link"
16746case "(($ac_try" in
16747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16748 *) ac_try_echo=$ac_try;;
16749esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016751 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016752 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016753 grep -v '^ *+' conftest.er1 >conftest.err
16754 rm -f conftest.er1
16755 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016757 (exit $ac_status); } && {
16758 test -z "$ac_c_werror_flag" ||
16759 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016760 } && test -s conftest$ac_exeext &&
16761 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016762 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016763else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016765sed 's/^/| /' conftest.$ac_ext >&5
16766
Martin v. Löwiseba40652007-08-30 20:10:57 +000016767 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016768fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016769
16770rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016771 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016772LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016773fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016774{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16775echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16776if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016777 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016778#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016779_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016780
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016781 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016782 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016783 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016784else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016785
Martin v. Löwis130fb172001-07-19 11:00:41 +000016786 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016787fi
16788
Guido van Rossum627b2d71993-12-24 10:39:16 +000016789
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016790fi
16791
Guido van Rossum0be3e491997-05-22 20:33:33 +000016792fi
16793
Guido van Rossum49545951997-12-02 19:28:29 +000016794fi
16795
Guido van Rossumb93a8621998-05-07 13:27:32 +000016796fi
16797
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016798
Michael W. Hudson54241132001-12-07 15:38:26 +000016799fi
16800
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016801
16802fi
16803
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016805
16806rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016807 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016808fi
16809
Martin v. Löwis11437992002-04-12 09:54:03 +000016810fi
16811
16812
16813fi
16814
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016815
Michael W. Hudson54241132001-12-07 15:38:26 +000016816
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016817 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16818echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016819if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016820 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016821else
Martin v. Löwis11437992002-04-12 09:54:03 +000016822 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016823LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016824cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016825/* confdefs.h. */
16826_ACEOF
16827cat confdefs.h >>conftest.$ac_ext
16828cat >>conftest.$ac_ext <<_ACEOF
16829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016830
Martin v. Löwiseba40652007-08-30 20:10:57 +000016831/* Override any GCC internal prototype to avoid an error.
16832 Use char because int might match the return type of a GCC
16833 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016834#ifdef __cplusplus
16835extern "C"
16836#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016837char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016838int
16839main ()
16840{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016841return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016842 ;
16843 return 0;
16844}
16845_ACEOF
16846rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016847if { (ac_try="$ac_link"
16848case "(($ac_try" in
16849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16850 *) ac_try_echo=$ac_try;;
16851esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016853 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016855 grep -v '^ *+' conftest.er1 >conftest.err
16856 rm -f conftest.er1
16857 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016859 (exit $ac_status); } && {
16860 test -z "$ac_c_werror_flag" ||
16861 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016862 } && test -s conftest$ac_exeext &&
16863 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016864 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016865else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016867sed 's/^/| /' conftest.$ac_ext >&5
16868
Martin v. Löwiseba40652007-08-30 20:10:57 +000016869 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016871
16872rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016873 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016874LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016875fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016876{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16877echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16878if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016879 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016880#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016881_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016882
Martin v. Löwis130fb172001-07-19 11:00:41 +000016883 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016884 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016885 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016886fi
16887
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016888
Neal Norwitza978ab02002-11-02 16:58:05 +000016889 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016890 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16891echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016892if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016893 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016894else
Martin v. Löwis11437992002-04-12 09:54:03 +000016895 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016896LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016897cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016898/* confdefs.h. */
16899_ACEOF
16900cat confdefs.h >>conftest.$ac_ext
16901cat >>conftest.$ac_ext <<_ACEOF
16902/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016903
Martin v. Löwiseba40652007-08-30 20:10:57 +000016904/* Override any GCC internal prototype to avoid an error.
16905 Use char because int might match the return type of a GCC
16906 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016907#ifdef __cplusplus
16908extern "C"
16909#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016910char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016911int
16912main ()
16913{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016914return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016915 ;
16916 return 0;
16917}
16918_ACEOF
16919rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016920if { (ac_try="$ac_link"
16921case "(($ac_try" in
16922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16923 *) ac_try_echo=$ac_try;;
16924esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016926 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016927 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016928 grep -v '^ *+' conftest.er1 >conftest.err
16929 rm -f conftest.er1
16930 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016932 (exit $ac_status); } && {
16933 test -z "$ac_c_werror_flag" ||
16934 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016935 } && test -s conftest$ac_exeext &&
16936 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016937 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016938else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016940sed 's/^/| /' conftest.$ac_ext >&5
16941
Martin v. Löwiseba40652007-08-30 20:10:57 +000016942 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016943fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016944
16945rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016946 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016947LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016948fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016949{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16950echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16951if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016952 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016953#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016954_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016955
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016956 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016957 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016958 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016959fi
16960
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016961 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016962
Martin v. Löwis130fb172001-07-19 11:00:41 +000016963 if test "$USE_THREAD_MODULE" != "#"
16964 then
16965 # If the above checks didn't disable threads, (at least) OSF1
16966 # needs this '-threads' argument during linking.
16967 case $ac_sys_system in
16968 OSF1) LDLAST=-threads;;
16969 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016970 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016971fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016972
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016973if test "$posix_threads" = "yes"; then
16974 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016975
16976cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016977#define _POSIX_THREADS 1
16978_ACEOF
16979
16980 fi
16981
16982 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16983 case $ac_sys_system/$ac_sys_release in
16984 SunOS/5.6)
16985cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016986#define HAVE_PTHREAD_DESTRUCTOR 1
16987_ACEOF
16988
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016989 ;;
16990 SunOS/5.8)
16991cat >>confdefs.h <<\_ACEOF
16992#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16993_ACEOF
16994
16995 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000016996 AIX/5)
16997cat >>confdefs.h <<\_ACEOF
16998#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16999_ACEOF
17000
17001 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017002 esac
17003
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017004 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
17005echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017006 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017007 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017008else
17009 if test "$cross_compiling" = yes; then
17010 ac_cv_pthread_system_supported=no
17011else
17012 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017013/* confdefs.h. */
17014_ACEOF
17015cat confdefs.h >>conftest.$ac_ext
17016cat >>conftest.$ac_ext <<_ACEOF
17017/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017018#include <pthread.h>
17019 void *foo(void *parm) {
17020 return NULL;
17021 }
17022 main() {
17023 pthread_attr_t attr;
17024 pthread_t id;
17025 if (pthread_attr_init(&attr)) exit(-1);
17026 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17027 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17028 exit(0);
17029 }
17030_ACEOF
17031rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017032if { (ac_try="$ac_link"
17033case "(($ac_try" in
17034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17035 *) ac_try_echo=$ac_try;;
17036esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017038 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017039 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017041 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017042 { (case "(($ac_try" in
17043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17044 *) ac_try_echo=$ac_try;;
17045esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017047 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017048 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017050 (exit $ac_status); }; }; then
17051 ac_cv_pthread_system_supported=yes
17052else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017053 echo "$as_me: program exited with status $ac_status" >&5
17054echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017055sed 's/^/| /' conftest.$ac_ext >&5
17056
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017057( exit $ac_status )
17058ac_cv_pthread_system_supported=no
17059fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017060rm -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 +000017061fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017062
Martin v. Löwiseba40652007-08-30 20:10:57 +000017063
17064
Guido van Rossum627b2d71993-12-24 10:39:16 +000017065fi
17066
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017067 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17068echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017069 if test "$ac_cv_pthread_system_supported" = "yes"; then
17070
17071cat >>confdefs.h <<\_ACEOF
17072#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17073_ACEOF
17074
17075 fi
17076
17077for ac_func in pthread_sigmask
17078do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017079as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17080{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17081echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017082if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017083 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017084else
17085 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017086/* confdefs.h. */
17087_ACEOF
17088cat confdefs.h >>conftest.$ac_ext
17089cat >>conftest.$ac_ext <<_ACEOF
17090/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017091/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17092 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17093#define $ac_func innocuous_$ac_func
17094
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017095/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017096 which can conflict with char $ac_func (); below.
17097 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017098 <limits.h> exists even on freestanding compilers. */
17099
17100#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017101# include <limits.h>
17102#else
17103# include <assert.h>
17104#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017105
17106#undef $ac_func
17107
Martin v. Löwiseba40652007-08-30 20:10:57 +000017108/* Override any GCC internal prototype to avoid an error.
17109 Use char because int might match the return type of a GCC
17110 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017111#ifdef __cplusplus
17112extern "C"
17113#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017114char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017115/* The GNU C library defines this for functions which it implements
17116 to always fail with ENOSYS. Some functions are actually named
17117 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017118#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017119choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017120#endif
17121
Skip Montanaro6dead952003-09-25 14:50:04 +000017122int
17123main ()
17124{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017125return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017126 ;
17127 return 0;
17128}
17129_ACEOF
17130rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017131if { (ac_try="$ac_link"
17132case "(($ac_try" in
17133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17134 *) ac_try_echo=$ac_try;;
17135esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017137 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017138 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017139 grep -v '^ *+' conftest.er1 >conftest.err
17140 rm -f conftest.er1
17141 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017143 (exit $ac_status); } && {
17144 test -z "$ac_c_werror_flag" ||
17145 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017146 } && test -s conftest$ac_exeext &&
17147 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017148 eval "$as_ac_var=yes"
17149else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017150 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017151sed 's/^/| /' conftest.$ac_ext >&5
17152
Martin v. Löwiseba40652007-08-30 20:10:57 +000017153 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017155
17156rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017157 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017158fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017159ac_res=`eval echo '${'$as_ac_var'}'`
17160 { echo "$as_me:$LINENO: result: $ac_res" >&5
17161echo "${ECHO_T}$ac_res" >&6; }
17162if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017163 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017164#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017165_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017166 case $ac_sys_system in
17167 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017168
Jason Tishlerfac083d2003-07-22 15:20:49 +000017169cat >>confdefs.h <<\_ACEOF
17170#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17171_ACEOF
17172
17173 ;;
17174 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017175fi
17176done
17177
17178fi
17179
17180
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017181# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017182
17183
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017184{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17185echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017186# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017187if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017188 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017189 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017190 { echo "$as_me:$LINENO: result: no" >&5
17191echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017192 ipv6=no
17193 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017194 *) { echo "$as_me:$LINENO: result: yes" >&5
17195echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017196 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017197#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017198_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017199
17200 ipv6=yes
17201 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017202 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017203else
Martin v. Löwis11437992002-04-12 09:54:03 +000017204
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017205 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017206 { echo "$as_me:$LINENO: result: no" >&5
17207echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017208 ipv6=no
17209
17210else
Martin v. Löwis11437992002-04-12 09:54:03 +000017211 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017212/* confdefs.h. */
17213_ACEOF
17214cat confdefs.h >>conftest.$ac_ext
17215cat >>conftest.$ac_ext <<_ACEOF
17216/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017217 /* AF_INET6 available check */
17218#include <sys/types.h>
17219#include <sys/socket.h>
17220main()
17221{
17222 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17223 exit(1);
17224 else
17225 exit(0);
17226}
17227
Martin v. Löwis11437992002-04-12 09:54:03 +000017228_ACEOF
17229rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017230if { (ac_try="$ac_link"
17231case "(($ac_try" in
17232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17233 *) ac_try_echo=$ac_try;;
17234esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017236 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017237 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017239 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017240 { (case "(($ac_try" in
17241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17242 *) ac_try_echo=$ac_try;;
17243esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017245 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017246 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017248 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017249 { echo "$as_me:$LINENO: result: yes" >&5
17250echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017251 ipv6=yes
17252else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017253 echo "$as_me: program exited with status $ac_status" >&5
17254echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017255sed 's/^/| /' conftest.$ac_ext >&5
17256
Martin v. Löwis11437992002-04-12 09:54:03 +000017257( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017258{ echo "$as_me:$LINENO: result: no" >&5
17259echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017260 ipv6=no
17261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017262rm -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 +000017263fi
17264
Martin v. Löwiseba40652007-08-30 20:10:57 +000017265
17266
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017267if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017268 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17269echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017270 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017271/* confdefs.h. */
17272_ACEOF
17273cat confdefs.h >>conftest.$ac_ext
17274cat >>conftest.$ac_ext <<_ACEOF
17275/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017276#include <sys/types.h>
17277#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017278int
17279main ()
17280{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017281struct sockaddr_in6 x;
17282x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017283 ;
17284 return 0;
17285}
17286_ACEOF
17287rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017288if { (ac_try="$ac_compile"
17289case "(($ac_try" in
17290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17291 *) ac_try_echo=$ac_try;;
17292esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017294 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017295 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017296 grep -v '^ *+' conftest.er1 >conftest.err
17297 rm -f conftest.er1
17298 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017300 (exit $ac_status); } && {
17301 test -z "$ac_c_werror_flag" ||
17302 test ! -s conftest.err
17303 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017304 { echo "$as_me:$LINENO: result: yes" >&5
17305echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017306 ipv6=yes
17307else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017309sed 's/^/| /' conftest.$ac_ext >&5
17310
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017311 { echo "$as_me:$LINENO: result: no" >&5
17312echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017313 ipv6=no
17314fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017315
17316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017317fi
17318
17319if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017320 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017321#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017322_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017323
17324fi
17325
Martin v. Löwiseba40652007-08-30 20:10:57 +000017326fi
17327
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017328
17329ipv6type=unknown
17330ipv6lib=none
17331ipv6trylibc=no
17332
17333if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017334 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17335echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017336 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17337 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017338 case $i in
17339 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017340 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017341/* confdefs.h. */
17342_ACEOF
17343cat confdefs.h >>conftest.$ac_ext
17344cat >>conftest.$ac_ext <<_ACEOF
17345/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017346
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017347#include <netinet/in.h>
17348#ifdef IPV6_INRIA_VERSION
17349yes
17350#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017351_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017352if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017353 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017354 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017355fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000017356rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017357
17358 ;;
17359 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017360 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017361/* confdefs.h. */
17362_ACEOF
17363cat confdefs.h >>conftest.$ac_ext
17364cat >>conftest.$ac_ext <<_ACEOF
17365/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017366
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017367#include <netinet/in.h>
17368#ifdef __KAME__
17369yes
17370#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017371_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017372if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017373 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017374 ipv6type=$i;
17375 ipv6lib=inet6
17376 ipv6libdir=/usr/local/v6/lib
17377 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017378fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000017379rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017380
17381 ;;
17382 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017383 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017384/* confdefs.h. */
17385_ACEOF
17386cat confdefs.h >>conftest.$ac_ext
17387cat >>conftest.$ac_ext <<_ACEOF
17388/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017389
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017390#include <features.h>
17391#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17392yes
17393#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017394_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017395if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017396 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017397 ipv6type=$i;
17398 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017399fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000017400rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017401
17402 ;;
17403 linux-inet6)
17404 if test -d /usr/inet6; then
17405 ipv6type=$i
17406 ipv6lib=inet6
17407 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017408 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017409 fi
17410 ;;
17411 solaris)
17412 if test -f /etc/netconfig; then
17413 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17414 ipv6type=$i
17415 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017416 fi
17417 fi
17418 ;;
17419 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017420 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017421/* confdefs.h. */
17422_ACEOF
17423cat confdefs.h >>conftest.$ac_ext
17424cat >>conftest.$ac_ext <<_ACEOF
17425/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017426
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017427#include <sys/param.h>
17428#ifdef _TOSHIBA_INET6
17429yes
17430#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017431_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017432if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017433 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017434 ipv6type=$i;
17435 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017436 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017437fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000017438rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017439
17440 ;;
17441 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017442 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017443/* confdefs.h. */
17444_ACEOF
17445cat confdefs.h >>conftest.$ac_ext
17446cat >>conftest.$ac_ext <<_ACEOF
17447/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017448
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017449#include </usr/local/v6/include/sys/v6config.h>
17450#ifdef __V6D__
17451yes
17452#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017453_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017454if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017455 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017456 ipv6type=$i;
17457 ipv6lib=v6;
17458 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017459 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017460fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000017461rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017462
17463 ;;
17464 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017465 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017466/* confdefs.h. */
17467_ACEOF
17468cat confdefs.h >>conftest.$ac_ext
17469cat >>conftest.$ac_ext <<_ACEOF
17470/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017471
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017472#include <sys/param.h>
17473#ifdef _ZETA_MINAMI_INET6
17474yes
17475#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017476_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017477if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017478 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017479 ipv6type=$i;
17480 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017481 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017482fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000017483rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017484
17485 ;;
17486 esac
17487 if test "$ipv6type" != "unknown"; then
17488 break
17489 fi
17490 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017491 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17492echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017493fi
17494
17495if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17496 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17497 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17498 echo "using lib$ipv6lib"
17499 else
17500 if test $ipv6trylibc = "yes"; then
17501 echo "using libc"
17502 else
17503 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17504 echo "You need to fetch lib$ipv6lib.a from appropriate"
17505 echo 'ipv6 kit and compile beforehand.'
17506 exit 1
17507 fi
17508 fi
17509fi
17510
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017511{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17512echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017513cat >conftest.$ac_ext <<_ACEOF
17514/* confdefs.h. */
17515_ACEOF
17516cat confdefs.h >>conftest.$ac_ext
17517cat >>conftest.$ac_ext <<_ACEOF
17518/* end confdefs.h. */
17519#include <Carbon/Carbon.h>
17520int
17521main ()
17522{
17523FSIORefNum fRef = 0
17524 ;
17525 return 0;
17526}
17527_ACEOF
17528rm -f conftest.$ac_objext
17529if { (ac_try="$ac_compile"
17530case "(($ac_try" in
17531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17532 *) ac_try_echo=$ac_try;;
17533esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017535 (eval "$ac_compile") 2>conftest.er1
17536 ac_status=$?
17537 grep -v '^ *+' conftest.er1 >conftest.err
17538 rm -f conftest.er1
17539 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017541 (exit $ac_status); } && {
17542 test -z "$ac_c_werror_flag" ||
17543 test ! -s conftest.err
17544 } && test -s conftest.$ac_objext; then
17545
17546cat >>confdefs.h <<\_ACEOF
17547#define HAVE_OSX105_SDK 1
17548_ACEOF
17549
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017550 { echo "$as_me:$LINENO: result: yes" >&5
17551echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017552else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017553 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017554sed 's/^/| /' conftest.$ac_ext >&5
17555
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017556 { echo "$as_me:$LINENO: result: no" >&5
17557echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017558
17559fi
17560
17561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17562
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017563# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017564{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17565echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017566
Martin v. Löwiseba40652007-08-30 20:10:57 +000017567# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017568if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017569 withval=$with_doc_strings;
17570fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017571
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017572
17573if test -z "$with_doc_strings"
17574then with_doc_strings="yes"
17575fi
17576if test "$with_doc_strings" != "no"
17577then
17578
17579cat >>confdefs.h <<\_ACEOF
17580#define WITH_DOC_STRINGS 1
17581_ACEOF
17582
17583fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017584{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17585echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017586
Neil Schemenauera35c6882001-02-27 04:45:05 +000017587# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017588{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17589echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017590
Martin v. Löwiseba40652007-08-30 20:10:57 +000017591# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017592if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017593 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017594if test "$withval" != no
17595then
17596
17597cat >>confdefs.h <<\_ACEOF
17598#define WITH_TSC 1
17599_ACEOF
17600
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017601 { echo "$as_me:$LINENO: result: yes" >&5
17602echo "${ECHO_T}yes" >&6; }
17603else { echo "$as_me:$LINENO: result: no" >&5
17604echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017605fi
17606else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017607 { echo "$as_me:$LINENO: result: no" >&5
17608echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017609fi
17610
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017611
17612# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017613{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17614echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017615
Martin v. Löwiseba40652007-08-30 20:10:57 +000017616# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017617if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017618 withval=$with_pymalloc;
17619fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017620
Neil Schemenauera35c6882001-02-27 04:45:05 +000017621
Neil Schemenauer16c22972002-03-22 15:34:49 +000017622if test -z "$with_pymalloc"
17623then with_pymalloc="yes"
17624fi
17625if test "$with_pymalloc" != "no"
17626then
Martin v. Löwis11437992002-04-12 09:54:03 +000017627
17628cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017629#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017630_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017631
17632fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017633{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17634echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017635
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000017636# Check for Valgrind support
17637{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17638echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17639
17640# Check whether --with-valgrind was given.
17641if test "${with_valgrind+set}" = set; then
17642 withval=$with_valgrind;
17643else
17644 with_valgrind=no
17645fi
17646
17647{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17648echo "${ECHO_T}$with_valgrind" >&6; }
17649if test "$with_valgrind" != no; then
17650 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17651 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17652echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17653if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17654 echo $ECHO_N "(cached) $ECHO_C" >&6
17655fi
17656{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17657echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17658else
17659 # Is the header compilable?
17660{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17661echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17662cat >conftest.$ac_ext <<_ACEOF
17663/* confdefs.h. */
17664_ACEOF
17665cat confdefs.h >>conftest.$ac_ext
17666cat >>conftest.$ac_ext <<_ACEOF
17667/* end confdefs.h. */
17668$ac_includes_default
17669#include <valgrind/valgrind.h>
17670_ACEOF
17671rm -f conftest.$ac_objext
17672if { (ac_try="$ac_compile"
17673case "(($ac_try" in
17674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17675 *) ac_try_echo=$ac_try;;
17676esac
17677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17678 (eval "$ac_compile") 2>conftest.er1
17679 ac_status=$?
17680 grep -v '^ *+' conftest.er1 >conftest.err
17681 rm -f conftest.er1
17682 cat conftest.err >&5
17683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17684 (exit $ac_status); } && {
17685 test -z "$ac_c_werror_flag" ||
17686 test ! -s conftest.err
17687 } && test -s conftest.$ac_objext; then
17688 ac_header_compiler=yes
17689else
17690 echo "$as_me: failed program was:" >&5
17691sed 's/^/| /' conftest.$ac_ext >&5
17692
17693 ac_header_compiler=no
17694fi
17695
17696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17697{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17698echo "${ECHO_T}$ac_header_compiler" >&6; }
17699
17700# Is the header present?
17701{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17702echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17703cat >conftest.$ac_ext <<_ACEOF
17704/* confdefs.h. */
17705_ACEOF
17706cat confdefs.h >>conftest.$ac_ext
17707cat >>conftest.$ac_ext <<_ACEOF
17708/* end confdefs.h. */
17709#include <valgrind/valgrind.h>
17710_ACEOF
17711if { (ac_try="$ac_cpp conftest.$ac_ext"
17712case "(($ac_try" in
17713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17714 *) ac_try_echo=$ac_try;;
17715esac
17716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17717 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17718 ac_status=$?
17719 grep -v '^ *+' conftest.er1 >conftest.err
17720 rm -f conftest.er1
17721 cat conftest.err >&5
17722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17723 (exit $ac_status); } >/dev/null && {
17724 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17725 test ! -s conftest.err
17726 }; then
17727 ac_header_preproc=yes
17728else
17729 echo "$as_me: failed program was:" >&5
17730sed 's/^/| /' conftest.$ac_ext >&5
17731
17732 ac_header_preproc=no
17733fi
17734
17735rm -f conftest.err conftest.$ac_ext
17736{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17737echo "${ECHO_T}$ac_header_preproc" >&6; }
17738
17739# So? What about this header?
17740case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17741 yes:no: )
17742 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17743echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17744 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17745echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17746 ac_header_preproc=yes
17747 ;;
17748 no:yes:* )
17749 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17750echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17751 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17752echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17753 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17754echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17755 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17756echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17757 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17758echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17759 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17760echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17761 ( cat <<\_ASBOX
17762## -------------------------------------- ##
17763## Report this to http://bugs.python.org/ ##
17764## -------------------------------------- ##
17765_ASBOX
17766 ) | sed "s/^/$as_me: WARNING: /" >&2
17767 ;;
17768esac
17769{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17770echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17771if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17772 echo $ECHO_N "(cached) $ECHO_C" >&6
17773else
17774 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17775fi
17776{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17777echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17778
17779fi
17780if test $ac_cv_header_valgrind_valgrind_h = yes; then
17781
17782cat >>confdefs.h <<\_ACEOF
17783#define WITH_VALGRIND 1
17784_ACEOF
17785
17786else
17787 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17788echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17789 { (exit 1); exit 1; }; }
17790
17791fi
17792
17793
17794fi
17795
Barry Warsawef82cd72000-06-30 16:21:01 +000017796# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017797{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17798echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017799
Martin v. Löwiseba40652007-08-30 20:10:57 +000017800# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017801if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017802 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017803if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017804then
17805
17806cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017807#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017808_ACEOF
17809
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017810 { echo "$as_me:$LINENO: result: yes" >&5
17811echo "${ECHO_T}yes" >&6; }
17812else { echo "$as_me:$LINENO: result: no" >&5
17813echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017814fi
17815else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017816 { echo "$as_me:$LINENO: result: no" >&5
17817echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017818fi
17819
Barry Warsawef82cd72000-06-30 16:21:01 +000017820
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017821# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017822
Guido van Rossum98935bf2001-09-05 19:13:16 +000017823DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017824
Guido van Rossume97ee181999-12-20 21:27:22 +000017825# the dlopen() function means we might want to use dynload_shlib.o. some
17826# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017827
Thomas Wouters3a584202000-08-05 23:28:51 +000017828for ac_func in dlopen
17829do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017830as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17831{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17832echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017833if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017834 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017835else
Martin v. Löwis11437992002-04-12 09:54:03 +000017836 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017837/* confdefs.h. */
17838_ACEOF
17839cat confdefs.h >>conftest.$ac_ext
17840cat >>conftest.$ac_ext <<_ACEOF
17841/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017842/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17843 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17844#define $ac_func innocuous_$ac_func
17845
Guido van Rossume97ee181999-12-20 21:27:22 +000017846/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017847 which can conflict with char $ac_func (); below.
17848 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017849 <limits.h> exists even on freestanding compilers. */
17850
17851#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017852# include <limits.h>
17853#else
17854# include <assert.h>
17855#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017856
17857#undef $ac_func
17858
Martin v. Löwiseba40652007-08-30 20:10:57 +000017859/* Override any GCC internal prototype to avoid an error.
17860 Use char because int might match the return type of a GCC
17861 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017862#ifdef __cplusplus
17863extern "C"
17864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017865char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017866/* The GNU C library defines this for functions which it implements
17867 to always fail with ENOSYS. Some functions are actually named
17868 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017869#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017870choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017871#endif
17872
Skip Montanaro6dead952003-09-25 14:50:04 +000017873int
17874main ()
17875{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017876return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017877 ;
17878 return 0;
17879}
17880_ACEOF
17881rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017882if { (ac_try="$ac_link"
17883case "(($ac_try" in
17884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17885 *) ac_try_echo=$ac_try;;
17886esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017888 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017890 grep -v '^ *+' conftest.er1 >conftest.err
17891 rm -f conftest.er1
17892 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017894 (exit $ac_status); } && {
17895 test -z "$ac_c_werror_flag" ||
17896 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017897 } && test -s conftest$ac_exeext &&
17898 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017899 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017900else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017902sed 's/^/| /' conftest.$ac_ext >&5
17903
Martin v. Löwiseba40652007-08-30 20:10:57 +000017904 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017906
17907rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017908 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017909fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017910ac_res=`eval echo '${'$as_ac_var'}'`
17911 { echo "$as_me:$LINENO: result: $ac_res" >&5
17912echo "${ECHO_T}$ac_res" >&6; }
17913if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017914 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017915#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017916_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017917
Guido van Rossume97ee181999-12-20 21:27:22 +000017918fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017919done
Guido van Rossume97ee181999-12-20 21:27:22 +000017920
Michael W. Hudson54241132001-12-07 15:38:26 +000017921
Guido van Rossume97ee181999-12-20 21:27:22 +000017922# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17923# loading of modules.
17924
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017925{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17926echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017927if test -z "$DYNLOADFILE"
17928then
17929 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017930 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17931 if test "$ac_cv_func_dlopen" = yes
17932 then DYNLOADFILE="dynload_shlib.o"
17933 else DYNLOADFILE="dynload_aix.o"
17934 fi
17935 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017936 BeOS*) DYNLOADFILE="dynload_beos.o";;
17937 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000017938 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17939 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017940 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017941 *)
17942 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17943 # out any dynamic loading
17944 if test "$ac_cv_func_dlopen" = yes
17945 then DYNLOADFILE="dynload_shlib.o"
17946 else DYNLOADFILE="dynload_stub.o"
17947 fi
17948 ;;
17949 esac
17950fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017951{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17952echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017953if test "$DYNLOADFILE" != "dynload_stub.o"
17954then
Martin v. Löwis11437992002-04-12 09:54:03 +000017955
17956cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017957#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017958_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017959
17960fi
17961
Neil Schemenauer4e425612001-06-19 15:44:15 +000017962# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17963
Michael W. Hudson54241132001-12-07 15:38:26 +000017964
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017965{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17966echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017967if test -z "$MACHDEP_OBJS"
17968then
Jack Jansene578a632001-08-15 01:27:14 +000017969 MACHDEP_OBJS=$extra_machdep_objs
17970else
17971 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017972fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017973{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17974echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017975
Guido van Rossum627b2d71993-12-24 10:39:16 +000017976# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
Martin v. Löwisd6320502004-08-12 13:45:08 +000018048
Martin v. Löwisc3001752005-01-23 09:27:24 +000018049
18050
Neal Norwitz05a45592006-03-20 06:30:08 +000018051
18052
Martin v. Löwis382abef2007-02-19 10:55:19 +000018053
18054
Christian Heimes36281872007-11-30 21:11:28 +000018055
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018056
18057
Jesse Noller355b1262009-04-02 00:03:28 +000018058
18059
18060
18061
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018075
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018076for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
18077 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000018078 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018079 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018080 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000018081 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000018082 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000018083 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
18084 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000018085 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018086 setlocale setregid setreuid setresuid setresgid \
18087 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000018088 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000018089 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000018090 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000018091do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018092as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18093{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18094echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018095if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018096 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018097else
Martin v. Löwis11437992002-04-12 09:54:03 +000018098 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018099/* confdefs.h. */
18100_ACEOF
18101cat confdefs.h >>conftest.$ac_ext
18102cat >>conftest.$ac_ext <<_ACEOF
18103/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018104/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18105 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18106#define $ac_func innocuous_$ac_func
18107
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018108/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018109 which can conflict with char $ac_func (); below.
18110 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018111 <limits.h> exists even on freestanding compilers. */
18112
18113#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018114# include <limits.h>
18115#else
18116# include <assert.h>
18117#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018118
18119#undef $ac_func
18120
Martin v. Löwiseba40652007-08-30 20:10:57 +000018121/* Override any GCC internal prototype to avoid an error.
18122 Use char because int might match the return type of a GCC
18123 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018124#ifdef __cplusplus
18125extern "C"
18126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018127char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018128/* The GNU C library defines this for functions which it implements
18129 to always fail with ENOSYS. Some functions are actually named
18130 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018131#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018132choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018133#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018134
Skip Montanaro6dead952003-09-25 14:50:04 +000018135int
18136main ()
18137{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018138return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018139 ;
18140 return 0;
18141}
18142_ACEOF
18143rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018144if { (ac_try="$ac_link"
18145case "(($ac_try" in
18146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18147 *) ac_try_echo=$ac_try;;
18148esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018150 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018151 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018152 grep -v '^ *+' conftest.er1 >conftest.err
18153 rm -f conftest.er1
18154 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018156 (exit $ac_status); } && {
18157 test -z "$ac_c_werror_flag" ||
18158 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018159 } && test -s conftest$ac_exeext &&
18160 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018161 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018162else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018163 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018164sed 's/^/| /' conftest.$ac_ext >&5
18165
Martin v. Löwiseba40652007-08-30 20:10:57 +000018166 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018167fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018168
18169rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018170 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018171fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018172ac_res=`eval echo '${'$as_ac_var'}'`
18173 { echo "$as_me:$LINENO: result: $ac_res" >&5
18174echo "${ECHO_T}$ac_res" >&6; }
18175if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018176 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018177#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018178_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018179
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018180fi
18181done
18182
Michael W. Hudson54241132001-12-07 15:38:26 +000018183
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018184# For some functions, having a definition is not sufficient, since
18185# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018186{ echo "$as_me:$LINENO: checking for chroot" >&5
18187echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018188cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018189/* confdefs.h. */
18190_ACEOF
18191cat confdefs.h >>conftest.$ac_ext
18192cat >>conftest.$ac_ext <<_ACEOF
18193/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018194#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018195int
18196main ()
18197{
18198void *x=chroot
18199 ;
18200 return 0;
18201}
18202_ACEOF
18203rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018204if { (ac_try="$ac_compile"
18205case "(($ac_try" in
18206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18207 *) ac_try_echo=$ac_try;;
18208esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018210 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018212 grep -v '^ *+' conftest.er1 >conftest.err
18213 rm -f conftest.er1
18214 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018216 (exit $ac_status); } && {
18217 test -z "$ac_c_werror_flag" ||
18218 test ! -s conftest.err
18219 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018220
18221cat >>confdefs.h <<\_ACEOF
18222#define HAVE_CHROOT 1
18223_ACEOF
18224
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018225 { echo "$as_me:$LINENO: result: yes" >&5
18226echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018227else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018229sed 's/^/| /' conftest.$ac_ext >&5
18230
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018231 { echo "$as_me:$LINENO: result: no" >&5
18232echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018233
18234fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018235
18236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018237{ echo "$as_me:$LINENO: checking for link" >&5
18238echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018239cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018240/* confdefs.h. */
18241_ACEOF
18242cat confdefs.h >>conftest.$ac_ext
18243cat >>conftest.$ac_ext <<_ACEOF
18244/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018245#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018246int
18247main ()
18248{
18249void *x=link
18250 ;
18251 return 0;
18252}
18253_ACEOF
18254rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018255if { (ac_try="$ac_compile"
18256case "(($ac_try" in
18257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18258 *) ac_try_echo=$ac_try;;
18259esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018261 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018262 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018263 grep -v '^ *+' conftest.er1 >conftest.err
18264 rm -f conftest.er1
18265 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018267 (exit $ac_status); } && {
18268 test -z "$ac_c_werror_flag" ||
18269 test ! -s conftest.err
18270 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018271
18272cat >>confdefs.h <<\_ACEOF
18273#define HAVE_LINK 1
18274_ACEOF
18275
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018276 { echo "$as_me:$LINENO: result: yes" >&5
18277echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018278else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018279 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018280sed 's/^/| /' conftest.$ac_ext >&5
18281
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018282 { echo "$as_me:$LINENO: result: no" >&5
18283echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018284
18285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018286
18287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018288{ echo "$as_me:$LINENO: checking for symlink" >&5
18289echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018290cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018291/* confdefs.h. */
18292_ACEOF
18293cat confdefs.h >>conftest.$ac_ext
18294cat >>conftest.$ac_ext <<_ACEOF
18295/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018296#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018297int
18298main ()
18299{
18300void *x=symlink
18301 ;
18302 return 0;
18303}
18304_ACEOF
18305rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018306if { (ac_try="$ac_compile"
18307case "(($ac_try" in
18308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18309 *) ac_try_echo=$ac_try;;
18310esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018312 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018314 grep -v '^ *+' conftest.er1 >conftest.err
18315 rm -f conftest.er1
18316 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018318 (exit $ac_status); } && {
18319 test -z "$ac_c_werror_flag" ||
18320 test ! -s conftest.err
18321 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018322
18323cat >>confdefs.h <<\_ACEOF
18324#define HAVE_SYMLINK 1
18325_ACEOF
18326
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018327 { echo "$as_me:$LINENO: result: yes" >&5
18328echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018329else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018330 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018331sed 's/^/| /' conftest.$ac_ext >&5
18332
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018333 { echo "$as_me:$LINENO: result: no" >&5
18334echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018335
18336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018337
18338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018339{ echo "$as_me:$LINENO: checking for fchdir" >&5
18340echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018341cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018342/* confdefs.h. */
18343_ACEOF
18344cat confdefs.h >>conftest.$ac_ext
18345cat >>conftest.$ac_ext <<_ACEOF
18346/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018347#include <unistd.h>
18348int
18349main ()
18350{
18351void *x=fchdir
18352 ;
18353 return 0;
18354}
18355_ACEOF
18356rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018357if { (ac_try="$ac_compile"
18358case "(($ac_try" in
18359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18360 *) ac_try_echo=$ac_try;;
18361esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018363 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018365 grep -v '^ *+' conftest.er1 >conftest.err
18366 rm -f conftest.er1
18367 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018369 (exit $ac_status); } && {
18370 test -z "$ac_c_werror_flag" ||
18371 test ! -s conftest.err
18372 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018373
18374cat >>confdefs.h <<\_ACEOF
18375#define HAVE_FCHDIR 1
18376_ACEOF
18377
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018378 { echo "$as_me:$LINENO: result: yes" >&5
18379echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018380else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018382sed 's/^/| /' conftest.$ac_ext >&5
18383
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018384 { echo "$as_me:$LINENO: result: no" >&5
18385echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018386
18387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018388
18389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018390{ echo "$as_me:$LINENO: checking for fsync" >&5
18391echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018392cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018393/* confdefs.h. */
18394_ACEOF
18395cat confdefs.h >>conftest.$ac_ext
18396cat >>conftest.$ac_ext <<_ACEOF
18397/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018398#include <unistd.h>
18399int
18400main ()
18401{
18402void *x=fsync
18403 ;
18404 return 0;
18405}
18406_ACEOF
18407rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018408if { (ac_try="$ac_compile"
18409case "(($ac_try" in
18410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18411 *) ac_try_echo=$ac_try;;
18412esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018414 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018415 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018416 grep -v '^ *+' conftest.er1 >conftest.err
18417 rm -f conftest.er1
18418 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018420 (exit $ac_status); } && {
18421 test -z "$ac_c_werror_flag" ||
18422 test ! -s conftest.err
18423 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018424
18425cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018426#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018427_ACEOF
18428
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018429 { echo "$as_me:$LINENO: result: yes" >&5
18430echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018431else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018432 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018433sed 's/^/| /' conftest.$ac_ext >&5
18434
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018435 { echo "$as_me:$LINENO: result: no" >&5
18436echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018437
18438fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018439
18440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018441{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18442echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018443cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018444/* confdefs.h. */
18445_ACEOF
18446cat confdefs.h >>conftest.$ac_ext
18447cat >>conftest.$ac_ext <<_ACEOF
18448/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018449#include <unistd.h>
18450int
18451main ()
18452{
18453void *x=fdatasync
18454 ;
18455 return 0;
18456}
18457_ACEOF
18458rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018459if { (ac_try="$ac_compile"
18460case "(($ac_try" in
18461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18462 *) ac_try_echo=$ac_try;;
18463esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018465 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018466 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018467 grep -v '^ *+' conftest.er1 >conftest.err
18468 rm -f conftest.er1
18469 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018471 (exit $ac_status); } && {
18472 test -z "$ac_c_werror_flag" ||
18473 test ! -s conftest.err
18474 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018475
18476cat >>confdefs.h <<\_ACEOF
18477#define HAVE_FDATASYNC 1
18478_ACEOF
18479
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018480 { echo "$as_me:$LINENO: result: yes" >&5
18481echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018482else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018483 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018484sed 's/^/| /' conftest.$ac_ext >&5
18485
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018486 { echo "$as_me:$LINENO: result: no" >&5
18487echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018488
18489fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018490
18491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018492{ echo "$as_me:$LINENO: checking for epoll" >&5
18493echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018494cat >conftest.$ac_ext <<_ACEOF
18495/* confdefs.h. */
18496_ACEOF
18497cat confdefs.h >>conftest.$ac_ext
18498cat >>conftest.$ac_ext <<_ACEOF
18499/* end confdefs.h. */
18500#include <sys/epoll.h>
18501int
18502main ()
18503{
18504void *x=epoll_create
18505 ;
18506 return 0;
18507}
18508_ACEOF
18509rm -f conftest.$ac_objext
18510if { (ac_try="$ac_compile"
18511case "(($ac_try" in
18512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18513 *) ac_try_echo=$ac_try;;
18514esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018516 (eval "$ac_compile") 2>conftest.er1
18517 ac_status=$?
18518 grep -v '^ *+' conftest.er1 >conftest.err
18519 rm -f conftest.er1
18520 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018522 (exit $ac_status); } && {
18523 test -z "$ac_c_werror_flag" ||
18524 test ! -s conftest.err
18525 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018526
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018527cat >>confdefs.h <<\_ACEOF
18528#define HAVE_EPOLL 1
18529_ACEOF
18530
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018531 { echo "$as_me:$LINENO: result: yes" >&5
18532echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018533else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018534 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018535sed 's/^/| /' conftest.$ac_ext >&5
18536
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018537 { echo "$as_me:$LINENO: result: no" >&5
18538echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018539
18540fi
18541
18542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018543{ echo "$as_me:$LINENO: checking for kqueue" >&5
18544echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018545cat >conftest.$ac_ext <<_ACEOF
18546/* confdefs.h. */
18547_ACEOF
18548cat confdefs.h >>conftest.$ac_ext
18549cat >>conftest.$ac_ext <<_ACEOF
18550/* end confdefs.h. */
18551
18552#include <sys/types.h>
18553#include <sys/event.h>
18554
18555int
18556main ()
18557{
18558int x=kqueue()
18559 ;
18560 return 0;
18561}
18562_ACEOF
18563rm -f conftest.$ac_objext
18564if { (ac_try="$ac_compile"
18565case "(($ac_try" in
18566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18567 *) ac_try_echo=$ac_try;;
18568esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018570 (eval "$ac_compile") 2>conftest.er1
18571 ac_status=$?
18572 grep -v '^ *+' conftest.er1 >conftest.err
18573 rm -f conftest.er1
18574 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018576 (exit $ac_status); } && {
18577 test -z "$ac_c_werror_flag" ||
18578 test ! -s conftest.err
18579 } && test -s conftest.$ac_objext; then
18580
18581cat >>confdefs.h <<\_ACEOF
18582#define HAVE_KQUEUE 1
18583_ACEOF
18584
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018585 { echo "$as_me:$LINENO: result: yes" >&5
18586echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018587else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018588 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018589sed 's/^/| /' conftest.$ac_ext >&5
18590
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018591 { echo "$as_me:$LINENO: result: no" >&5
18592echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018593
18594fi
18595
18596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018597# On some systems (eg. FreeBSD 5), we would find a definition of the
18598# functions ctermid_r, setgroups in the library, but no prototype
18599# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18600# address to avoid compiler warnings and potential miscompilations
18601# because of the missing prototypes.
18602
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018603{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18604echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018605cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018606/* confdefs.h. */
18607_ACEOF
18608cat confdefs.h >>conftest.$ac_ext
18609cat >>conftest.$ac_ext <<_ACEOF
18610/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018611
18612#include "confdefs.h"
18613#include <stdio.h>
18614
Martin v. Löwisd5843682002-11-21 20:41:28 +000018615int
18616main ()
18617{
18618void* p = ctermid_r
18619 ;
18620 return 0;
18621}
18622_ACEOF
18623rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018624if { (ac_try="$ac_compile"
18625case "(($ac_try" in
18626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18627 *) ac_try_echo=$ac_try;;
18628esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018630 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018632 grep -v '^ *+' conftest.er1 >conftest.err
18633 rm -f conftest.er1
18634 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018636 (exit $ac_status); } && {
18637 test -z "$ac_c_werror_flag" ||
18638 test ! -s conftest.err
18639 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018640
18641cat >>confdefs.h <<\_ACEOF
18642#define HAVE_CTERMID_R 1
18643_ACEOF
18644
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018645 { echo "$as_me:$LINENO: result: yes" >&5
18646echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018647else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018649sed 's/^/| /' conftest.$ac_ext >&5
18650
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018651 { echo "$as_me:$LINENO: result: no" >&5
18652echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018653
18654fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018655
Martin v. Löwiseba40652007-08-30 20:10:57 +000018656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18657
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018658{ echo "$as_me:$LINENO: checking for flock" >&5
18659echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018660cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018661/* confdefs.h. */
18662_ACEOF
18663cat confdefs.h >>conftest.$ac_ext
18664cat >>conftest.$ac_ext <<_ACEOF
18665/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018666
18667#include "confdefs.h"
18668#include <sys/file.h>
18669
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018670int
18671main ()
18672{
18673void* p = flock
18674 ;
18675 return 0;
18676}
18677_ACEOF
18678rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018679if { (ac_try="$ac_compile"
18680case "(($ac_try" in
18681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18682 *) ac_try_echo=$ac_try;;
18683esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018685 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018686 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018687 grep -v '^ *+' conftest.er1 >conftest.err
18688 rm -f conftest.er1
18689 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018691 (exit $ac_status); } && {
18692 test -z "$ac_c_werror_flag" ||
18693 test ! -s conftest.err
18694 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018695
18696cat >>confdefs.h <<\_ACEOF
18697#define HAVE_FLOCK 1
18698_ACEOF
18699
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018700 { echo "$as_me:$LINENO: result: yes" >&5
18701echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018702else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018703 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018704sed 's/^/| /' conftest.$ac_ext >&5
18705
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018706 { echo "$as_me:$LINENO: result: no" >&5
18707echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018708
18709fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018710
Martin v. Löwiseba40652007-08-30 20:10:57 +000018711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18712
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018713{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18714echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018715cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018716/* confdefs.h. */
18717_ACEOF
18718cat confdefs.h >>conftest.$ac_ext
18719cat >>conftest.$ac_ext <<_ACEOF
18720/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018721
18722#include "confdefs.h"
18723#include <unistd.h>
18724
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018725int
18726main ()
18727{
18728void* p = getpagesize
18729 ;
18730 return 0;
18731}
18732_ACEOF
18733rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018734if { (ac_try="$ac_compile"
18735case "(($ac_try" in
18736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18737 *) ac_try_echo=$ac_try;;
18738esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018740 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018742 grep -v '^ *+' conftest.er1 >conftest.err
18743 rm -f conftest.er1
18744 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018746 (exit $ac_status); } && {
18747 test -z "$ac_c_werror_flag" ||
18748 test ! -s conftest.err
18749 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018750
18751cat >>confdefs.h <<\_ACEOF
18752#define HAVE_GETPAGESIZE 1
18753_ACEOF
18754
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018755 { echo "$as_me:$LINENO: result: yes" >&5
18756echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018757else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018759sed 's/^/| /' conftest.$ac_ext >&5
18760
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018761 { echo "$as_me:$LINENO: result: no" >&5
18762echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018763
18764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018765
18766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018767
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018768for ac_prog in true
18769do
18770 # Extract the first word of "$ac_prog", so it can be a program name with args.
18771set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018772{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18773echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018774if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018775 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018776else
18777 if test -n "$TRUE"; then
18778 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18779else
18780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18781for as_dir in $PATH
18782do
18783 IFS=$as_save_IFS
18784 test -z "$as_dir" && as_dir=.
18785 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018786 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 +000018787 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018788 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018789 break 2
18790 fi
18791done
18792done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018793IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018794
18795fi
18796fi
18797TRUE=$ac_cv_prog_TRUE
18798if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018799 { echo "$as_me:$LINENO: result: $TRUE" >&5
18800echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018801else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018802 { echo "$as_me:$LINENO: result: no" >&5
18803echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018804fi
18805
Martin v. Löwiseba40652007-08-30 20:10:57 +000018806
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018807 test -n "$TRUE" && break
18808done
18809test -n "$TRUE" || TRUE="/bin/true"
18810
18811
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018812{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18813echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018814if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018815 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018816else
18817 ac_check_lib_save_LIBS=$LIBS
18818LIBS="-lc $LIBS"
18819cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018820/* confdefs.h. */
18821_ACEOF
18822cat confdefs.h >>conftest.$ac_ext
18823cat >>conftest.$ac_ext <<_ACEOF
18824/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018825
Martin v. Löwiseba40652007-08-30 20:10:57 +000018826/* Override any GCC internal prototype to avoid an error.
18827 Use char because int might match the return type of a GCC
18828 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018829#ifdef __cplusplus
18830extern "C"
18831#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018832char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018833int
18834main ()
18835{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018836return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018837 ;
18838 return 0;
18839}
18840_ACEOF
18841rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018842if { (ac_try="$ac_link"
18843case "(($ac_try" in
18844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18845 *) ac_try_echo=$ac_try;;
18846esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018848 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018849 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018850 grep -v '^ *+' conftest.er1 >conftest.err
18851 rm -f conftest.er1
18852 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018854 (exit $ac_status); } && {
18855 test -z "$ac_c_werror_flag" ||
18856 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018857 } && test -s conftest$ac_exeext &&
18858 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018859 ac_cv_lib_c_inet_aton=yes
18860else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018862sed 's/^/| /' conftest.$ac_ext >&5
18863
Martin v. Löwiseba40652007-08-30 20:10:57 +000018864 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018866
18867rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018868 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018869LIBS=$ac_check_lib_save_LIBS
18870fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018871{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18872echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18873if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018874 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018875else
18876
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018877{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18878echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018879if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018880 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018881else
18882 ac_check_lib_save_LIBS=$LIBS
18883LIBS="-lresolv $LIBS"
18884cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018885/* confdefs.h. */
18886_ACEOF
18887cat confdefs.h >>conftest.$ac_ext
18888cat >>conftest.$ac_ext <<_ACEOF
18889/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018890
Martin v. Löwiseba40652007-08-30 20:10:57 +000018891/* Override any GCC internal prototype to avoid an error.
18892 Use char because int might match the return type of a GCC
18893 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018894#ifdef __cplusplus
18895extern "C"
18896#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018897char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018898int
18899main ()
18900{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018901return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018902 ;
18903 return 0;
18904}
18905_ACEOF
18906rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018907if { (ac_try="$ac_link"
18908case "(($ac_try" in
18909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18910 *) ac_try_echo=$ac_try;;
18911esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018913 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018914 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018915 grep -v '^ *+' conftest.er1 >conftest.err
18916 rm -f conftest.er1
18917 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018919 (exit $ac_status); } && {
18920 test -z "$ac_c_werror_flag" ||
18921 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018922 } && test -s conftest$ac_exeext &&
18923 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018924 ac_cv_lib_resolv_inet_aton=yes
18925else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018926 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018927sed 's/^/| /' conftest.$ac_ext >&5
18928
Martin v. Löwiseba40652007-08-30 20:10:57 +000018929 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018931
18932rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018933 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018934LIBS=$ac_check_lib_save_LIBS
18935fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018936{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18937echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18938if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018939 cat >>confdefs.h <<_ACEOF
18940#define HAVE_LIBRESOLV 1
18941_ACEOF
18942
18943 LIBS="-lresolv $LIBS"
18944
18945fi
18946
18947
18948fi
18949
18950
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018951# On Tru64, chflags seems to be present, but calling it will
18952# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018953{ echo "$as_me:$LINENO: checking for chflags" >&5
18954echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018955if test "${ac_cv_have_chflags+set}" = set; then
18956 echo $ECHO_N "(cached) $ECHO_C" >&6
18957else
18958 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000018959 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018960else
18961 cat >conftest.$ac_ext <<_ACEOF
18962/* confdefs.h. */
18963_ACEOF
18964cat confdefs.h >>conftest.$ac_ext
18965cat >>conftest.$ac_ext <<_ACEOF
18966/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000018967[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018968#include <sys/stat.h>
18969#include <unistd.h>
18970int main(int argc, char*argv[])
18971{
18972 if(chflags(argv[0], 0) != 0)
18973 return 1;
18974 return 0;
18975}
Gregory P. Smith49437c22009-11-02 01:38:35 +000018976]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018977_ACEOF
18978rm -f conftest$ac_exeext
18979if { (ac_try="$ac_link"
18980case "(($ac_try" in
18981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18982 *) ac_try_echo=$ac_try;;
18983esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018985 (eval "$ac_link") 2>&5
18986 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018988 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18989 { (case "(($ac_try" in
18990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18991 *) ac_try_echo=$ac_try;;
18992esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018994 (eval "$ac_try") 2>&5
18995 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018997 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018998 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018999else
19000 echo "$as_me: program exited with status $ac_status" >&5
19001echo "$as_me: failed program was:" >&5
19002sed 's/^/| /' conftest.$ac_ext >&5
19003
19004( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019005ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019006fi
19007rm -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 +000019008fi
19009
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019010
19011
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019012fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019013{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
19014echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019015if test "$ac_cv_have_chflags" = cross ; then
19016 { echo "$as_me:$LINENO: checking for chflags" >&5
19017echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
19018if test "${ac_cv_func_chflags+set}" = set; then
19019 echo $ECHO_N "(cached) $ECHO_C" >&6
19020else
19021 cat >conftest.$ac_ext <<_ACEOF
19022/* confdefs.h. */
19023_ACEOF
19024cat confdefs.h >>conftest.$ac_ext
19025cat >>conftest.$ac_ext <<_ACEOF
19026/* end confdefs.h. */
19027/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
19028 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19029#define chflags innocuous_chflags
19030
19031/* System header to define __stub macros and hopefully few prototypes,
19032 which can conflict with char chflags (); below.
19033 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19034 <limits.h> exists even on freestanding compilers. */
19035
19036#ifdef __STDC__
19037# include <limits.h>
19038#else
19039# include <assert.h>
19040#endif
19041
19042#undef chflags
19043
19044/* Override any GCC internal prototype to avoid an error.
19045 Use char because int might match the return type of a GCC
19046 builtin and then its argument prototype would still apply. */
19047#ifdef __cplusplus
19048extern "C"
19049#endif
19050char chflags ();
19051/* The GNU C library defines this for functions which it implements
19052 to always fail with ENOSYS. Some functions are actually named
19053 something starting with __ and the normal name is an alias. */
19054#if defined __stub_chflags || defined __stub___chflags
19055choke me
19056#endif
19057
19058int
19059main ()
19060{
19061return chflags ();
19062 ;
19063 return 0;
19064}
19065_ACEOF
19066rm -f conftest.$ac_objext conftest$ac_exeext
19067if { (ac_try="$ac_link"
19068case "(($ac_try" in
19069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19070 *) ac_try_echo=$ac_try;;
19071esac
19072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19073 (eval "$ac_link") 2>conftest.er1
19074 ac_status=$?
19075 grep -v '^ *+' conftest.er1 >conftest.err
19076 rm -f conftest.er1
19077 cat conftest.err >&5
19078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19079 (exit $ac_status); } && {
19080 test -z "$ac_c_werror_flag" ||
19081 test ! -s conftest.err
19082 } && test -s conftest$ac_exeext &&
19083 $as_test_x conftest$ac_exeext; then
19084 ac_cv_func_chflags=yes
19085else
19086 echo "$as_me: failed program was:" >&5
19087sed 's/^/| /' conftest.$ac_ext >&5
19088
19089 ac_cv_func_chflags=no
19090fi
19091
19092rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19093 conftest$ac_exeext conftest.$ac_ext
19094fi
19095{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
19096echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
19097if test $ac_cv_func_chflags = yes; then
19098 ac_cv_have_chflags="yes"
19099else
19100 ac_cv_have_chflags="no"
19101fi
19102
19103fi
19104if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019105
19106cat >>confdefs.h <<\_ACEOF
19107#define HAVE_CHFLAGS 1
19108_ACEOF
19109
19110fi
19111
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019112{ echo "$as_me:$LINENO: checking for lchflags" >&5
19113echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019114if test "${ac_cv_have_lchflags+set}" = set; then
19115 echo $ECHO_N "(cached) $ECHO_C" >&6
19116else
19117 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019118 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019119else
19120 cat >conftest.$ac_ext <<_ACEOF
19121/* confdefs.h. */
19122_ACEOF
19123cat confdefs.h >>conftest.$ac_ext
19124cat >>conftest.$ac_ext <<_ACEOF
19125/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019126[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019127#include <sys/stat.h>
19128#include <unistd.h>
19129int main(int argc, char*argv[])
19130{
19131 if(lchflags(argv[0], 0) != 0)
19132 return 1;
19133 return 0;
19134}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019135]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019136_ACEOF
19137rm -f conftest$ac_exeext
19138if { (ac_try="$ac_link"
19139case "(($ac_try" in
19140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19141 *) ac_try_echo=$ac_try;;
19142esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019144 (eval "$ac_link") 2>&5
19145 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019147 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19148 { (case "(($ac_try" in
19149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19150 *) ac_try_echo=$ac_try;;
19151esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019153 (eval "$ac_try") 2>&5
19154 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019156 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019157 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019158else
19159 echo "$as_me: program exited with status $ac_status" >&5
19160echo "$as_me: failed program was:" >&5
19161sed 's/^/| /' conftest.$ac_ext >&5
19162
19163( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019164ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019165fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19167fi
19168
19169
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019170
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019171fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019172{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
19173echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019174if test "$ac_cv_have_lchflags" = cross ; then
19175 { echo "$as_me:$LINENO: checking for lchflags" >&5
19176echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
19177if test "${ac_cv_func_lchflags+set}" = set; then
19178 echo $ECHO_N "(cached) $ECHO_C" >&6
19179else
19180 cat >conftest.$ac_ext <<_ACEOF
19181/* confdefs.h. */
19182_ACEOF
19183cat confdefs.h >>conftest.$ac_ext
19184cat >>conftest.$ac_ext <<_ACEOF
19185/* end confdefs.h. */
19186/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
19187 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19188#define lchflags innocuous_lchflags
19189
19190/* System header to define __stub macros and hopefully few prototypes,
19191 which can conflict with char lchflags (); below.
19192 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19193 <limits.h> exists even on freestanding compilers. */
19194
19195#ifdef __STDC__
19196# include <limits.h>
19197#else
19198# include <assert.h>
19199#endif
19200
19201#undef lchflags
19202
19203/* Override any GCC internal prototype to avoid an error.
19204 Use char because int might match the return type of a GCC
19205 builtin and then its argument prototype would still apply. */
19206#ifdef __cplusplus
19207extern "C"
19208#endif
19209char lchflags ();
19210/* The GNU C library defines this for functions which it implements
19211 to always fail with ENOSYS. Some functions are actually named
19212 something starting with __ and the normal name is an alias. */
19213#if defined __stub_lchflags || defined __stub___lchflags
19214choke me
19215#endif
19216
19217int
19218main ()
19219{
19220return lchflags ();
19221 ;
19222 return 0;
19223}
19224_ACEOF
19225rm -f conftest.$ac_objext conftest$ac_exeext
19226if { (ac_try="$ac_link"
19227case "(($ac_try" in
19228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19229 *) ac_try_echo=$ac_try;;
19230esac
19231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19232 (eval "$ac_link") 2>conftest.er1
19233 ac_status=$?
19234 grep -v '^ *+' conftest.er1 >conftest.err
19235 rm -f conftest.er1
19236 cat conftest.err >&5
19237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19238 (exit $ac_status); } && {
19239 test -z "$ac_c_werror_flag" ||
19240 test ! -s conftest.err
19241 } && test -s conftest$ac_exeext &&
19242 $as_test_x conftest$ac_exeext; then
19243 ac_cv_func_lchflags=yes
19244else
19245 echo "$as_me: failed program was:" >&5
19246sed 's/^/| /' conftest.$ac_ext >&5
19247
19248 ac_cv_func_lchflags=no
19249fi
19250
19251rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19252 conftest$ac_exeext conftest.$ac_ext
19253fi
19254{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
19255echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
19256if test $ac_cv_func_lchflags = yes; then
19257 ac_cv_have_lchflags="yes"
19258else
19259 ac_cv_have_lchflags="no"
19260fi
19261
19262fi
19263if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019264
19265cat >>confdefs.h <<\_ACEOF
19266#define HAVE_LCHFLAGS 1
19267_ACEOF
19268
19269fi
19270
Ronald Oussorenf8752642006-07-06 10:13:35 +000019271case $ac_sys_system/$ac_sys_release in
19272Darwin/*)
19273 _CUR_CFLAGS="${CFLAGS}"
19274 _CUR_LDFLAGS="${LDFLAGS}"
19275 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
19276 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
19277 ;;
19278esac
19279
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019280{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
19281echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019282if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019283 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019284else
19285 ac_check_lib_save_LIBS=$LIBS
19286LIBS="-lz $LIBS"
19287cat >conftest.$ac_ext <<_ACEOF
19288/* confdefs.h. */
19289_ACEOF
19290cat confdefs.h >>conftest.$ac_ext
19291cat >>conftest.$ac_ext <<_ACEOF
19292/* end confdefs.h. */
19293
Martin v. Löwiseba40652007-08-30 20:10:57 +000019294/* Override any GCC internal prototype to avoid an error.
19295 Use char because int might match the return type of a GCC
19296 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019297#ifdef __cplusplus
19298extern "C"
19299#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019300char inflateCopy ();
19301int
19302main ()
19303{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019304return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019305 ;
19306 return 0;
19307}
19308_ACEOF
19309rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019310if { (ac_try="$ac_link"
19311case "(($ac_try" in
19312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19313 *) ac_try_echo=$ac_try;;
19314esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019316 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019317 ac_status=$?
19318 grep -v '^ *+' conftest.er1 >conftest.err
19319 rm -f conftest.er1
19320 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019322 (exit $ac_status); } && {
19323 test -z "$ac_c_werror_flag" ||
19324 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019325 } && test -s conftest$ac_exeext &&
19326 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019327 ac_cv_lib_z_inflateCopy=yes
19328else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019329 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019330sed 's/^/| /' conftest.$ac_ext >&5
19331
Martin v. Löwiseba40652007-08-30 20:10:57 +000019332 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019334
19335rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019336 conftest$ac_exeext conftest.$ac_ext
19337LIBS=$ac_check_lib_save_LIBS
19338fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019339{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19340echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19341if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019342
19343cat >>confdefs.h <<\_ACEOF
19344#define HAVE_ZLIB_COPY 1
19345_ACEOF
19346
19347fi
19348
19349
Ronald Oussorenf8752642006-07-06 10:13:35 +000019350case $ac_sys_system/$ac_sys_release in
19351Darwin/*)
19352 CFLAGS="${_CUR_CFLAGS}"
19353 LDFLAGS="${_CUR_LDFLAGS}"
19354 ;;
19355esac
19356
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019357{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19358echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019359cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019360/* confdefs.h. */
19361_ACEOF
19362cat confdefs.h >>conftest.$ac_ext
19363cat >>conftest.$ac_ext <<_ACEOF
19364/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019365
19366#include "confdefs.h"
19367#include <netdb.h>
19368
Martin v. Löwise9416172003-05-03 10:12:45 +000019369int
19370main ()
19371{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019372void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019373 ;
19374 return 0;
19375}
19376_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019377rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019378if { (ac_try="$ac_link"
19379case "(($ac_try" in
19380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19381 *) ac_try_echo=$ac_try;;
19382esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019384 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019385 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019386 grep -v '^ *+' conftest.er1 >conftest.err
19387 rm -f conftest.er1
19388 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019390 (exit $ac_status); } && {
19391 test -z "$ac_c_werror_flag" ||
19392 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019393 } && test -s conftest$ac_exeext &&
19394 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019395
19396cat >>confdefs.h <<\_ACEOF
19397#define HAVE_HSTRERROR 1
19398_ACEOF
19399
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019400 { echo "$as_me:$LINENO: result: yes" >&5
19401echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019402else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019403 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019404sed 's/^/| /' conftest.$ac_ext >&5
19405
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019406 { echo "$as_me:$LINENO: result: no" >&5
19407echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019408
19409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019410
19411rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019412 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019413
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019414{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19415echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019416cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019417/* confdefs.h. */
19418_ACEOF
19419cat confdefs.h >>conftest.$ac_ext
19420cat >>conftest.$ac_ext <<_ACEOF
19421/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019422
19423#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019424#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019425#include <sys/socket.h>
19426#include <netinet/in.h>
19427#include <arpa/inet.h>
19428
Martin v. Löwise9416172003-05-03 10:12:45 +000019429int
19430main ()
19431{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019432void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019433 ;
19434 return 0;
19435}
19436_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019437rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019438if { (ac_try="$ac_link"
19439case "(($ac_try" in
19440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19441 *) ac_try_echo=$ac_try;;
19442esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019444 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019445 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019446 grep -v '^ *+' conftest.er1 >conftest.err
19447 rm -f conftest.er1
19448 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019450 (exit $ac_status); } && {
19451 test -z "$ac_c_werror_flag" ||
19452 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019453 } && test -s conftest$ac_exeext &&
19454 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019455
19456cat >>confdefs.h <<\_ACEOF
19457#define HAVE_INET_ATON 1
19458_ACEOF
19459
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019460 { echo "$as_me:$LINENO: result: yes" >&5
19461echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019462else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019463 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019464sed 's/^/| /' conftest.$ac_ext >&5
19465
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019466 { echo "$as_me:$LINENO: result: no" >&5
19467echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019468
19469fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019470
19471rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019472 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019473
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019474{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19475echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019476cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019477/* confdefs.h. */
19478_ACEOF
19479cat confdefs.h >>conftest.$ac_ext
19480cat >>conftest.$ac_ext <<_ACEOF
19481/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019482
19483#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019484#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019485#include <sys/socket.h>
19486#include <netinet/in.h>
19487#include <arpa/inet.h>
19488
Martin v. Löwise9416172003-05-03 10:12:45 +000019489int
19490main ()
19491{
19492void* p = inet_pton
19493 ;
19494 return 0;
19495}
19496_ACEOF
19497rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019498if { (ac_try="$ac_compile"
19499case "(($ac_try" in
19500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19501 *) ac_try_echo=$ac_try;;
19502esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019504 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019506 grep -v '^ *+' conftest.er1 >conftest.err
19507 rm -f conftest.er1
19508 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019510 (exit $ac_status); } && {
19511 test -z "$ac_c_werror_flag" ||
19512 test ! -s conftest.err
19513 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019514
19515cat >>confdefs.h <<\_ACEOF
19516#define HAVE_INET_PTON 1
19517_ACEOF
19518
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019519 { echo "$as_me:$LINENO: result: yes" >&5
19520echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019521else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019523sed 's/^/| /' conftest.$ac_ext >&5
19524
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019525 { echo "$as_me:$LINENO: result: no" >&5
19526echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019527
19528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019529
19530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019531
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019532# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019533{ echo "$as_me:$LINENO: checking for setgroups" >&5
19534echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019535cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019536/* confdefs.h. */
19537_ACEOF
19538cat confdefs.h >>conftest.$ac_ext
19539cat >>conftest.$ac_ext <<_ACEOF
19540/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019541
19542#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019543#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019544#ifdef HAVE_GRP_H
19545#include <grp.h>
19546#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019547
Martin v. Löwisd5843682002-11-21 20:41:28 +000019548int
19549main ()
19550{
19551void* p = setgroups
19552 ;
19553 return 0;
19554}
19555_ACEOF
19556rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019557if { (ac_try="$ac_compile"
19558case "(($ac_try" in
19559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19560 *) ac_try_echo=$ac_try;;
19561esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019563 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019565 grep -v '^ *+' conftest.er1 >conftest.err
19566 rm -f conftest.er1
19567 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019569 (exit $ac_status); } && {
19570 test -z "$ac_c_werror_flag" ||
19571 test ! -s conftest.err
19572 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019573
19574cat >>confdefs.h <<\_ACEOF
19575#define HAVE_SETGROUPS 1
19576_ACEOF
19577
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019578 { echo "$as_me:$LINENO: result: yes" >&5
19579echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019580else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019582sed 's/^/| /' conftest.$ac_ext >&5
19583
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019584 { echo "$as_me:$LINENO: result: no" >&5
19585echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019586
19587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019588
19589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019590
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019591# check for openpty and forkpty
19592
Martin v. Löwis11437992002-04-12 09:54:03 +000019593
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019594for ac_func in openpty
19595do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019596as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19597{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19598echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019599if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019600 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019601else
Martin v. Löwis11437992002-04-12 09:54:03 +000019602 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019603/* confdefs.h. */
19604_ACEOF
19605cat confdefs.h >>conftest.$ac_ext
19606cat >>conftest.$ac_ext <<_ACEOF
19607/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019608/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19609 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19610#define $ac_func innocuous_$ac_func
19611
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019612/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019613 which can conflict with char $ac_func (); below.
19614 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019615 <limits.h> exists even on freestanding compilers. */
19616
19617#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019618# include <limits.h>
19619#else
19620# include <assert.h>
19621#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019622
19623#undef $ac_func
19624
Martin v. Löwiseba40652007-08-30 20:10:57 +000019625/* Override any GCC internal prototype to avoid an error.
19626 Use char because int might match the return type of a GCC
19627 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019628#ifdef __cplusplus
19629extern "C"
19630#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019631char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019632/* The GNU C library defines this for functions which it implements
19633 to always fail with ENOSYS. Some functions are actually named
19634 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019635#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019636choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019637#endif
19638
Skip Montanaro6dead952003-09-25 14:50:04 +000019639int
19640main ()
19641{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019642return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019643 ;
19644 return 0;
19645}
19646_ACEOF
19647rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019648if { (ac_try="$ac_link"
19649case "(($ac_try" in
19650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19651 *) ac_try_echo=$ac_try;;
19652esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019654 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019655 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019656 grep -v '^ *+' conftest.er1 >conftest.err
19657 rm -f conftest.er1
19658 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019660 (exit $ac_status); } && {
19661 test -z "$ac_c_werror_flag" ||
19662 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019663 } && test -s conftest$ac_exeext &&
19664 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019665 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019666else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019668sed 's/^/| /' conftest.$ac_ext >&5
19669
Martin v. Löwiseba40652007-08-30 20:10:57 +000019670 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019672
19673rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019674 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019675fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019676ac_res=`eval echo '${'$as_ac_var'}'`
19677 { echo "$as_me:$LINENO: result: $ac_res" >&5
19678echo "${ECHO_T}$ac_res" >&6; }
19679if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019680 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019681#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019682_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019683
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019684else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019685 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19686echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019687if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019688 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019689else
Martin v. Löwis11437992002-04-12 09:54:03 +000019690 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019691LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019692cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019693/* confdefs.h. */
19694_ACEOF
19695cat confdefs.h >>conftest.$ac_ext
19696cat >>conftest.$ac_ext <<_ACEOF
19697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019698
Martin v. Löwiseba40652007-08-30 20:10:57 +000019699/* Override any GCC internal prototype to avoid an error.
19700 Use char because int might match the return type of a GCC
19701 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019702#ifdef __cplusplus
19703extern "C"
19704#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019705char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019706int
19707main ()
19708{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019709return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019710 ;
19711 return 0;
19712}
19713_ACEOF
19714rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019715if { (ac_try="$ac_link"
19716case "(($ac_try" in
19717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19718 *) ac_try_echo=$ac_try;;
19719esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019721 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019722 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019723 grep -v '^ *+' conftest.er1 >conftest.err
19724 rm -f conftest.er1
19725 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019727 (exit $ac_status); } && {
19728 test -z "$ac_c_werror_flag" ||
19729 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019730 } && test -s conftest$ac_exeext &&
19731 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019732 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019733else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019734 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019735sed 's/^/| /' conftest.$ac_ext >&5
19736
Martin v. Löwiseba40652007-08-30 20:10:57 +000019737 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019739
19740rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019741 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019742LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019743fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019744{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19745echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19746if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019747 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019748#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019749_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019750 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019751else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019752 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19753echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019754if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019755 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019756else
19757 ac_check_lib_save_LIBS=$LIBS
19758LIBS="-lbsd $LIBS"
19759cat >conftest.$ac_ext <<_ACEOF
19760/* confdefs.h. */
19761_ACEOF
19762cat confdefs.h >>conftest.$ac_ext
19763cat >>conftest.$ac_ext <<_ACEOF
19764/* end confdefs.h. */
19765
Martin v. Löwiseba40652007-08-30 20:10:57 +000019766/* Override any GCC internal prototype to avoid an error.
19767 Use char because int might match the return type of a GCC
19768 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019769#ifdef __cplusplus
19770extern "C"
19771#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019772char openpty ();
19773int
19774main ()
19775{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019776return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019777 ;
19778 return 0;
19779}
19780_ACEOF
19781rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019782if { (ac_try="$ac_link"
19783case "(($ac_try" in
19784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19785 *) ac_try_echo=$ac_try;;
19786esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019788 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019789 ac_status=$?
19790 grep -v '^ *+' conftest.er1 >conftest.err
19791 rm -f conftest.er1
19792 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019794 (exit $ac_status); } && {
19795 test -z "$ac_c_werror_flag" ||
19796 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019797 } && test -s conftest$ac_exeext &&
19798 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019799 ac_cv_lib_bsd_openpty=yes
19800else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019801 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019802sed 's/^/| /' conftest.$ac_ext >&5
19803
Martin v. Löwiseba40652007-08-30 20:10:57 +000019804 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019805fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019806
19807rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019808 conftest$ac_exeext conftest.$ac_ext
19809LIBS=$ac_check_lib_save_LIBS
19810fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019811{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19812echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19813if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019814 cat >>confdefs.h <<\_ACEOF
19815#define HAVE_OPENPTY 1
19816_ACEOF
19817 LIBS="$LIBS -lbsd"
19818fi
19819
19820
19821fi
19822
Fred Drake8cef4cf2000-06-28 16:40:38 +000019823
19824fi
19825done
19826
Martin v. Löwis11437992002-04-12 09:54:03 +000019827
Fred Drake8cef4cf2000-06-28 16:40:38 +000019828for ac_func in forkpty
19829do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019830as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19831{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19832echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019833if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019834 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019835else
Martin v. Löwis11437992002-04-12 09:54:03 +000019836 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019837/* confdefs.h. */
19838_ACEOF
19839cat confdefs.h >>conftest.$ac_ext
19840cat >>conftest.$ac_ext <<_ACEOF
19841/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019842/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19843 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19844#define $ac_func innocuous_$ac_func
19845
Fred Drake8cef4cf2000-06-28 16:40:38 +000019846/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019847 which can conflict with char $ac_func (); below.
19848 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019849 <limits.h> exists even on freestanding compilers. */
19850
19851#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019852# include <limits.h>
19853#else
19854# include <assert.h>
19855#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019856
19857#undef $ac_func
19858
Martin v. Löwiseba40652007-08-30 20:10:57 +000019859/* Override any GCC internal prototype to avoid an error.
19860 Use char because int might match the return type of a GCC
19861 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019862#ifdef __cplusplus
19863extern "C"
19864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019865char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019866/* The GNU C library defines this for functions which it implements
19867 to always fail with ENOSYS. Some functions are actually named
19868 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019869#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019870choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019871#endif
19872
Skip Montanaro6dead952003-09-25 14:50:04 +000019873int
19874main ()
19875{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019876return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019877 ;
19878 return 0;
19879}
19880_ACEOF
19881rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019882if { (ac_try="$ac_link"
19883case "(($ac_try" in
19884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19885 *) ac_try_echo=$ac_try;;
19886esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019888 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019890 grep -v '^ *+' conftest.er1 >conftest.err
19891 rm -f conftest.er1
19892 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019894 (exit $ac_status); } && {
19895 test -z "$ac_c_werror_flag" ||
19896 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019897 } && test -s conftest$ac_exeext &&
19898 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019899 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019900else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019902sed 's/^/| /' conftest.$ac_ext >&5
19903
Martin v. Löwiseba40652007-08-30 20:10:57 +000019904 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019906
19907rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019908 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019909fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019910ac_res=`eval echo '${'$as_ac_var'}'`
19911 { echo "$as_me:$LINENO: result: $ac_res" >&5
19912echo "${ECHO_T}$ac_res" >&6; }
19913if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019914 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019915#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019916_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019917
Fred Drake8cef4cf2000-06-28 16:40:38 +000019918else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019919 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19920echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019921if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019922 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019923else
Martin v. Löwis11437992002-04-12 09:54:03 +000019924 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019925LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019926cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019927/* confdefs.h. */
19928_ACEOF
19929cat confdefs.h >>conftest.$ac_ext
19930cat >>conftest.$ac_ext <<_ACEOF
19931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019932
Martin v. Löwiseba40652007-08-30 20:10:57 +000019933/* Override any GCC internal prototype to avoid an error.
19934 Use char because int might match the return type of a GCC
19935 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019936#ifdef __cplusplus
19937extern "C"
19938#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019939char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019940int
19941main ()
19942{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019943return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019944 ;
19945 return 0;
19946}
19947_ACEOF
19948rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019949if { (ac_try="$ac_link"
19950case "(($ac_try" in
19951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19952 *) ac_try_echo=$ac_try;;
19953esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019955 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019957 grep -v '^ *+' conftest.er1 >conftest.err
19958 rm -f conftest.er1
19959 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019961 (exit $ac_status); } && {
19962 test -z "$ac_c_werror_flag" ||
19963 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019964 } && test -s conftest$ac_exeext &&
19965 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019966 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019967else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019969sed 's/^/| /' conftest.$ac_ext >&5
19970
Martin v. Löwiseba40652007-08-30 20:10:57 +000019971 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019973
19974rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019975 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019976LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019977fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019978{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19979echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19980if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019981 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019982#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019983_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019984 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019985else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019986 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19987echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019988if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019989 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019990else
19991 ac_check_lib_save_LIBS=$LIBS
19992LIBS="-lbsd $LIBS"
19993cat >conftest.$ac_ext <<_ACEOF
19994/* confdefs.h. */
19995_ACEOF
19996cat confdefs.h >>conftest.$ac_ext
19997cat >>conftest.$ac_ext <<_ACEOF
19998/* end confdefs.h. */
19999
Martin v. Löwiseba40652007-08-30 20:10:57 +000020000/* Override any GCC internal prototype to avoid an error.
20001 Use char because int might match the return type of a GCC
20002 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020003#ifdef __cplusplus
20004extern "C"
20005#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020006char forkpty ();
20007int
20008main ()
20009{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020010return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020011 ;
20012 return 0;
20013}
20014_ACEOF
20015rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020016if { (ac_try="$ac_link"
20017case "(($ac_try" in
20018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20019 *) ac_try_echo=$ac_try;;
20020esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020022 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020023 ac_status=$?
20024 grep -v '^ *+' conftest.er1 >conftest.err
20025 rm -f conftest.er1
20026 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020028 (exit $ac_status); } && {
20029 test -z "$ac_c_werror_flag" ||
20030 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020031 } && test -s conftest$ac_exeext &&
20032 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020033 ac_cv_lib_bsd_forkpty=yes
20034else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020035 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020036sed 's/^/| /' conftest.$ac_ext >&5
20037
Martin v. Löwiseba40652007-08-30 20:10:57 +000020038 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020039fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020040
20041rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020042 conftest$ac_exeext conftest.$ac_ext
20043LIBS=$ac_check_lib_save_LIBS
20044fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020045{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
20046echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
20047if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020048 cat >>confdefs.h <<\_ACEOF
20049#define HAVE_FORKPTY 1
20050_ACEOF
20051 LIBS="$LIBS -lbsd"
20052fi
20053
20054
20055fi
20056
Fred Drake8cef4cf2000-06-28 16:40:38 +000020057
20058fi
20059done
20060
Jack Jansendd19cf82001-12-06 22:36:17 +000020061
Brett Cannonaa5778d2008-03-18 04:09:00 +000020062# Stuff for expat.
20063
20064for ac_func in memmove
20065do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020066as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20067{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20068echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000020069if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020070 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000020071else
20072 cat >conftest.$ac_ext <<_ACEOF
20073/* confdefs.h. */
20074_ACEOF
20075cat confdefs.h >>conftest.$ac_ext
20076cat >>conftest.$ac_ext <<_ACEOF
20077/* end confdefs.h. */
20078/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20079 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20080#define $ac_func innocuous_$ac_func
20081
20082/* System header to define __stub macros and hopefully few prototypes,
20083 which can conflict with char $ac_func (); below.
20084 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20085 <limits.h> exists even on freestanding compilers. */
20086
20087#ifdef __STDC__
20088# include <limits.h>
20089#else
20090# include <assert.h>
20091#endif
20092
20093#undef $ac_func
20094
20095/* Override any GCC internal prototype to avoid an error.
20096 Use char because int might match the return type of a GCC
20097 builtin and then its argument prototype would still apply. */
20098#ifdef __cplusplus
20099extern "C"
20100#endif
20101char $ac_func ();
20102/* The GNU C library defines this for functions which it implements
20103 to always fail with ENOSYS. Some functions are actually named
20104 something starting with __ and the normal name is an alias. */
20105#if defined __stub_$ac_func || defined __stub___$ac_func
20106choke me
20107#endif
20108
20109int
20110main ()
20111{
20112return $ac_func ();
20113 ;
20114 return 0;
20115}
20116_ACEOF
20117rm -f conftest.$ac_objext conftest$ac_exeext
20118if { (ac_try="$ac_link"
20119case "(($ac_try" in
20120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20121 *) ac_try_echo=$ac_try;;
20122esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020124 (eval "$ac_link") 2>conftest.er1
20125 ac_status=$?
20126 grep -v '^ *+' conftest.er1 >conftest.err
20127 rm -f conftest.er1
20128 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020130 (exit $ac_status); } && {
20131 test -z "$ac_c_werror_flag" ||
20132 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020133 } && test -s conftest$ac_exeext &&
20134 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020135 eval "$as_ac_var=yes"
20136else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020137 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020138sed 's/^/| /' conftest.$ac_ext >&5
20139
20140 eval "$as_ac_var=no"
20141fi
20142
20143rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20144 conftest$ac_exeext conftest.$ac_ext
20145fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020146ac_res=`eval echo '${'$as_ac_var'}'`
20147 { echo "$as_me:$LINENO: result: $ac_res" >&5
20148echo "${ECHO_T}$ac_res" >&6; }
20149if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020150 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020151#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000020152_ACEOF
20153
20154fi
20155done
20156
20157
Michael W. Hudson54241132001-12-07 15:38:26 +000020158# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000020159
20160
20161
20162
20163
20164
Fred Drake8cef4cf2000-06-28 16:40:38 +000020165for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
20166do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020167as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20168{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20169echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020170if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020171 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020172else
Martin v. Löwis11437992002-04-12 09:54:03 +000020173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020174/* confdefs.h. */
20175_ACEOF
20176cat confdefs.h >>conftest.$ac_ext
20177cat >>conftest.$ac_ext <<_ACEOF
20178/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020179/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20180 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20181#define $ac_func innocuous_$ac_func
20182
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020183/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020184 which can conflict with char $ac_func (); below.
20185 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020186 <limits.h> exists even on freestanding compilers. */
20187
20188#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020189# include <limits.h>
20190#else
20191# include <assert.h>
20192#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020193
20194#undef $ac_func
20195
Martin v. Löwiseba40652007-08-30 20:10:57 +000020196/* Override any GCC internal prototype to avoid an error.
20197 Use char because int might match the return type of a GCC
20198 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020199#ifdef __cplusplus
20200extern "C"
20201#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020202char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020203/* The GNU C library defines this for functions which it implements
20204 to always fail with ENOSYS. Some functions are actually named
20205 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020206#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020207choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020208#endif
20209
Skip Montanaro6dead952003-09-25 14:50:04 +000020210int
20211main ()
20212{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020213return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020214 ;
20215 return 0;
20216}
20217_ACEOF
20218rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020219if { (ac_try="$ac_link"
20220case "(($ac_try" in
20221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20222 *) ac_try_echo=$ac_try;;
20223esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020225 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020227 grep -v '^ *+' conftest.er1 >conftest.err
20228 rm -f conftest.er1
20229 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020231 (exit $ac_status); } && {
20232 test -z "$ac_c_werror_flag" ||
20233 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020234 } && test -s conftest$ac_exeext &&
20235 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020236 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020237else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020238 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020239sed 's/^/| /' conftest.$ac_ext >&5
20240
Martin v. Löwiseba40652007-08-30 20:10:57 +000020241 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020242fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020243
20244rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020245 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020246fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020247ac_res=`eval echo '${'$as_ac_var'}'`
20248 { echo "$as_me:$LINENO: result: $ac_res" >&5
20249echo "${ECHO_T}$ac_res" >&6; }
20250if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020251 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020252#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020253_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020254
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020255fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020256done
20257
Michael W. Hudson54241132001-12-07 15:38:26 +000020258
Martin v. Löwis11437992002-04-12 09:54:03 +000020259
20260
20261
Brett Cannonaa5778d2008-03-18 04:09:00 +000020262for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000020263do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020264as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20265{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20266echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020267if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020268 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020269else
Martin v. Löwis11437992002-04-12 09:54:03 +000020270 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020271/* confdefs.h. */
20272_ACEOF
20273cat confdefs.h >>conftest.$ac_ext
20274cat >>conftest.$ac_ext <<_ACEOF
20275/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020276/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20277 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20278#define $ac_func innocuous_$ac_func
20279
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020280/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020281 which can conflict with char $ac_func (); below.
20282 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020283 <limits.h> exists even on freestanding compilers. */
20284
20285#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020286# include <limits.h>
20287#else
20288# include <assert.h>
20289#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020290
20291#undef $ac_func
20292
Martin v. Löwiseba40652007-08-30 20:10:57 +000020293/* Override any GCC internal prototype to avoid an error.
20294 Use char because int might match the return type of a GCC
20295 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020296#ifdef __cplusplus
20297extern "C"
20298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020299char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000020300/* The GNU C library defines this for functions which it implements
20301 to always fail with ENOSYS. Some functions are actually named
20302 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020303#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000020304choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000020305#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020306
Skip Montanaro6dead952003-09-25 14:50:04 +000020307int
20308main ()
20309{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020310return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020311 ;
20312 return 0;
20313}
20314_ACEOF
20315rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020316if { (ac_try="$ac_link"
20317case "(($ac_try" in
20318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20319 *) ac_try_echo=$ac_try;;
20320esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020322 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020323 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020324 grep -v '^ *+' conftest.er1 >conftest.err
20325 rm -f conftest.er1
20326 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020328 (exit $ac_status); } && {
20329 test -z "$ac_c_werror_flag" ||
20330 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020331 } && test -s conftest$ac_exeext &&
20332 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020333 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020334else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020335 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020336sed 's/^/| /' conftest.$ac_ext >&5
20337
Martin v. Löwiseba40652007-08-30 20:10:57 +000020338 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020340
20341rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020342 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020343fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020344ac_res=`eval echo '${'$as_ac_var'}'`
20345 { echo "$as_me:$LINENO: result: $ac_res" >&5
20346echo "${ECHO_T}$ac_res" >&6; }
20347if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020348 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020349#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020350_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020351
Martin v. Löwis1142de32002-03-29 16:28:31 +000020352else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020353 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020354 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020355 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20356 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020357esac
20358
Martin v. Löwis1142de32002-03-29 16:28:31 +000020359fi
20360done
20361
20362
Martin v. Löwis11437992002-04-12 09:54:03 +000020363
Martin v. Löwis1142de32002-03-29 16:28:31 +000020364for ac_func in getpgrp
20365do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020366as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20367{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20368echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020369if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020370 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020371else
Martin v. Löwis11437992002-04-12 09:54:03 +000020372 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020373/* confdefs.h. */
20374_ACEOF
20375cat confdefs.h >>conftest.$ac_ext
20376cat >>conftest.$ac_ext <<_ACEOF
20377/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020378/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20379 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20380#define $ac_func innocuous_$ac_func
20381
Martin v. Löwis1142de32002-03-29 16:28:31 +000020382/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020383 which can conflict with char $ac_func (); below.
20384 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020385 <limits.h> exists even on freestanding compilers. */
20386
20387#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020388# include <limits.h>
20389#else
20390# include <assert.h>
20391#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020392
20393#undef $ac_func
20394
Martin v. Löwiseba40652007-08-30 20:10:57 +000020395/* Override any GCC internal prototype to avoid an error.
20396 Use char because int might match the return type of a GCC
20397 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020398#ifdef __cplusplus
20399extern "C"
20400#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020401char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020402/* The GNU C library defines this for functions which it implements
20403 to always fail with ENOSYS. Some functions are actually named
20404 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020405#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020406choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020407#endif
20408
Skip Montanaro6dead952003-09-25 14:50:04 +000020409int
20410main ()
20411{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020412return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020413 ;
20414 return 0;
20415}
20416_ACEOF
20417rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020418if { (ac_try="$ac_link"
20419case "(($ac_try" in
20420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20421 *) ac_try_echo=$ac_try;;
20422esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020424 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020426 grep -v '^ *+' conftest.er1 >conftest.err
20427 rm -f conftest.er1
20428 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020430 (exit $ac_status); } && {
20431 test -z "$ac_c_werror_flag" ||
20432 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020433 } && test -s conftest$ac_exeext &&
20434 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020435 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020436else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020437 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020438sed 's/^/| /' conftest.$ac_ext >&5
20439
Martin v. Löwiseba40652007-08-30 20:10:57 +000020440 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020441fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020442
20443rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020444 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020445fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020446ac_res=`eval echo '${'$as_ac_var'}'`
20447 { echo "$as_me:$LINENO: result: $ac_res" >&5
20448echo "${ECHO_T}$ac_res" >&6; }
20449if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020450 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020451#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020452_ACEOF
20453 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020454/* confdefs.h. */
20455_ACEOF
20456cat confdefs.h >>conftest.$ac_ext
20457cat >>conftest.$ac_ext <<_ACEOF
20458/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020459#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020460int
20461main ()
20462{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020463getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020464 ;
20465 return 0;
20466}
20467_ACEOF
20468rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020469if { (ac_try="$ac_compile"
20470case "(($ac_try" in
20471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20472 *) ac_try_echo=$ac_try;;
20473esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020475 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020476 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020477 grep -v '^ *+' conftest.er1 >conftest.err
20478 rm -f conftest.er1
20479 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020481 (exit $ac_status); } && {
20482 test -z "$ac_c_werror_flag" ||
20483 test ! -s conftest.err
20484 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020485
20486cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020487#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020488_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020489
Martin v. Löwis11437992002-04-12 09:54:03 +000020490
Guido van Rossumf78abae1997-01-21 22:02:36 +000020491else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020493sed 's/^/| /' conftest.$ac_ext >&5
20494
Martin v. Löwiseba40652007-08-30 20:10:57 +000020495
Guido van Rossum627b2d71993-12-24 10:39:16 +000020496fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020497
20498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020499
Guido van Rossum627b2d71993-12-24 10:39:16 +000020500fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020501done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020502
Jack Jansen150753c2003-03-29 22:07:47 +000020503
20504for ac_func in setpgrp
20505do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020506as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20507{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20508echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020509if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020510 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020511else
Martin v. Löwis11437992002-04-12 09:54:03 +000020512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020513/* confdefs.h. */
20514_ACEOF
20515cat confdefs.h >>conftest.$ac_ext
20516cat >>conftest.$ac_ext <<_ACEOF
20517/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020518/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20519 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20520#define $ac_func innocuous_$ac_func
20521
Jack Jansen150753c2003-03-29 22:07:47 +000020522/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020523 which can conflict with char $ac_func (); below.
20524 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020525 <limits.h> exists even on freestanding compilers. */
20526
20527#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020528# include <limits.h>
20529#else
20530# include <assert.h>
20531#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020532
20533#undef $ac_func
20534
Martin v. Löwiseba40652007-08-30 20:10:57 +000020535/* Override any GCC internal prototype to avoid an error.
20536 Use char because int might match the return type of a GCC
20537 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020538#ifdef __cplusplus
20539extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020540#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020541char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020542/* The GNU C library defines this for functions which it implements
20543 to always fail with ENOSYS. Some functions are actually named
20544 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020545#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020546choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020547#endif
20548
Skip Montanaro6dead952003-09-25 14:50:04 +000020549int
20550main ()
20551{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020552return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020553 ;
20554 return 0;
20555}
20556_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020557rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020558if { (ac_try="$ac_link"
20559case "(($ac_try" in
20560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20561 *) ac_try_echo=$ac_try;;
20562esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020564 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020566 grep -v '^ *+' conftest.er1 >conftest.err
20567 rm -f conftest.er1
20568 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020570 (exit $ac_status); } && {
20571 test -z "$ac_c_werror_flag" ||
20572 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020573 } && test -s conftest$ac_exeext &&
20574 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020575 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020576else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020578sed 's/^/| /' conftest.$ac_ext >&5
20579
Martin v. Löwiseba40652007-08-30 20:10:57 +000020580 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020582
20583rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020584 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020585fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020586ac_res=`eval echo '${'$as_ac_var'}'`
20587 { echo "$as_me:$LINENO: result: $ac_res" >&5
20588echo "${ECHO_T}$ac_res" >&6; }
20589if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020590 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020591#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020592_ACEOF
20593 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020594/* confdefs.h. */
20595_ACEOF
20596cat confdefs.h >>conftest.$ac_ext
20597cat >>conftest.$ac_ext <<_ACEOF
20598/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020599#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020600int
20601main ()
20602{
20603setpgrp(0,0);
20604 ;
20605 return 0;
20606}
20607_ACEOF
20608rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020609if { (ac_try="$ac_compile"
20610case "(($ac_try" in
20611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20612 *) ac_try_echo=$ac_try;;
20613esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020615 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020617 grep -v '^ *+' conftest.er1 >conftest.err
20618 rm -f conftest.er1
20619 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020621 (exit $ac_status); } && {
20622 test -z "$ac_c_werror_flag" ||
20623 test ! -s conftest.err
20624 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020625
20626cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020627#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020628_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020629
Jack Jansen150753c2003-03-29 22:07:47 +000020630
20631else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020633sed 's/^/| /' conftest.$ac_ext >&5
20634
Martin v. Löwiseba40652007-08-30 20:10:57 +000020635
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020636fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020637
20638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020639
20640fi
20641done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020642
Martin v. Löwis11437992002-04-12 09:54:03 +000020643
Thomas Wouters3a584202000-08-05 23:28:51 +000020644for ac_func in gettimeofday
20645do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020646as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20647{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20648echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020649if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020650 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020651else
Martin v. Löwis11437992002-04-12 09:54:03 +000020652 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020653/* confdefs.h. */
20654_ACEOF
20655cat confdefs.h >>conftest.$ac_ext
20656cat >>conftest.$ac_ext <<_ACEOF
20657/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020658/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20659 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20660#define $ac_func innocuous_$ac_func
20661
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020662/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020663 which can conflict with char $ac_func (); below.
20664 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020665 <limits.h> exists even on freestanding compilers. */
20666
20667#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020668# include <limits.h>
20669#else
20670# include <assert.h>
20671#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020672
20673#undef $ac_func
20674
Martin v. Löwiseba40652007-08-30 20:10:57 +000020675/* Override any GCC internal prototype to avoid an error.
20676 Use char because int might match the return type of a GCC
20677 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020678#ifdef __cplusplus
20679extern "C"
20680#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020681char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020682/* The GNU C library defines this for functions which it implements
20683 to always fail with ENOSYS. Some functions are actually named
20684 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020685#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020686choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020687#endif
20688
Skip Montanaro6dead952003-09-25 14:50:04 +000020689int
20690main ()
20691{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020692return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020693 ;
20694 return 0;
20695}
20696_ACEOF
20697rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020698if { (ac_try="$ac_link"
20699case "(($ac_try" in
20700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20701 *) ac_try_echo=$ac_try;;
20702esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020704 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020706 grep -v '^ *+' conftest.er1 >conftest.err
20707 rm -f conftest.er1
20708 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020710 (exit $ac_status); } && {
20711 test -z "$ac_c_werror_flag" ||
20712 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020713 } && test -s conftest$ac_exeext &&
20714 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020715 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020716else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020718sed 's/^/| /' conftest.$ac_ext >&5
20719
Martin v. Löwiseba40652007-08-30 20:10:57 +000020720 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020722
20723rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020724 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020725fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020726ac_res=`eval echo '${'$as_ac_var'}'`
20727 { echo "$as_me:$LINENO: result: $ac_res" >&5
20728echo "${ECHO_T}$ac_res" >&6; }
20729if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020730 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020731#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020732_ACEOF
20733 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020734/* confdefs.h. */
20735_ACEOF
20736cat confdefs.h >>conftest.$ac_ext
20737cat >>conftest.$ac_ext <<_ACEOF
20738/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020739#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020740int
20741main ()
20742{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020743gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020744 ;
20745 return 0;
20746}
20747_ACEOF
20748rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020749if { (ac_try="$ac_compile"
20750case "(($ac_try" in
20751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20752 *) ac_try_echo=$ac_try;;
20753esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020755 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020756 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020757 grep -v '^ *+' conftest.er1 >conftest.err
20758 rm -f conftest.er1
20759 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020761 (exit $ac_status); } && {
20762 test -z "$ac_c_werror_flag" ||
20763 test ! -s conftest.err
20764 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020765 :
20766else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020768sed 's/^/| /' conftest.$ac_ext >&5
20769
Martin v. Löwis11437992002-04-12 09:54:03 +000020770
20771cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020772#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020773_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020774
Martin v. Löwis11437992002-04-12 09:54:03 +000020775
Guido van Rossum627b2d71993-12-24 10:39:16 +000020776fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020777
20778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020779
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020780fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020781done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020782
Michael W. Hudson54241132001-12-07 15:38:26 +000020783
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020784{ echo "$as_me:$LINENO: checking for major" >&5
20785echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020786cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020787/* confdefs.h. */
20788_ACEOF
20789cat confdefs.h >>conftest.$ac_ext
20790cat >>conftest.$ac_ext <<_ACEOF
20791/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020792
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020793#if defined(MAJOR_IN_MKDEV)
20794#include <sys/mkdev.h>
20795#elif defined(MAJOR_IN_SYSMACROS)
20796#include <sys/sysmacros.h>
20797#else
20798#include <sys/types.h>
20799#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020800
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020801int
20802main ()
20803{
20804
20805 makedev(major(0),minor(0));
20806
20807 ;
20808 return 0;
20809}
20810_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020811rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020812if { (ac_try="$ac_link"
20813case "(($ac_try" in
20814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20815 *) ac_try_echo=$ac_try;;
20816esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020818 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020820 grep -v '^ *+' conftest.er1 >conftest.err
20821 rm -f conftest.er1
20822 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020824 (exit $ac_status); } && {
20825 test -z "$ac_c_werror_flag" ||
20826 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020827 } && test -s conftest$ac_exeext &&
20828 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020829
20830
20831cat >>confdefs.h <<\_ACEOF
20832#define HAVE_DEVICE_MACROS 1
20833_ACEOF
20834
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020835 { echo "$as_me:$LINENO: result: yes" >&5
20836echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020837
20838else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020840sed 's/^/| /' conftest.$ac_ext >&5
20841
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020842
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020843 { echo "$as_me:$LINENO: result: no" >&5
20844echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020845
20846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020847
20848rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020849 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020850
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020851# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020852# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020853{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20854echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020855cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020856/* confdefs.h. */
20857_ACEOF
20858cat confdefs.h >>conftest.$ac_ext
20859cat >>conftest.$ac_ext <<_ACEOF
20860/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020861
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020862#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020863#include <sys/socket.h>
20864#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020865#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020866
Martin v. Löwis11437992002-04-12 09:54:03 +000020867int
20868main ()
20869{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020870getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020871 ;
20872 return 0;
20873}
20874_ACEOF
20875rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020876if { (ac_try="$ac_link"
20877case "(($ac_try" in
20878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20879 *) ac_try_echo=$ac_try;;
20880esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020882 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020883 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020884 grep -v '^ *+' conftest.er1 >conftest.err
20885 rm -f conftest.er1
20886 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020888 (exit $ac_status); } && {
20889 test -z "$ac_c_werror_flag" ||
20890 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020891 } && test -s conftest$ac_exeext &&
20892 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020893 have_getaddrinfo=yes
20894else
20895 echo "$as_me: failed program was:" >&5
20896sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020897
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020898 have_getaddrinfo=no
20899fi
20900
20901rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20902 conftest$ac_exeext conftest.$ac_ext
20903{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20904echo "${ECHO_T}$have_getaddrinfo" >&6; }
20905if test $have_getaddrinfo = yes
20906then
20907 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020908echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020909 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
20910 echo $ECHO_N "(cached) $ECHO_C" >&6
20911else
20912 if test "$cross_compiling" = yes; then
20913 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020914else
Martin v. Löwis11437992002-04-12 09:54:03 +000020915 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020916/* confdefs.h. */
20917_ACEOF
20918cat confdefs.h >>conftest.$ac_ext
20919cat >>conftest.$ac_ext <<_ACEOF
20920/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020921
20922#include <sys/types.h>
20923#include <netdb.h>
20924#include <string.h>
20925#include <sys/socket.h>
20926#include <netinet/in.h>
20927
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020928int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020929{
20930 int passive, gaierr, inet4 = 0, inet6 = 0;
20931 struct addrinfo hints, *ai, *aitop;
20932 char straddr[INET6_ADDRSTRLEN], strport[16];
20933
20934 for (passive = 0; passive <= 1; passive++) {
20935 memset(&hints, 0, sizeof(hints));
20936 hints.ai_family = AF_UNSPEC;
20937 hints.ai_flags = passive ? AI_PASSIVE : 0;
20938 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020939 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020940 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20941 (void)gai_strerror(gaierr);
20942 goto bad;
20943 }
20944 for (ai = aitop; ai; ai = ai->ai_next) {
20945 if (ai->ai_addr == NULL ||
20946 ai->ai_addrlen == 0 ||
20947 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20948 straddr, sizeof(straddr), strport, sizeof(strport),
20949 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20950 goto bad;
20951 }
20952 switch (ai->ai_family) {
20953 case AF_INET:
20954 if (strcmp(strport, "54321") != 0) {
20955 goto bad;
20956 }
20957 if (passive) {
20958 if (strcmp(straddr, "0.0.0.0") != 0) {
20959 goto bad;
20960 }
20961 } else {
20962 if (strcmp(straddr, "127.0.0.1") != 0) {
20963 goto bad;
20964 }
20965 }
20966 inet4++;
20967 break;
20968 case AF_INET6:
20969 if (strcmp(strport, "54321") != 0) {
20970 goto bad;
20971 }
20972 if (passive) {
20973 if (strcmp(straddr, "::") != 0) {
20974 goto bad;
20975 }
20976 } else {
20977 if (strcmp(straddr, "::1") != 0) {
20978 goto bad;
20979 }
20980 }
20981 inet6++;
20982 break;
20983 case AF_UNSPEC:
20984 goto bad;
20985 break;
20986 default:
20987 /* another family support? */
20988 break;
20989 }
20990 }
20991 }
20992
20993 if (!(inet4 == 0 || inet4 == 2))
20994 goto bad;
20995 if (!(inet6 == 0 || inet6 == 2))
20996 goto bad;
20997
20998 if (aitop)
20999 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021000 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021001
21002 bad:
21003 if (aitop)
21004 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021005 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021006}
21007
Martin v. Löwis11437992002-04-12 09:54:03 +000021008_ACEOF
21009rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021010if { (ac_try="$ac_link"
21011case "(($ac_try" in
21012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21013 *) ac_try_echo=$ac_try;;
21014esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021016 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021017 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021019 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021020 { (case "(($ac_try" in
21021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21022 *) ac_try_echo=$ac_try;;
21023esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021025 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021026 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021028 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021029 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021030else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021031 echo "$as_me: program exited with status $ac_status" >&5
21032echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021033sed 's/^/| /' conftest.$ac_ext >&5
21034
Martin v. Löwis11437992002-04-12 09:54:03 +000021035( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021036ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021038rm -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 +000021039fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021040
21041
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021042fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021043
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021044fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021045
Mark Dickinson0ef0b912009-12-31 21:11:48 +000021046if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021047then
21048 if test $ipv6 = yes
21049 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021050 echo 'Fatal: You must get working getaddrinfo() function.'
21051 echo ' or you can specify "--disable-ipv6"'.
21052 exit 1
21053 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021054else
Martin v. Löwis11437992002-04-12 09:54:03 +000021055
21056cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021057#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021058_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021059
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021060fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021061
Jack Jansen9a66b6d2001-08-08 13:56:14 +000021062for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021063do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021064as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21065{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21066echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021067if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021068 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021069else
Martin v. Löwis11437992002-04-12 09:54:03 +000021070 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021071/* confdefs.h. */
21072_ACEOF
21073cat confdefs.h >>conftest.$ac_ext
21074cat >>conftest.$ac_ext <<_ACEOF
21075/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021076/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21077 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21078#define $ac_func innocuous_$ac_func
21079
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021080/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021081 which can conflict with char $ac_func (); below.
21082 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021083 <limits.h> exists even on freestanding compilers. */
21084
21085#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021086# include <limits.h>
21087#else
21088# include <assert.h>
21089#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021090
21091#undef $ac_func
21092
Martin v. Löwiseba40652007-08-30 20:10:57 +000021093/* Override any GCC internal prototype to avoid an error.
21094 Use char because int might match the return type of a GCC
21095 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021096#ifdef __cplusplus
21097extern "C"
21098#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021099char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021100/* The GNU C library defines this for functions which it implements
21101 to always fail with ENOSYS. Some functions are actually named
21102 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021103#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021104choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021105#endif
21106
Skip Montanaro6dead952003-09-25 14:50:04 +000021107int
21108main ()
21109{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021110return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021111 ;
21112 return 0;
21113}
21114_ACEOF
21115rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021116if { (ac_try="$ac_link"
21117case "(($ac_try" in
21118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21119 *) ac_try_echo=$ac_try;;
21120esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021122 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021124 grep -v '^ *+' conftest.er1 >conftest.err
21125 rm -f conftest.er1
21126 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021128 (exit $ac_status); } && {
21129 test -z "$ac_c_werror_flag" ||
21130 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021131 } && test -s conftest$ac_exeext &&
21132 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021133 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021134else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021136sed 's/^/| /' conftest.$ac_ext >&5
21137
Martin v. Löwiseba40652007-08-30 20:10:57 +000021138 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021140
21141rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021142 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021143fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021144ac_res=`eval echo '${'$as_ac_var'}'`
21145 { echo "$as_me:$LINENO: result: $ac_res" >&5
21146echo "${ECHO_T}$ac_res" >&6; }
21147if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021148 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021149#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021150_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021151
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021152fi
21153done
21154
Michael W. Hudson54241132001-12-07 15:38:26 +000021155
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021156# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021157{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
21158echo $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 +000021159if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021160 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021161else
Martin v. Löwis11437992002-04-12 09:54:03 +000021162 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021163/* confdefs.h. */
21164_ACEOF
21165cat confdefs.h >>conftest.$ac_ext
21166cat >>conftest.$ac_ext <<_ACEOF
21167/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021168#include <sys/types.h>
21169#include <sys/time.h>
21170#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021171
Martin v. Löwis11437992002-04-12 09:54:03 +000021172int
21173main ()
21174{
21175if ((struct tm *) 0)
21176return 0;
21177 ;
21178 return 0;
21179}
21180_ACEOF
21181rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021182if { (ac_try="$ac_compile"
21183case "(($ac_try" in
21184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21185 *) ac_try_echo=$ac_try;;
21186esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021188 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021189 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021190 grep -v '^ *+' conftest.er1 >conftest.err
21191 rm -f conftest.er1
21192 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021194 (exit $ac_status); } && {
21195 test -z "$ac_c_werror_flag" ||
21196 test ! -s conftest.err
21197 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021198 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021199else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021200 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021201sed 's/^/| /' conftest.$ac_ext >&5
21202
Martin v. Löwiseba40652007-08-30 20:10:57 +000021203 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021204fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021205
21206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021207fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021208{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
21209echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021210if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021211
21212cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021213#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021214_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021215
21216fi
21217
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021218{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
21219echo $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 +000021220if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021221 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021222else
Martin v. Löwis11437992002-04-12 09:54:03 +000021223 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021224/* confdefs.h. */
21225_ACEOF
21226cat confdefs.h >>conftest.$ac_ext
21227cat >>conftest.$ac_ext <<_ACEOF
21228/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021229#include <sys/types.h>
21230#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021231
Martin v. Löwis11437992002-04-12 09:54:03 +000021232int
21233main ()
21234{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021235struct tm tm;
21236 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021237 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000021238 ;
21239 return 0;
21240}
21241_ACEOF
21242rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021243if { (ac_try="$ac_compile"
21244case "(($ac_try" in
21245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21246 *) ac_try_echo=$ac_try;;
21247esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021249 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021250 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021251 grep -v '^ *+' conftest.er1 >conftest.err
21252 rm -f conftest.er1
21253 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021255 (exit $ac_status); } && {
21256 test -z "$ac_c_werror_flag" ||
21257 test ! -s conftest.err
21258 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021259 ac_cv_struct_tm=time.h
21260else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021262sed 's/^/| /' conftest.$ac_ext >&5
21263
Martin v. Löwiseba40652007-08-30 20:10:57 +000021264 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021266
21267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021268fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021269{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
21270echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021271if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021272
21273cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021274#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021275_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021276
21277fi
21278
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021279{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21280echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021281if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021282 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021283else
Martin v. Löwis11437992002-04-12 09:54:03 +000021284 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021285/* confdefs.h. */
21286_ACEOF
21287cat confdefs.h >>conftest.$ac_ext
21288cat >>conftest.$ac_ext <<_ACEOF
21289/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021290#include <sys/types.h>
21291#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000021292
21293
Martin v. Löwis11437992002-04-12 09:54:03 +000021294int
21295main ()
21296{
21297static struct tm ac_aggr;
21298if (ac_aggr.tm_zone)
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
Martin v. Löwis11437992002-04-12 09:54:03 +000021312 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021313 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
Martin v. Löwis11437992002-04-12 09:54:03 +000021321 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021322else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021323 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021324sed 's/^/| /' conftest.$ac_ext >&5
21325
Martin v. Löwiseba40652007-08-30 20:10:57 +000021326 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021327/* confdefs.h. */
21328_ACEOF
21329cat confdefs.h >>conftest.$ac_ext
21330cat >>conftest.$ac_ext <<_ACEOF
21331/* end confdefs.h. */
21332#include <sys/types.h>
21333#include <$ac_cv_struct_tm>
21334
21335
21336int
21337main ()
21338{
21339static struct tm ac_aggr;
21340if (sizeof ac_aggr.tm_zone)
21341return 0;
21342 ;
21343 return 0;
21344}
21345_ACEOF
21346rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021347if { (ac_try="$ac_compile"
21348case "(($ac_try" in
21349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21350 *) ac_try_echo=$ac_try;;
21351esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021353 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021355 grep -v '^ *+' conftest.er1 >conftest.err
21356 rm -f conftest.er1
21357 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021359 (exit $ac_status); } && {
21360 test -z "$ac_c_werror_flag" ||
21361 test ! -s conftest.err
21362 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021363 ac_cv_member_struct_tm_tm_zone=yes
21364else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021366sed 's/^/| /' conftest.$ac_ext >&5
21367
Martin v. Löwiseba40652007-08-30 20:10:57 +000021368 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021369fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021370
21371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021372fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021373
21374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021375fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021376{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21377echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21378if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021379
21380cat >>confdefs.h <<_ACEOF
21381#define HAVE_STRUCT_TM_TM_ZONE 1
21382_ACEOF
21383
21384
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021385fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021386
Martin v. Löwis11437992002-04-12 09:54:03 +000021387if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21388
21389cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021390#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021391_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021392
21393else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021394 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21395echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021396if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021397 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021398else
21399 cat >conftest.$ac_ext <<_ACEOF
21400/* confdefs.h. */
21401_ACEOF
21402cat confdefs.h >>conftest.$ac_ext
21403cat >>conftest.$ac_ext <<_ACEOF
21404/* end confdefs.h. */
21405#include <time.h>
21406
21407int
21408main ()
21409{
21410#ifndef tzname
21411 (void) tzname;
21412#endif
21413
21414 ;
21415 return 0;
21416}
21417_ACEOF
21418rm -f conftest.$ac_objext
21419if { (ac_try="$ac_compile"
21420case "(($ac_try" in
21421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21422 *) ac_try_echo=$ac_try;;
21423esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021425 (eval "$ac_compile") 2>conftest.er1
21426 ac_status=$?
21427 grep -v '^ *+' conftest.er1 >conftest.err
21428 rm -f conftest.er1
21429 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021431 (exit $ac_status); } && {
21432 test -z "$ac_c_werror_flag" ||
21433 test ! -s conftest.err
21434 } && test -s conftest.$ac_objext; then
21435 ac_cv_have_decl_tzname=yes
21436else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021437 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021438sed 's/^/| /' conftest.$ac_ext >&5
21439
21440 ac_cv_have_decl_tzname=no
21441fi
21442
21443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21444fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021445{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21446echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21447if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021448
21449cat >>confdefs.h <<_ACEOF
21450#define HAVE_DECL_TZNAME 1
21451_ACEOF
21452
21453
21454else
21455 cat >>confdefs.h <<_ACEOF
21456#define HAVE_DECL_TZNAME 0
21457_ACEOF
21458
21459
21460fi
21461
21462
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021463 { echo "$as_me:$LINENO: checking for tzname" >&5
21464echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021465if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021466 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021467else
Martin v. Löwis11437992002-04-12 09:54:03 +000021468 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021469/* confdefs.h. */
21470_ACEOF
21471cat confdefs.h >>conftest.$ac_ext
21472cat >>conftest.$ac_ext <<_ACEOF
21473/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021474#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021475#if !HAVE_DECL_TZNAME
21476extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021477#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021478
Martin v. Löwis11437992002-04-12 09:54:03 +000021479int
21480main ()
21481{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021482return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021483 ;
21484 return 0;
21485}
21486_ACEOF
21487rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021488if { (ac_try="$ac_link"
21489case "(($ac_try" in
21490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21491 *) ac_try_echo=$ac_try;;
21492esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021494 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021495 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021496 grep -v '^ *+' conftest.er1 >conftest.err
21497 rm -f conftest.er1
21498 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021500 (exit $ac_status); } && {
21501 test -z "$ac_c_werror_flag" ||
21502 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021503 } && test -s conftest$ac_exeext &&
21504 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021505 ac_cv_var_tzname=yes
21506else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021508sed 's/^/| /' conftest.$ac_ext >&5
21509
Martin v. Löwiseba40652007-08-30 20:10:57 +000021510 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021512
21513rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021514 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021515fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021516{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21517echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021518 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021519
21520cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021521#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021522_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021523
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021524 fi
21525fi
21526
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021527{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21528echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021529if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021530 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021531else
21532 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021533/* confdefs.h. */
21534_ACEOF
21535cat confdefs.h >>conftest.$ac_ext
21536cat >>conftest.$ac_ext <<_ACEOF
21537/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021538$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021539int
21540main ()
21541{
21542static struct stat ac_aggr;
21543if (ac_aggr.st_rdev)
21544return 0;
21545 ;
21546 return 0;
21547}
21548_ACEOF
21549rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021550if { (ac_try="$ac_compile"
21551case "(($ac_try" in
21552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21553 *) ac_try_echo=$ac_try;;
21554esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021556 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021557 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021558 grep -v '^ *+' conftest.er1 >conftest.err
21559 rm -f conftest.er1
21560 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021562 (exit $ac_status); } && {
21563 test -z "$ac_c_werror_flag" ||
21564 test ! -s conftest.err
21565 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021566 ac_cv_member_struct_stat_st_rdev=yes
21567else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021569sed 's/^/| /' conftest.$ac_ext >&5
21570
Martin v. Löwiseba40652007-08-30 20:10:57 +000021571 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021572/* confdefs.h. */
21573_ACEOF
21574cat confdefs.h >>conftest.$ac_ext
21575cat >>conftest.$ac_ext <<_ACEOF
21576/* end confdefs.h. */
21577$ac_includes_default
21578int
21579main ()
21580{
21581static struct stat ac_aggr;
21582if (sizeof ac_aggr.st_rdev)
21583return 0;
21584 ;
21585 return 0;
21586}
21587_ACEOF
21588rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021589if { (ac_try="$ac_compile"
21590case "(($ac_try" in
21591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21592 *) ac_try_echo=$ac_try;;
21593esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021595 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021596 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021597 grep -v '^ *+' conftest.er1 >conftest.err
21598 rm -f conftest.er1
21599 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021601 (exit $ac_status); } && {
21602 test -z "$ac_c_werror_flag" ||
21603 test ! -s conftest.err
21604 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021605 ac_cv_member_struct_stat_st_rdev=yes
21606else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021607 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021608sed 's/^/| /' conftest.$ac_ext >&5
21609
Martin v. Löwiseba40652007-08-30 20:10:57 +000021610 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021612
21613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021614fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021615
21616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021617fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021618{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21619echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21620if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021621
21622cat >>confdefs.h <<_ACEOF
21623#define HAVE_STRUCT_STAT_ST_RDEV 1
21624_ACEOF
21625
21626
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021627fi
21628
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021629{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21630echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021631if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021632 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021633else
Martin v. Löwis11437992002-04-12 09:54:03 +000021634 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021635/* confdefs.h. */
21636_ACEOF
21637cat confdefs.h >>conftest.$ac_ext
21638cat >>conftest.$ac_ext <<_ACEOF
21639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021640$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021641int
21642main ()
21643{
21644static struct stat ac_aggr;
21645if (ac_aggr.st_blksize)
21646return 0;
21647 ;
21648 return 0;
21649}
21650_ACEOF
21651rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021652if { (ac_try="$ac_compile"
21653case "(($ac_try" in
21654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21655 *) ac_try_echo=$ac_try;;
21656esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021658 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021659 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021660 grep -v '^ *+' conftest.er1 >conftest.err
21661 rm -f conftest.er1
21662 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021664 (exit $ac_status); } && {
21665 test -z "$ac_c_werror_flag" ||
21666 test ! -s conftest.err
21667 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021668 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021669else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021671sed 's/^/| /' conftest.$ac_ext >&5
21672
Martin v. Löwiseba40652007-08-30 20:10:57 +000021673 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021674/* confdefs.h. */
21675_ACEOF
21676cat confdefs.h >>conftest.$ac_ext
21677cat >>conftest.$ac_ext <<_ACEOF
21678/* end confdefs.h. */
21679$ac_includes_default
21680int
21681main ()
21682{
21683static struct stat ac_aggr;
21684if (sizeof ac_aggr.st_blksize)
21685return 0;
21686 ;
21687 return 0;
21688}
21689_ACEOF
21690rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021691if { (ac_try="$ac_compile"
21692case "(($ac_try" in
21693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21694 *) ac_try_echo=$ac_try;;
21695esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021697 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021699 grep -v '^ *+' conftest.er1 >conftest.err
21700 rm -f conftest.er1
21701 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021703 (exit $ac_status); } && {
21704 test -z "$ac_c_werror_flag" ||
21705 test ! -s conftest.err
21706 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021707 ac_cv_member_struct_stat_st_blksize=yes
21708else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021710sed 's/^/| /' conftest.$ac_ext >&5
21711
Martin v. Löwiseba40652007-08-30 20:10:57 +000021712 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021714
21715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021717
21718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021719fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021720{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21721echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21722if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021723
Martin v. Löwis11437992002-04-12 09:54:03 +000021724cat >>confdefs.h <<_ACEOF
21725#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21726_ACEOF
21727
21728
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021729fi
21730
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021731{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21732echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021733if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021734 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021735else
21736 cat >conftest.$ac_ext <<_ACEOF
21737/* confdefs.h. */
21738_ACEOF
21739cat confdefs.h >>conftest.$ac_ext
21740cat >>conftest.$ac_ext <<_ACEOF
21741/* end confdefs.h. */
21742$ac_includes_default
21743int
21744main ()
21745{
21746static struct stat ac_aggr;
21747if (ac_aggr.st_flags)
21748return 0;
21749 ;
21750 return 0;
21751}
21752_ACEOF
21753rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021754if { (ac_try="$ac_compile"
21755case "(($ac_try" in
21756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21757 *) ac_try_echo=$ac_try;;
21758esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021760 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021761 ac_status=$?
21762 grep -v '^ *+' conftest.er1 >conftest.err
21763 rm -f conftest.er1
21764 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021766 (exit $ac_status); } && {
21767 test -z "$ac_c_werror_flag" ||
21768 test ! -s conftest.err
21769 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021770 ac_cv_member_struct_stat_st_flags=yes
21771else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021772 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021773sed 's/^/| /' conftest.$ac_ext >&5
21774
Martin v. Löwiseba40652007-08-30 20:10:57 +000021775 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021776/* confdefs.h. */
21777_ACEOF
21778cat confdefs.h >>conftest.$ac_ext
21779cat >>conftest.$ac_ext <<_ACEOF
21780/* end confdefs.h. */
21781$ac_includes_default
21782int
21783main ()
21784{
21785static struct stat ac_aggr;
21786if (sizeof ac_aggr.st_flags)
21787return 0;
21788 ;
21789 return 0;
21790}
21791_ACEOF
21792rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021793if { (ac_try="$ac_compile"
21794case "(($ac_try" in
21795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21796 *) ac_try_echo=$ac_try;;
21797esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021799 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021800 ac_status=$?
21801 grep -v '^ *+' conftest.er1 >conftest.err
21802 rm -f conftest.er1
21803 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021805 (exit $ac_status); } && {
21806 test -z "$ac_c_werror_flag" ||
21807 test ! -s conftest.err
21808 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021809 ac_cv_member_struct_stat_st_flags=yes
21810else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021811 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021812sed 's/^/| /' conftest.$ac_ext >&5
21813
Martin v. Löwiseba40652007-08-30 20:10:57 +000021814 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021815fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021816
21817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021819
21820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021821fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021822{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21823echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21824if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021825
21826cat >>confdefs.h <<_ACEOF
21827#define HAVE_STRUCT_STAT_ST_FLAGS 1
21828_ACEOF
21829
21830
21831fi
21832
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021833{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21834echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021835if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021836 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021837else
21838 cat >conftest.$ac_ext <<_ACEOF
21839/* confdefs.h. */
21840_ACEOF
21841cat confdefs.h >>conftest.$ac_ext
21842cat >>conftest.$ac_ext <<_ACEOF
21843/* end confdefs.h. */
21844$ac_includes_default
21845int
21846main ()
21847{
21848static struct stat ac_aggr;
21849if (ac_aggr.st_gen)
21850return 0;
21851 ;
21852 return 0;
21853}
21854_ACEOF
21855rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021856if { (ac_try="$ac_compile"
21857case "(($ac_try" in
21858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21859 *) ac_try_echo=$ac_try;;
21860esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021862 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021863 ac_status=$?
21864 grep -v '^ *+' conftest.er1 >conftest.err
21865 rm -f conftest.er1
21866 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021868 (exit $ac_status); } && {
21869 test -z "$ac_c_werror_flag" ||
21870 test ! -s conftest.err
21871 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021872 ac_cv_member_struct_stat_st_gen=yes
21873else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021874 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021875sed 's/^/| /' conftest.$ac_ext >&5
21876
Martin v. Löwiseba40652007-08-30 20:10:57 +000021877 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021878/* confdefs.h. */
21879_ACEOF
21880cat confdefs.h >>conftest.$ac_ext
21881cat >>conftest.$ac_ext <<_ACEOF
21882/* end confdefs.h. */
21883$ac_includes_default
21884int
21885main ()
21886{
21887static struct stat ac_aggr;
21888if (sizeof ac_aggr.st_gen)
21889return 0;
21890 ;
21891 return 0;
21892}
21893_ACEOF
21894rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021895if { (ac_try="$ac_compile"
21896case "(($ac_try" in
21897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21898 *) ac_try_echo=$ac_try;;
21899esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021901 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021902 ac_status=$?
21903 grep -v '^ *+' conftest.er1 >conftest.err
21904 rm -f conftest.er1
21905 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021907 (exit $ac_status); } && {
21908 test -z "$ac_c_werror_flag" ||
21909 test ! -s conftest.err
21910 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021911 ac_cv_member_struct_stat_st_gen=yes
21912else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021913 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021914sed 's/^/| /' conftest.$ac_ext >&5
21915
Martin v. Löwiseba40652007-08-30 20:10:57 +000021916 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021918
21919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021921
21922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021923fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021924{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21925echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21926if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021927
21928cat >>confdefs.h <<_ACEOF
21929#define HAVE_STRUCT_STAT_ST_GEN 1
21930_ACEOF
21931
21932
21933fi
21934
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021935{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21936echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021937if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021938 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021939else
21940 cat >conftest.$ac_ext <<_ACEOF
21941/* confdefs.h. */
21942_ACEOF
21943cat confdefs.h >>conftest.$ac_ext
21944cat >>conftest.$ac_ext <<_ACEOF
21945/* end confdefs.h. */
21946$ac_includes_default
21947int
21948main ()
21949{
21950static struct stat ac_aggr;
21951if (ac_aggr.st_birthtime)
21952return 0;
21953 ;
21954 return 0;
21955}
21956_ACEOF
21957rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021958if { (ac_try="$ac_compile"
21959case "(($ac_try" in
21960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21961 *) ac_try_echo=$ac_try;;
21962esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021964 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021965 ac_status=$?
21966 grep -v '^ *+' conftest.er1 >conftest.err
21967 rm -f conftest.er1
21968 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021970 (exit $ac_status); } && {
21971 test -z "$ac_c_werror_flag" ||
21972 test ! -s conftest.err
21973 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021974 ac_cv_member_struct_stat_st_birthtime=yes
21975else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021976 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021977sed 's/^/| /' conftest.$ac_ext >&5
21978
Martin v. Löwiseba40652007-08-30 20:10:57 +000021979 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021980/* confdefs.h. */
21981_ACEOF
21982cat confdefs.h >>conftest.$ac_ext
21983cat >>conftest.$ac_ext <<_ACEOF
21984/* end confdefs.h. */
21985$ac_includes_default
21986int
21987main ()
21988{
21989static struct stat ac_aggr;
21990if (sizeof ac_aggr.st_birthtime)
21991return 0;
21992 ;
21993 return 0;
21994}
21995_ACEOF
21996rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021997if { (ac_try="$ac_compile"
21998case "(($ac_try" in
21999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22000 *) ac_try_echo=$ac_try;;
22001esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022003 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022004 ac_status=$?
22005 grep -v '^ *+' conftest.er1 >conftest.err
22006 rm -f conftest.er1
22007 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022009 (exit $ac_status); } && {
22010 test -z "$ac_c_werror_flag" ||
22011 test ! -s conftest.err
22012 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022013 ac_cv_member_struct_stat_st_birthtime=yes
22014else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022015 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022016sed 's/^/| /' conftest.$ac_ext >&5
22017
Martin v. Löwiseba40652007-08-30 20:10:57 +000022018 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022019fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022020
22021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022022fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022023
22024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022025fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022026{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
22027echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
22028if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022029
22030cat >>confdefs.h <<_ACEOF
22031#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
22032_ACEOF
22033
22034
22035fi
22036
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022037{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
22038echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022039if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022040 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022041else
Martin v. Löwis11437992002-04-12 09:54:03 +000022042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022043/* confdefs.h. */
22044_ACEOF
22045cat confdefs.h >>conftest.$ac_ext
22046cat >>conftest.$ac_ext <<_ACEOF
22047/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022048$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022049int
22050main ()
22051{
22052static struct stat ac_aggr;
22053if (ac_aggr.st_blocks)
22054return 0;
22055 ;
22056 return 0;
22057}
22058_ACEOF
22059rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022060if { (ac_try="$ac_compile"
22061case "(($ac_try" in
22062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22063 *) ac_try_echo=$ac_try;;
22064esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022066 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022068 grep -v '^ *+' conftest.er1 >conftest.err
22069 rm -f conftest.er1
22070 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022072 (exit $ac_status); } && {
22073 test -z "$ac_c_werror_flag" ||
22074 test ! -s conftest.err
22075 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022076 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000022077else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022079sed 's/^/| /' conftest.$ac_ext >&5
22080
Martin v. Löwiseba40652007-08-30 20:10:57 +000022081 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022082/* confdefs.h. */
22083_ACEOF
22084cat confdefs.h >>conftest.$ac_ext
22085cat >>conftest.$ac_ext <<_ACEOF
22086/* end confdefs.h. */
22087$ac_includes_default
22088int
22089main ()
22090{
22091static struct stat ac_aggr;
22092if (sizeof ac_aggr.st_blocks)
22093return 0;
22094 ;
22095 return 0;
22096}
22097_ACEOF
22098rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022099if { (ac_try="$ac_compile"
22100case "(($ac_try" in
22101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22102 *) ac_try_echo=$ac_try;;
22103esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022105 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000022106 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022107 grep -v '^ *+' conftest.er1 >conftest.err
22108 rm -f conftest.er1
22109 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022111 (exit $ac_status); } && {
22112 test -z "$ac_c_werror_flag" ||
22113 test ! -s conftest.err
22114 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022115 ac_cv_member_struct_stat_st_blocks=yes
22116else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022117 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022118sed 's/^/| /' conftest.$ac_ext >&5
22119
Martin v. Löwiseba40652007-08-30 20:10:57 +000022120 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000022121fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022122
22123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022125
22126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000022127fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022128{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
22129echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
22130if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000022131
Martin v. Löwis11437992002-04-12 09:54:03 +000022132cat >>confdefs.h <<_ACEOF
22133#define HAVE_STRUCT_STAT_ST_BLOCKS 1
22134_ACEOF
22135
22136
22137cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022138#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022139_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022140
22141else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022142 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000022143 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022144 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
22145 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022146esac
22147
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022148fi
22149
Michael W. Hudson54241132001-12-07 15:38:26 +000022150
Martin v. Löwis11437992002-04-12 09:54:03 +000022151
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022152{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
22153echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022154if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022155 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022156else
Martin v. Löwis11437992002-04-12 09:54:03 +000022157 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022158/* confdefs.h. */
22159_ACEOF
22160cat confdefs.h >>conftest.$ac_ext
22161cat >>conftest.$ac_ext <<_ACEOF
22162/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022163#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022164int
22165main ()
22166{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022167return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000022168 ;
22169 return 0;
22170}
22171_ACEOF
22172rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022173if { (ac_try="$ac_compile"
22174case "(($ac_try" in
22175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22176 *) ac_try_echo=$ac_try;;
22177esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022181 grep -v '^ *+' conftest.er1 >conftest.err
22182 rm -f conftest.er1
22183 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022185 (exit $ac_status); } && {
22186 test -z "$ac_c_werror_flag" ||
22187 test ! -s conftest.err
22188 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022189 ac_cv_header_time_altzone=yes
22190else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022192sed 's/^/| /' conftest.$ac_ext >&5
22193
Martin v. Löwiseba40652007-08-30 20:10:57 +000022194 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022195fi
22196
Martin v. Löwiseba40652007-08-30 20:10:57 +000022197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22198fi
22199
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022200{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
22201echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022202if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022203
22204cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022205#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022206_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022207
22208fi
22209
Guido van Rossumda88dad1995-01-26 00:46:29 +000022210was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022211{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
22212echo $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 +000022213cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022214/* confdefs.h. */
22215_ACEOF
22216cat confdefs.h >>conftest.$ac_ext
22217cat >>conftest.$ac_ext <<_ACEOF
22218/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022219
22220#include <sys/types.h>
22221#include <sys/select.h>
22222#include <sys/time.h>
22223
Martin v. Löwis11437992002-04-12 09:54:03 +000022224int
22225main ()
22226{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022227;
Martin v. Löwis11437992002-04-12 09:54:03 +000022228 ;
22229 return 0;
22230}
22231_ACEOF
22232rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022233if { (ac_try="$ac_compile"
22234case "(($ac_try" in
22235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22236 *) ac_try_echo=$ac_try;;
22237esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022239 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022240 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022241 grep -v '^ *+' conftest.er1 >conftest.err
22242 rm -f conftest.er1
22243 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022245 (exit $ac_status); } && {
22246 test -z "$ac_c_werror_flag" ||
22247 test ! -s conftest.err
22248 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022249
22250
22251cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022252#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022253_ACEOF
22254
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022255 was_it_defined=yes
22256
Guido van Rossumf78abae1997-01-21 22:02:36 +000022257else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022258 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022259sed 's/^/| /' conftest.$ac_ext >&5
22260
Brett Cannon19fab762007-06-02 03:02:29 +000022261
Martin v. Löwiseba40652007-08-30 20:10:57 +000022262fi
22263
22264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022265{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
22266echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022267
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022268{ echo "$as_me:$LINENO: checking for addrinfo" >&5
22269echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022270if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022271 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022272else
Martin v. Löwis11437992002-04-12 09:54:03 +000022273 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022274/* confdefs.h. */
22275_ACEOF
22276cat confdefs.h >>conftest.$ac_ext
22277cat >>conftest.$ac_ext <<_ACEOF
22278/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022279
22280# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022281int
22282main ()
22283{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022284struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000022285 ;
22286 return 0;
22287}
22288_ACEOF
22289rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022290if { (ac_try="$ac_compile"
22291case "(($ac_try" in
22292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22293 *) ac_try_echo=$ac_try;;
22294esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022296 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022297 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022298 grep -v '^ *+' conftest.er1 >conftest.err
22299 rm -f conftest.er1
22300 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022302 (exit $ac_status); } && {
22303 test -z "$ac_c_werror_flag" ||
22304 test ! -s conftest.err
22305 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022306 ac_cv_struct_addrinfo=yes
22307else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022309sed 's/^/| /' conftest.$ac_ext >&5
22310
Martin v. Löwiseba40652007-08-30 20:10:57 +000022311 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022312fi
22313
Martin v. Löwiseba40652007-08-30 20:10:57 +000022314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22315fi
22316
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022317{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
22318echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022319if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022320
22321cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022322#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022323_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022324
22325fi
22326
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022327{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
22328echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022329if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022330 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022331else
Martin v. Löwis11437992002-04-12 09:54:03 +000022332 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022333/* confdefs.h. */
22334_ACEOF
22335cat confdefs.h >>conftest.$ac_ext
22336cat >>conftest.$ac_ext <<_ACEOF
22337/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022338
22339# include <sys/types.h>
22340# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022341int
22342main ()
22343{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022344struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022345 ;
22346 return 0;
22347}
22348_ACEOF
22349rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022350if { (ac_try="$ac_compile"
22351case "(($ac_try" in
22352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22353 *) ac_try_echo=$ac_try;;
22354esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022356 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022358 grep -v '^ *+' conftest.er1 >conftest.err
22359 rm -f conftest.er1
22360 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022362 (exit $ac_status); } && {
22363 test -z "$ac_c_werror_flag" ||
22364 test ! -s conftest.err
22365 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022366 ac_cv_struct_sockaddr_storage=yes
22367else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022369sed 's/^/| /' conftest.$ac_ext >&5
22370
Martin v. Löwiseba40652007-08-30 20:10:57 +000022371 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022372fi
22373
Martin v. Löwiseba40652007-08-30 20:10:57 +000022374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22375fi
22376
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022377{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22378echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022379if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022380
22381cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022382#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022383_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022384
22385fi
22386
Guido van Rossum627b2d71993-12-24 10:39:16 +000022387# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022388
Michael W. Hudson54241132001-12-07 15:38:26 +000022389
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022390{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22391echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022392if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022393 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022394else
Martin v. Löwis11437992002-04-12 09:54:03 +000022395 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022396/* confdefs.h. */
22397_ACEOF
22398cat confdefs.h >>conftest.$ac_ext
22399cat >>conftest.$ac_ext <<_ACEOF
22400/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022401$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022402int
22403main ()
22404{
22405static int test_array [1 - 2 * !(((char) -1) < 0)];
22406test_array [0] = 0
22407
22408 ;
22409 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022410}
Martin v. Löwis11437992002-04-12 09:54:03 +000022411_ACEOF
22412rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022413if { (ac_try="$ac_compile"
22414case "(($ac_try" in
22415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22416 *) ac_try_echo=$ac_try;;
22417esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022419 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022420 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022421 grep -v '^ *+' conftest.er1 >conftest.err
22422 rm -f conftest.er1
22423 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022425 (exit $ac_status); } && {
22426 test -z "$ac_c_werror_flag" ||
22427 test ! -s conftest.err
22428 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022429 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022430else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022432sed 's/^/| /' conftest.$ac_ext >&5
22433
Martin v. Löwiseba40652007-08-30 20:10:57 +000022434 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022436
22437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022438fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022439{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22440echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022441if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022442 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022443#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022444_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022445
22446fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022447
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022448{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22449echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022450if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022451 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022452else
22453 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022454/* confdefs.h. */
22455_ACEOF
22456cat confdefs.h >>conftest.$ac_ext
22457cat >>conftest.$ac_ext <<_ACEOF
22458/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022459
Martin v. Löwis11437992002-04-12 09:54:03 +000022460int
22461main ()
22462{
22463/* FIXME: Include the comments suggested by Paul. */
22464#ifndef __cplusplus
22465 /* Ultrix mips cc rejects this. */
22466 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022467 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022468 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022469 char const *const *pcpcc;
22470 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022471 /* NEC SVR4.0.2 mips cc rejects this. */
22472 struct point {int x, y;};
22473 static struct point const zero = {0,0};
22474 /* AIX XL C 1.02.0.0 rejects this.
22475 It does not let you subtract one const X* pointer from another in
22476 an arm of an if-expression whose if-part is not a constant
22477 expression */
22478 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022479 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022480 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022481 ++pcpcc;
22482 ppc = (char**) pcpcc;
22483 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022484 { /* SCO 3.2v4 cc rejects this. */
22485 char *t;
22486 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022487
Martin v. Löwis11437992002-04-12 09:54:03 +000022488 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022489 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022490 }
22491 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22492 int x[] = {25, 17};
22493 const int *foo = &x[0];
22494 ++foo;
22495 }
22496 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22497 typedef const int *iptr;
22498 iptr p = 0;
22499 ++p;
22500 }
22501 { /* AIX XL C 1.02.0.0 rejects this saying
22502 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22503 struct s { int j; const int *ap[3]; };
22504 struct s *b; b->j = 5;
22505 }
22506 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22507 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022508 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022509 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022510 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022511#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022512
Martin v. Löwis11437992002-04-12 09:54:03 +000022513 ;
22514 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022515}
Martin v. Löwis11437992002-04-12 09:54:03 +000022516_ACEOF
22517rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022518if { (ac_try="$ac_compile"
22519case "(($ac_try" in
22520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22521 *) ac_try_echo=$ac_try;;
22522esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022524 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022526 grep -v '^ *+' conftest.er1 >conftest.err
22527 rm -f conftest.er1
22528 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022530 (exit $ac_status); } && {
22531 test -z "$ac_c_werror_flag" ||
22532 test ! -s conftest.err
22533 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022534 ac_cv_c_const=yes
22535else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022537sed 's/^/| /' conftest.$ac_ext >&5
22538
Martin v. Löwiseba40652007-08-30 20:10:57 +000022539 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022541
22542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022543fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022544{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22545echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022546if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022547
22548cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022549#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022550_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022551
22552fi
22553
Michael W. Hudson54241132001-12-07 15:38:26 +000022554
Guido van Rossumda88dad1995-01-26 00:46:29 +000022555works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022556{ echo "$as_me:$LINENO: checking for working volatile" >&5
22557echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022558cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022559/* confdefs.h. */
22560_ACEOF
22561cat confdefs.h >>conftest.$ac_ext
22562cat >>conftest.$ac_ext <<_ACEOF
22563/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022564
Martin v. Löwis11437992002-04-12 09:54:03 +000022565int
22566main ()
22567{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022568volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022569 ;
22570 return 0;
22571}
22572_ACEOF
22573rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022574if { (ac_try="$ac_compile"
22575case "(($ac_try" in
22576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22577 *) ac_try_echo=$ac_try;;
22578esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022580 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022581 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022582 grep -v '^ *+' conftest.er1 >conftest.err
22583 rm -f conftest.er1
22584 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022586 (exit $ac_status); } && {
22587 test -z "$ac_c_werror_flag" ||
22588 test ! -s conftest.err
22589 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022590 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022591else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022592 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022593sed 's/^/| /' conftest.$ac_ext >&5
22594
Martin v. Löwis11437992002-04-12 09:54:03 +000022595
22596cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022597#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022598_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022599
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022600
Guido van Rossum627b2d71993-12-24 10:39:16 +000022601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022602
22603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022604{ echo "$as_me:$LINENO: result: $works" >&5
22605echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022606
Guido van Rossumda88dad1995-01-26 00:46:29 +000022607works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022608{ echo "$as_me:$LINENO: checking for working signed char" >&5
22609echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022610cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022611/* confdefs.h. */
22612_ACEOF
22613cat confdefs.h >>conftest.$ac_ext
22614cat >>conftest.$ac_ext <<_ACEOF
22615/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022616
Martin v. Löwis11437992002-04-12 09:54:03 +000022617int
22618main ()
22619{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022620signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022621 ;
22622 return 0;
22623}
22624_ACEOF
22625rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022626if { (ac_try="$ac_compile"
22627case "(($ac_try" in
22628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22629 *) ac_try_echo=$ac_try;;
22630esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022632 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022634 grep -v '^ *+' conftest.er1 >conftest.err
22635 rm -f conftest.er1
22636 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022638 (exit $ac_status); } && {
22639 test -z "$ac_c_werror_flag" ||
22640 test ! -s conftest.err
22641 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022642 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022643else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022645sed 's/^/| /' conftest.$ac_ext >&5
22646
Martin v. Löwis11437992002-04-12 09:54:03 +000022647
22648cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022649#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022650_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022651
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022652
Guido van Rossum7f43da71994-08-01 12:15:30 +000022653fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022654
22655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022656{ echo "$as_me:$LINENO: result: $works" >&5
22657echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022658
Guido van Rossumda88dad1995-01-26 00:46:29 +000022659have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022660{ echo "$as_me:$LINENO: checking for prototypes" >&5
22661echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022662cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022663/* confdefs.h. */
22664_ACEOF
22665cat confdefs.h >>conftest.$ac_ext
22666cat >>conftest.$ac_ext <<_ACEOF
22667/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022668int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022669int
22670main ()
22671{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022672return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022673 ;
22674 return 0;
22675}
22676_ACEOF
22677rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022678if { (ac_try="$ac_compile"
22679case "(($ac_try" in
22680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22681 *) ac_try_echo=$ac_try;;
22682esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022684 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022685 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022686 grep -v '^ *+' conftest.er1 >conftest.err
22687 rm -f conftest.er1
22688 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022690 (exit $ac_status); } && {
22691 test -z "$ac_c_werror_flag" ||
22692 test ! -s conftest.err
22693 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022694
22695
22696cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022697#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022698_ACEOF
22699
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022700 have_prototypes=yes
22701
Guido van Rossumf78abae1997-01-21 22:02:36 +000022702else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022703 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022704sed 's/^/| /' conftest.$ac_ext >&5
22705
Martin v. Löwiseba40652007-08-30 20:10:57 +000022706
Guido van Rossum7f43da71994-08-01 12:15:30 +000022707fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022708
22709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022710{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22711echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022712
Guido van Rossumda88dad1995-01-26 00:46:29 +000022713works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022714{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22715echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022716cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022717/* confdefs.h. */
22718_ACEOF
22719cat confdefs.h >>conftest.$ac_ext
22720cat >>conftest.$ac_ext <<_ACEOF
22721/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022722
22723#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022724int foo(int x, ...) {
22725 va_list va;
22726 va_start(va, x);
22727 va_arg(va, int);
22728 va_arg(va, char *);
22729 va_arg(va, double);
22730 return 0;
22731}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022732
Martin v. Löwis11437992002-04-12 09:54:03 +000022733int
22734main ()
22735{
Guido van Rossum90eea071996-08-30 20:58:57 +000022736return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022737 ;
22738 return 0;
22739}
22740_ACEOF
22741rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022742if { (ac_try="$ac_compile"
22743case "(($ac_try" in
22744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22745 *) ac_try_echo=$ac_try;;
22746esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022748 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022749 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022750 grep -v '^ *+' conftest.er1 >conftest.err
22751 rm -f conftest.er1
22752 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022754 (exit $ac_status); } && {
22755 test -z "$ac_c_werror_flag" ||
22756 test ! -s conftest.err
22757 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022758
22759
22760cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022761#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022762_ACEOF
22763
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022764 works=yes
22765
Guido van Rossumf78abae1997-01-21 22:02:36 +000022766else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022768sed 's/^/| /' conftest.$ac_ext >&5
22769
Martin v. Löwiseba40652007-08-30 20:10:57 +000022770
Guido van Rossum627b2d71993-12-24 10:39:16 +000022771fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022772
22773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022774{ echo "$as_me:$LINENO: result: $works" >&5
22775echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022776
Martin v. Löwisd6320502004-08-12 13:45:08 +000022777# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022778{ echo "$as_me:$LINENO: checking for socketpair" >&5
22779echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022780cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022781/* confdefs.h. */
22782_ACEOF
22783cat confdefs.h >>conftest.$ac_ext
22784cat >>conftest.$ac_ext <<_ACEOF
22785/* end confdefs.h. */
22786
22787#include <sys/types.h>
22788#include <sys/socket.h>
22789
22790int
22791main ()
22792{
22793void *x=socketpair
22794 ;
22795 return 0;
22796}
22797_ACEOF
22798rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022799if { (ac_try="$ac_compile"
22800case "(($ac_try" in
22801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22802 *) ac_try_echo=$ac_try;;
22803esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022805 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022807 grep -v '^ *+' conftest.er1 >conftest.err
22808 rm -f conftest.er1
22809 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022811 (exit $ac_status); } && {
22812 test -z "$ac_c_werror_flag" ||
22813 test ! -s conftest.err
22814 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022815
22816cat >>confdefs.h <<\_ACEOF
22817#define HAVE_SOCKETPAIR 1
22818_ACEOF
22819
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022820 { echo "$as_me:$LINENO: result: yes" >&5
22821echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022822else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022823 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022824sed 's/^/| /' conftest.$ac_ext >&5
22825
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022826 { echo "$as_me:$LINENO: result: no" >&5
22827echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022828
22829fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022830
22831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022832
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022833# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022834{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22835echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022836cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022837/* confdefs.h. */
22838_ACEOF
22839cat confdefs.h >>conftest.$ac_ext
22840cat >>conftest.$ac_ext <<_ACEOF
22841/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022842#include <sys/types.h>
22843#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022844int
22845main ()
22846{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022847struct sockaddr x;
22848x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022849 ;
22850 return 0;
22851}
22852_ACEOF
22853rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022854if { (ac_try="$ac_compile"
22855case "(($ac_try" in
22856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22857 *) ac_try_echo=$ac_try;;
22858esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022860 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022861 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022862 grep -v '^ *+' conftest.er1 >conftest.err
22863 rm -f conftest.er1
22864 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022866 (exit $ac_status); } && {
22867 test -z "$ac_c_werror_flag" ||
22868 test ! -s conftest.err
22869 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022870 { echo "$as_me:$LINENO: result: yes" >&5
22871echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022872
22873cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022874#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022875_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022876
22877else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022878 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022879sed 's/^/| /' conftest.$ac_ext >&5
22880
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022881 { echo "$as_me:$LINENO: result: no" >&5
22882echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022883fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022884
22885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022886
Guido van Rossumda88dad1995-01-26 00:46:29 +000022887va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022888{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22889echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022890cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022891/* confdefs.h. */
22892_ACEOF
22893cat confdefs.h >>conftest.$ac_ext
22894cat >>conftest.$ac_ext <<_ACEOF
22895/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022896
22897#ifdef HAVE_STDARG_PROTOTYPES
22898#include <stdarg.h>
22899#else
22900#include <varargs.h>
22901#endif
22902
Martin v. Löwis11437992002-04-12 09:54:03 +000022903int
22904main ()
22905{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022906va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022907 ;
22908 return 0;
22909}
22910_ACEOF
22911rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022912if { (ac_try="$ac_compile"
22913case "(($ac_try" in
22914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22915 *) ac_try_echo=$ac_try;;
22916esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022918 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022920 grep -v '^ *+' conftest.er1 >conftest.err
22921 rm -f conftest.er1
22922 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022924 (exit $ac_status); } && {
22925 test -z "$ac_c_werror_flag" ||
22926 test ! -s conftest.err
22927 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022928 :
22929else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022930 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022931sed 's/^/| /' conftest.$ac_ext >&5
22932
Martin v. Löwis11437992002-04-12 09:54:03 +000022933
22934
22935cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022936#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022937_ACEOF
22938
Guido van Rossumda88dad1995-01-26 00:46:29 +000022939 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022940
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022942
22943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022944{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22945echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022946
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022947# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022948
22949
22950
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022951{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22952echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022953if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022954 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022955else
Martin v. Löwis11437992002-04-12 09:54:03 +000022956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022957/* confdefs.h. */
22958_ACEOF
22959cat confdefs.h >>conftest.$ac_ext
22960cat >>conftest.$ac_ext <<_ACEOF
22961/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022962/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22963 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22964#define gethostbyname_r innocuous_gethostbyname_r
22965
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022966/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022967 which can conflict with char gethostbyname_r (); below.
22968 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022969 <limits.h> exists even on freestanding compilers. */
22970
22971#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022972# include <limits.h>
22973#else
22974# include <assert.h>
22975#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022976
22977#undef gethostbyname_r
22978
Martin v. Löwiseba40652007-08-30 20:10:57 +000022979/* Override any GCC internal prototype to avoid an error.
22980 Use char because int might match the return type of a GCC
22981 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022982#ifdef __cplusplus
22983extern "C"
22984#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022985char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022986/* The GNU C library defines this for functions which it implements
22987 to always fail with ENOSYS. Some functions are actually named
22988 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022989#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022990choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022991#endif
22992
Skip Montanaro6dead952003-09-25 14:50:04 +000022993int
22994main ()
22995{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022996return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022997 ;
22998 return 0;
22999}
23000_ACEOF
23001rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023002if { (ac_try="$ac_link"
23003case "(($ac_try" in
23004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23005 *) ac_try_echo=$ac_try;;
23006esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023008 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023010 grep -v '^ *+' conftest.er1 >conftest.err
23011 rm -f conftest.er1
23012 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023014 (exit $ac_status); } && {
23015 test -z "$ac_c_werror_flag" ||
23016 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023017 } && test -s conftest$ac_exeext &&
23018 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023019 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023020else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023022sed 's/^/| /' conftest.$ac_ext >&5
23023
Martin v. Löwiseba40652007-08-30 20:10:57 +000023024 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023025fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023026
23027rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023028 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023029fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023030{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
23031echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
23032if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023033
Martin v. Löwis11437992002-04-12 09:54:03 +000023034 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023035#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023036_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023037
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023038 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
23039echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023040 OLD_CFLAGS=$CFLAGS
23041 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023043/* confdefs.h. */
23044_ACEOF
23045cat confdefs.h >>conftest.$ac_ext
23046cat >>conftest.$ac_ext <<_ACEOF
23047/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023048
23049# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023050
Martin v. Löwis11437992002-04-12 09:54:03 +000023051int
23052main ()
23053{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023054
23055 char *name;
23056 struct hostent *he, *res;
23057 char buffer[2048];
23058 int buflen = 2048;
23059 int h_errnop;
23060
23061 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023062
23063 ;
23064 return 0;
23065}
23066_ACEOF
23067rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023068if { (ac_try="$ac_compile"
23069case "(($ac_try" in
23070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23071 *) ac_try_echo=$ac_try;;
23072esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023074 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023075 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023076 grep -v '^ *+' conftest.er1 >conftest.err
23077 rm -f conftest.er1
23078 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023080 (exit $ac_status); } && {
23081 test -z "$ac_c_werror_flag" ||
23082 test ! -s conftest.err
23083 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023084
23085 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023086#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023087_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023088
Martin v. Löwis11437992002-04-12 09:54:03 +000023089
23090cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023091#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023092_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023093
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023094 { echo "$as_me:$LINENO: result: yes" >&5
23095echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023096
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023097else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023099sed 's/^/| /' conftest.$ac_ext >&5
23100
Martin v. Löwis11437992002-04-12 09:54:03 +000023101
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023102 { echo "$as_me:$LINENO: result: no" >&5
23103echo "${ECHO_T}no" >&6; }
23104 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
23105echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023106 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023107/* confdefs.h. */
23108_ACEOF
23109cat confdefs.h >>conftest.$ac_ext
23110cat >>conftest.$ac_ext <<_ACEOF
23111/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023112
23113# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023114
Martin v. Löwis11437992002-04-12 09:54:03 +000023115int
23116main ()
23117{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023118
23119 char *name;
23120 struct hostent *he;
23121 char buffer[2048];
23122 int buflen = 2048;
23123 int h_errnop;
23124
23125 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023126
23127 ;
23128 return 0;
23129}
23130_ACEOF
23131rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023132if { (ac_try="$ac_compile"
23133case "(($ac_try" in
23134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23135 *) ac_try_echo=$ac_try;;
23136esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023138 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023140 grep -v '^ *+' conftest.er1 >conftest.err
23141 rm -f conftest.er1
23142 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023144 (exit $ac_status); } && {
23145 test -z "$ac_c_werror_flag" ||
23146 test ! -s conftest.err
23147 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023148
23149 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023150#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023151_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023152
Martin v. Löwis11437992002-04-12 09:54:03 +000023153
23154cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023155#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023156_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023157
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023158 { echo "$as_me:$LINENO: result: yes" >&5
23159echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023160
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023161else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023163sed 's/^/| /' conftest.$ac_ext >&5
23164
Martin v. Löwis11437992002-04-12 09:54:03 +000023165
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023166 { echo "$as_me:$LINENO: result: no" >&5
23167echo "${ECHO_T}no" >&6; }
23168 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
23169echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023170 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023171/* confdefs.h. */
23172_ACEOF
23173cat confdefs.h >>conftest.$ac_ext
23174cat >>conftest.$ac_ext <<_ACEOF
23175/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023176
23177# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023178
Martin v. Löwis11437992002-04-12 09:54:03 +000023179int
23180main ()
23181{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023182
23183 char *name;
23184 struct hostent *he;
23185 struct hostent_data data;
23186
23187 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000023188
23189 ;
23190 return 0;
23191}
23192_ACEOF
23193rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023194if { (ac_try="$ac_compile"
23195case "(($ac_try" in
23196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23197 *) ac_try_echo=$ac_try;;
23198esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023200 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023201 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023202 grep -v '^ *+' conftest.er1 >conftest.err
23203 rm -f conftest.er1
23204 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023206 (exit $ac_status); } && {
23207 test -z "$ac_c_werror_flag" ||
23208 test ! -s conftest.err
23209 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023210
23211 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023212#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023213_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023214
Martin v. Löwis11437992002-04-12 09:54:03 +000023215
23216cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023217#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023218_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023219
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023220 { echo "$as_me:$LINENO: result: yes" >&5
23221echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023222
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023223else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023225sed 's/^/| /' conftest.$ac_ext >&5
23226
Martin v. Löwis11437992002-04-12 09:54:03 +000023227
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023228 { echo "$as_me:$LINENO: result: no" >&5
23229echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023230
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023231fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023232
23233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023234
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023235fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023236
23237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023238
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023240
23241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023242 CFLAGS=$OLD_CFLAGS
23243
23244else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023245
Martin v. Löwis11437992002-04-12 09:54:03 +000023246
23247for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000023248do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023249as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23250{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23251echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023252if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023253 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023254else
Martin v. Löwis11437992002-04-12 09:54:03 +000023255 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023256/* confdefs.h. */
23257_ACEOF
23258cat confdefs.h >>conftest.$ac_ext
23259cat >>conftest.$ac_ext <<_ACEOF
23260/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023261/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23262 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23263#define $ac_func innocuous_$ac_func
23264
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023265/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023266 which can conflict with char $ac_func (); below.
23267 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023268 <limits.h> exists even on freestanding compilers. */
23269
23270#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023271# include <limits.h>
23272#else
23273# include <assert.h>
23274#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023275
23276#undef $ac_func
23277
Martin v. Löwiseba40652007-08-30 20:10:57 +000023278/* Override any GCC internal prototype to avoid an error.
23279 Use char because int might match the return type of a GCC
23280 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023281#ifdef __cplusplus
23282extern "C"
23283#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023284char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023285/* The GNU C library defines this for functions which it implements
23286 to always fail with ENOSYS. Some functions are actually named
23287 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023288#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023289choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023290#endif
23291
Skip Montanaro6dead952003-09-25 14:50:04 +000023292int
23293main ()
23294{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023295return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023296 ;
23297 return 0;
23298}
23299_ACEOF
23300rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023301if { (ac_try="$ac_link"
23302case "(($ac_try" in
23303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23304 *) ac_try_echo=$ac_try;;
23305esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023307 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023308 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023309 grep -v '^ *+' conftest.er1 >conftest.err
23310 rm -f conftest.er1
23311 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023313 (exit $ac_status); } && {
23314 test -z "$ac_c_werror_flag" ||
23315 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023316 } && test -s conftest$ac_exeext &&
23317 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023318 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000023319else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023320 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023321sed 's/^/| /' conftest.$ac_ext >&5
23322
Martin v. Löwiseba40652007-08-30 20:10:57 +000023323 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023324fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023325
23326rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023327 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023328fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023329ac_res=`eval echo '${'$as_ac_var'}'`
23330 { echo "$as_me:$LINENO: result: $ac_res" >&5
23331echo "${ECHO_T}$ac_res" >&6; }
23332if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023333 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023334#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023335_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023336
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023337fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023338done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023339
Michael W. Hudson54241132001-12-07 15:38:26 +000023340
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023341fi
23342
Michael W. Hudson54241132001-12-07 15:38:26 +000023343
23344
23345
23346
23347
23348
Guido van Rossum627b2d71993-12-24 10:39:16 +000023349# checks for system services
23350# (none yet)
23351
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023352# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023353{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23354echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023355if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023356 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023357else
Martin v. Löwis11437992002-04-12 09:54:03 +000023358 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023359/* confdefs.h. */
23360_ACEOF
23361cat confdefs.h >>conftest.$ac_ext
23362cat >>conftest.$ac_ext <<_ACEOF
23363/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023364/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23365 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23366#define __fpu_control innocuous___fpu_control
23367
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023368/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023369 which can conflict with char __fpu_control (); below.
23370 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023371 <limits.h> exists even on freestanding compilers. */
23372
23373#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023374# include <limits.h>
23375#else
23376# include <assert.h>
23377#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023378
23379#undef __fpu_control
23380
Martin v. Löwiseba40652007-08-30 20:10:57 +000023381/* Override any GCC internal prototype to avoid an error.
23382 Use char because int might match the return type of a GCC
23383 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023384#ifdef __cplusplus
23385extern "C"
23386#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023387char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023388/* The GNU C library defines this for functions which it implements
23389 to always fail with ENOSYS. Some functions are actually named
23390 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023391#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023392choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023393#endif
23394
Skip Montanaro6dead952003-09-25 14:50:04 +000023395int
23396main ()
23397{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023398return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023399 ;
23400 return 0;
23401}
23402_ACEOF
23403rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023404if { (ac_try="$ac_link"
23405case "(($ac_try" in
23406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23407 *) ac_try_echo=$ac_try;;
23408esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023410 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023411 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023412 grep -v '^ *+' conftest.er1 >conftest.err
23413 rm -f conftest.er1
23414 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023416 (exit $ac_status); } && {
23417 test -z "$ac_c_werror_flag" ||
23418 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023419 } && test -s conftest$ac_exeext &&
23420 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023421 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023422else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023423 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023424sed 's/^/| /' conftest.$ac_ext >&5
23425
Martin v. Löwiseba40652007-08-30 20:10:57 +000023426 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023427fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023428
23429rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023430 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023431fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023432{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23433echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23434if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023435 :
23436else
Martin v. Löwis11437992002-04-12 09:54:03 +000023437
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023438{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23439echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023440if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023441 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023442else
Martin v. Löwis11437992002-04-12 09:54:03 +000023443 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023444LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023445cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023446/* confdefs.h. */
23447_ACEOF
23448cat confdefs.h >>conftest.$ac_ext
23449cat >>conftest.$ac_ext <<_ACEOF
23450/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023451
Martin v. Löwiseba40652007-08-30 20:10:57 +000023452/* Override any GCC internal prototype to avoid an error.
23453 Use char because int might match the return type of a GCC
23454 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023455#ifdef __cplusplus
23456extern "C"
23457#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023458char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023459int
23460main ()
23461{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023462return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023463 ;
23464 return 0;
23465}
23466_ACEOF
23467rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023468if { (ac_try="$ac_link"
23469case "(($ac_try" in
23470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23471 *) ac_try_echo=$ac_try;;
23472esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023474 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023475 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023476 grep -v '^ *+' conftest.er1 >conftest.err
23477 rm -f conftest.er1
23478 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023480 (exit $ac_status); } && {
23481 test -z "$ac_c_werror_flag" ||
23482 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023483 } && test -s conftest$ac_exeext &&
23484 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023485 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023486else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023487 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023488sed 's/^/| /' conftest.$ac_ext >&5
23489
Martin v. Löwiseba40652007-08-30 20:10:57 +000023490 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023491fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023492
23493rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023494 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023495LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023496fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023497{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23498echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23499if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023500 cat >>confdefs.h <<_ACEOF
23501#define HAVE_LIBIEEE 1
23502_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023503
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023504 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023505
Guido van Rossum627b2d71993-12-24 10:39:16 +000023506fi
23507
Michael W. Hudson54241132001-12-07 15:38:26 +000023508
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023509fi
23510
Michael W. Hudson54241132001-12-07 15:38:26 +000023511
Guido van Rossum7f253911997-05-09 02:42:48 +000023512# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023513{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23514echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023515
Martin v. Löwiseba40652007-08-30 20:10:57 +000023516# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023517if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023518 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023519if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023520then
23521
23522cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023523#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023524_ACEOF
23525
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023526 { echo "$as_me:$LINENO: result: yes" >&5
23527echo "${ECHO_T}yes" >&6; }
23528else { echo "$as_me:$LINENO: result: no" >&5
23529echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023530fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023531else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023532 { echo "$as_me:$LINENO: result: no" >&5
23533echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023534fi
23535
Guido van Rossum7f253911997-05-09 02:42:48 +000023536
Guido van Rossum7f43da71994-08-01 12:15:30 +000023537# check for --with-libm=...
23538
Guido van Rossum563e7081996-09-10 18:20:48 +000023539case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023540Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023541BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023542*) LIBM=-lm
23543esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023544{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23545echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023546
Martin v. Löwiseba40652007-08-30 20:10:57 +000023547# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023548if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023549 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023550if test "$withval" = no
23551then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023552 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23553echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023554elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023555then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023556 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23557echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23558else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23559echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023560 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023561fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023562else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023563 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23564echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023565fi
23566
Guido van Rossum7f43da71994-08-01 12:15:30 +000023567
23568# check for --with-libc=...
23569
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023570{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23571echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023572
Martin v. Löwiseba40652007-08-30 20:10:57 +000023573# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023574if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023575 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023576if test "$withval" = no
23577then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023578 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23579echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023580elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023581then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023582 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23583echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23584else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23585echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023586 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023587fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023588else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023589 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23590echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023591fi
23592
Guido van Rossum7f43da71994-08-01 12:15:30 +000023593
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023594# **************************************************
23595# * Check for various properties of floating point *
23596# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023597
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023598{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23599echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
23600if test "${ac_cv_little_endian_double+set}" = set; then
23601 echo $ECHO_N "(cached) $ECHO_C" >&6
23602else
23603
23604if test "$cross_compiling" = yes; then
23605 ac_cv_little_endian_double=no
23606else
23607 cat >conftest.$ac_ext <<_ACEOF
23608/* confdefs.h. */
23609_ACEOF
23610cat confdefs.h >>conftest.$ac_ext
23611cat >>conftest.$ac_ext <<_ACEOF
23612/* end confdefs.h. */
23613
23614#include <string.h>
23615int main() {
23616 double x = 9006104071832581.0;
23617 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23618 return 0;
23619 else
23620 return 1;
23621}
23622
23623_ACEOF
23624rm -f conftest$ac_exeext
23625if { (ac_try="$ac_link"
23626case "(($ac_try" in
23627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23628 *) ac_try_echo=$ac_try;;
23629esac
23630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23631 (eval "$ac_link") 2>&5
23632 ac_status=$?
23633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23634 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23635 { (case "(($ac_try" in
23636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23637 *) ac_try_echo=$ac_try;;
23638esac
23639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23640 (eval "$ac_try") 2>&5
23641 ac_status=$?
23642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23643 (exit $ac_status); }; }; then
23644 ac_cv_little_endian_double=yes
23645else
23646 echo "$as_me: program exited with status $ac_status" >&5
23647echo "$as_me: failed program was:" >&5
23648sed 's/^/| /' conftest.$ac_ext >&5
23649
23650( exit $ac_status )
23651ac_cv_little_endian_double=no
23652fi
23653rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23654fi
23655
23656
23657fi
23658
23659{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23660echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
23661if test "$ac_cv_little_endian_double" = yes
23662then
23663
23664cat >>confdefs.h <<\_ACEOF
23665#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23666_ACEOF
23667
23668fi
23669
23670{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23671echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
23672if test "${ac_cv_big_endian_double+set}" = set; then
23673 echo $ECHO_N "(cached) $ECHO_C" >&6
23674else
23675
23676if test "$cross_compiling" = yes; then
23677 ac_cv_big_endian_double=no
23678else
23679 cat >conftest.$ac_ext <<_ACEOF
23680/* confdefs.h. */
23681_ACEOF
23682cat confdefs.h >>conftest.$ac_ext
23683cat >>conftest.$ac_ext <<_ACEOF
23684/* end confdefs.h. */
23685
23686#include <string.h>
23687int main() {
23688 double x = 9006104071832581.0;
23689 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23690 return 0;
23691 else
23692 return 1;
23693}
23694
23695_ACEOF
23696rm -f conftest$ac_exeext
23697if { (ac_try="$ac_link"
23698case "(($ac_try" in
23699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23700 *) ac_try_echo=$ac_try;;
23701esac
23702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23703 (eval "$ac_link") 2>&5
23704 ac_status=$?
23705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23706 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23707 { (case "(($ac_try" in
23708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23709 *) ac_try_echo=$ac_try;;
23710esac
23711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23712 (eval "$ac_try") 2>&5
23713 ac_status=$?
23714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23715 (exit $ac_status); }; }; then
23716 ac_cv_big_endian_double=yes
23717else
23718 echo "$as_me: program exited with status $ac_status" >&5
23719echo "$as_me: failed program was:" >&5
23720sed 's/^/| /' conftest.$ac_ext >&5
23721
23722( exit $ac_status )
23723ac_cv_big_endian_double=no
23724fi
23725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23726fi
23727
23728
23729fi
23730
23731{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23732echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
23733if test "$ac_cv_big_endian_double" = yes
23734then
23735
23736cat >>confdefs.h <<\_ACEOF
23737#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23738_ACEOF
23739
23740fi
23741
23742# Some ARM platforms use a mixed-endian representation for doubles.
23743# While Python doesn't currently have full support for these platforms
23744# (see e.g., issue 1762561), we can at least make sure that float <-> string
23745# conversions work.
23746{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23747echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
23748if test "${ac_cv_mixed_endian_double+set}" = set; then
23749 echo $ECHO_N "(cached) $ECHO_C" >&6
23750else
23751
23752if test "$cross_compiling" = yes; then
23753 ac_cv_mixed_endian_double=no
23754else
23755 cat >conftest.$ac_ext <<_ACEOF
23756/* confdefs.h. */
23757_ACEOF
23758cat confdefs.h >>conftest.$ac_ext
23759cat >>conftest.$ac_ext <<_ACEOF
23760/* end confdefs.h. */
23761
23762#include <string.h>
23763int main() {
23764 double x = 9006104071832581.0;
23765 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23766 return 0;
23767 else
23768 return 1;
23769}
23770
23771_ACEOF
23772rm -f conftest$ac_exeext
23773if { (ac_try="$ac_link"
23774case "(($ac_try" in
23775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23776 *) ac_try_echo=$ac_try;;
23777esac
23778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23779 (eval "$ac_link") 2>&5
23780 ac_status=$?
23781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23782 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23783 { (case "(($ac_try" in
23784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23785 *) ac_try_echo=$ac_try;;
23786esac
23787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23788 (eval "$ac_try") 2>&5
23789 ac_status=$?
23790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23791 (exit $ac_status); }; }; then
23792 ac_cv_mixed_endian_double=yes
23793else
23794 echo "$as_me: program exited with status $ac_status" >&5
23795echo "$as_me: failed program was:" >&5
23796sed 's/^/| /' conftest.$ac_ext >&5
23797
23798( exit $ac_status )
23799ac_cv_mixed_endian_double=no
23800fi
23801rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23802fi
23803
23804
23805fi
23806
23807{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23808echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
23809if test "$ac_cv_mixed_endian_double" = yes
23810then
23811
23812cat >>confdefs.h <<\_ACEOF
23813#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23814_ACEOF
23815
23816fi
23817
23818# The short float repr introduced in Python 3.1 requires the
23819# correctly-rounded string <-> double conversion functions from
23820# Python/dtoa.c, which in turn require that the FPU uses 53-bit
23821# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000023822# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023823# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000023824
23825# This inline assembler syntax may also work for suncc and icc,
23826# so we try it on all platforms.
23827
23828{ echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023829echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000023830cat >conftest.$ac_ext <<_ACEOF
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023831/* confdefs.h. */
23832_ACEOF
23833cat confdefs.h >>conftest.$ac_ext
23834cat >>conftest.$ac_ext <<_ACEOF
23835/* end confdefs.h. */
23836
23837int
23838main ()
23839{
23840
Mark Dickinsona548dee2009-11-15 13:12:43 +000023841 unsigned short cw;
23842 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23843 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023844
23845 ;
23846 return 0;
23847}
23848_ACEOF
23849rm -f conftest.$ac_objext
23850if { (ac_try="$ac_compile"
23851case "(($ac_try" in
23852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23853 *) ac_try_echo=$ac_try;;
23854esac
23855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23856 (eval "$ac_compile") 2>conftest.er1
23857 ac_status=$?
23858 grep -v '^ *+' conftest.er1 >conftest.err
23859 rm -f conftest.er1
23860 cat conftest.err >&5
23861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23862 (exit $ac_status); } && {
23863 test -z "$ac_c_werror_flag" ||
23864 test ! -s conftest.err
23865 } && test -s conftest.$ac_objext; then
23866 have_gcc_asm_for_x87=yes
23867else
23868 echo "$as_me: failed program was:" >&5
23869sed 's/^/| /' conftest.$ac_ext >&5
23870
23871 have_gcc_asm_for_x87=no
23872fi
23873
23874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsona548dee2009-11-15 13:12:43 +000023875{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023876echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000023877if test "$have_gcc_asm_for_x87" = yes
23878then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023879
23880cat >>confdefs.h <<\_ACEOF
23881#define HAVE_GCC_ASM_FOR_X87 1
23882_ACEOF
23883
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023884fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023885
Mark Dickinson04b27232009-01-04 12:29:36 +000023886# Detect whether system arithmetic is subject to x87-style double
23887# rounding issues. The result of this test has little meaning on non
23888# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23889# mode is round-to-nearest and double rounding issues are present, and
23890# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023891{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23892echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000023893# $BASECFLAGS may affect the result
23894ac_save_cc="$CC"
23895CC="$CC $BASECFLAGS"
Mark Dickinson04b27232009-01-04 12:29:36 +000023896if test "$cross_compiling" = yes; then
23897 ac_cv_x87_double_rounding=no
23898else
23899 cat >conftest.$ac_ext <<_ACEOF
23900/* confdefs.h. */
23901_ACEOF
23902cat confdefs.h >>conftest.$ac_ext
23903cat >>conftest.$ac_ext <<_ACEOF
23904/* end confdefs.h. */
23905
23906#include <stdlib.h>
23907#include <math.h>
23908int main() {
23909 volatile double x, y, z;
23910 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23911 x = 0.99999999999999989; /* 1-2**-53 */
23912 y = 1./x;
23913 if (y != 1.)
23914 exit(0);
23915 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23916 x = 1e16;
23917 y = 2.99999;
23918 z = x + y;
23919 if (z != 1e16+4.)
23920 exit(0);
23921 /* both tests show evidence of double rounding */
23922 exit(1);
23923}
23924
23925_ACEOF
23926rm -f conftest$ac_exeext
23927if { (ac_try="$ac_link"
23928case "(($ac_try" in
23929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23930 *) ac_try_echo=$ac_try;;
23931esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023933 (eval "$ac_link") 2>&5
23934 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023936 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23937 { (case "(($ac_try" in
23938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23939 *) ac_try_echo=$ac_try;;
23940esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023942 (eval "$ac_try") 2>&5
23943 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023945 (exit $ac_status); }; }; then
23946 ac_cv_x87_double_rounding=no
23947else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023948 echo "$as_me: program exited with status $ac_status" >&5
23949echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023950sed 's/^/| /' conftest.$ac_ext >&5
23951
23952( exit $ac_status )
23953ac_cv_x87_double_rounding=yes
23954fi
23955rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23956fi
23957
23958
Mark Dickinson99abd142009-10-24 13:44:16 +000023959CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023960{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23961echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000023962if test "$ac_cv_x87_double_rounding" = yes
23963then
23964
23965cat >>confdefs.h <<\_ACEOF
23966#define X87_DOUBLE_ROUNDING 1
23967_ACEOF
23968
23969fi
23970
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023971# ************************************
23972# * Check for mathematical functions *
23973# ************************************
23974
23975LIBS_SAVE=$LIBS
23976LIBS="$LIBS $LIBM"
23977
Mark Dickinson265d7382008-04-21 22:32:24 +000023978# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23979# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023980{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23981echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000023982if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023983 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000023984else
23985
23986if test "$cross_compiling" = yes; then
23987 ac_cv_tanh_preserves_zero_sign=no
23988else
23989 cat >conftest.$ac_ext <<_ACEOF
23990/* confdefs.h. */
23991_ACEOF
23992cat confdefs.h >>conftest.$ac_ext
23993cat >>conftest.$ac_ext <<_ACEOF
23994/* end confdefs.h. */
23995
23996#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023997#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000023998int main() {
23999 /* return 0 if either negative zeros don't exist
24000 on this platform or if negative zeros exist
24001 and tanh(-0.) == -0. */
24002 if (atan2(0., -1.) == atan2(-0., -1.) ||
24003 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
24004 else exit(1);
24005}
24006
24007_ACEOF
24008rm -f conftest$ac_exeext
24009if { (ac_try="$ac_link"
24010case "(($ac_try" in
24011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24012 *) ac_try_echo=$ac_try;;
24013esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024015 (eval "$ac_link") 2>&5
24016 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024018 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24019 { (case "(($ac_try" in
24020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24021 *) ac_try_echo=$ac_try;;
24022esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024024 (eval "$ac_try") 2>&5
24025 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024027 (exit $ac_status); }; }; then
24028 ac_cv_tanh_preserves_zero_sign=yes
24029else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024030 echo "$as_me: program exited with status $ac_status" >&5
24031echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024032sed 's/^/| /' conftest.$ac_ext >&5
24033
24034( exit $ac_status )
24035ac_cv_tanh_preserves_zero_sign=no
24036fi
24037rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24038fi
24039
24040
24041fi
24042
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024043{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
24044echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024045if test "$ac_cv_tanh_preserves_zero_sign" = yes
24046then
24047
24048cat >>confdefs.h <<\_ACEOF
24049#define TANH_PRESERVES_ZERO_SIGN 1
24050_ACEOF
24051
24052fi
24053
Martin v. Löwis11437992002-04-12 09:54:03 +000024054
Guido van Rossum2b3ac691996-08-30 15:18:41 +000024055
Michael W. Hudson54241132001-12-07 15:38:26 +000024056
Christian Heimes0a8143f2007-12-18 23:22:54 +000024057
24058
24059
24060
24061
Mark Dickinson8e5446f2009-04-18 14:41:37 +000024062
Mark Dickinson65898e02009-09-05 10:27:00 +000024063for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
24064do
24065as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24066{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24067echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
24068if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
24069 echo $ECHO_N "(cached) $ECHO_C" >&6
24070else
24071 cat >conftest.$ac_ext <<_ACEOF
24072/* confdefs.h. */
24073_ACEOF
24074cat confdefs.h >>conftest.$ac_ext
24075cat >>conftest.$ac_ext <<_ACEOF
24076/* end confdefs.h. */
24077/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24078 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24079#define $ac_func innocuous_$ac_func
24080
24081/* System header to define __stub macros and hopefully few prototypes,
24082 which can conflict with char $ac_func (); below.
24083 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24084 <limits.h> exists even on freestanding compilers. */
24085
24086#ifdef __STDC__
24087# include <limits.h>
24088#else
24089# include <assert.h>
24090#endif
24091
24092#undef $ac_func
24093
24094/* Override any GCC internal prototype to avoid an error.
24095 Use char because int might match the return type of a GCC
24096 builtin and then its argument prototype would still apply. */
24097#ifdef __cplusplus
24098extern "C"
24099#endif
24100char $ac_func ();
24101/* The GNU C library defines this for functions which it implements
24102 to always fail with ENOSYS. Some functions are actually named
24103 something starting with __ and the normal name is an alias. */
24104#if defined __stub_$ac_func || defined __stub___$ac_func
24105choke me
24106#endif
24107
24108int
24109main ()
24110{
24111return $ac_func ();
24112 ;
24113 return 0;
24114}
24115_ACEOF
24116rm -f conftest.$ac_objext conftest$ac_exeext
24117if { (ac_try="$ac_link"
24118case "(($ac_try" in
24119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24120 *) ac_try_echo=$ac_try;;
24121esac
24122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24123 (eval "$ac_link") 2>conftest.er1
24124 ac_status=$?
24125 grep -v '^ *+' conftest.er1 >conftest.err
24126 rm -f conftest.er1
24127 cat conftest.err >&5
24128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24129 (exit $ac_status); } && {
24130 test -z "$ac_c_werror_flag" ||
24131 test ! -s conftest.err
24132 } && test -s conftest$ac_exeext &&
24133 $as_test_x conftest$ac_exeext; then
24134 eval "$as_ac_var=yes"
24135else
24136 echo "$as_me: failed program was:" >&5
24137sed 's/^/| /' conftest.$ac_ext >&5
24138
24139 eval "$as_ac_var=no"
24140fi
24141
24142rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24143 conftest$ac_exeext conftest.$ac_ext
24144fi
24145ac_res=`eval echo '${'$as_ac_var'}'`
24146 { echo "$as_me:$LINENO: result: $ac_res" >&5
24147echo "${ECHO_T}$ac_res" >&6; }
24148if test `eval echo '${'$as_ac_var'}'` = yes; then
24149 cat >>confdefs.h <<_ACEOF
24150#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24151_ACEOF
24152
24153fi
24154done
24155
24156
24157
24158
24159
24160
24161for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000024162do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024163as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24164{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24165echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000024166if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024167 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000024168else
24169 cat >conftest.$ac_ext <<_ACEOF
24170/* confdefs.h. */
24171_ACEOF
24172cat confdefs.h >>conftest.$ac_ext
24173cat >>conftest.$ac_ext <<_ACEOF
24174/* end confdefs.h. */
24175/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24176 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24177#define $ac_func innocuous_$ac_func
24178
24179/* System header to define __stub macros and hopefully few prototypes,
24180 which can conflict with char $ac_func (); below.
24181 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24182 <limits.h> exists even on freestanding compilers. */
24183
24184#ifdef __STDC__
24185# include <limits.h>
24186#else
24187# include <assert.h>
24188#endif
24189
24190#undef $ac_func
24191
24192/* Override any GCC internal prototype to avoid an error.
24193 Use char because int might match the return type of a GCC
24194 builtin and then its argument prototype would still apply. */
24195#ifdef __cplusplus
24196extern "C"
24197#endif
24198char $ac_func ();
24199/* The GNU C library defines this for functions which it implements
24200 to always fail with ENOSYS. Some functions are actually named
24201 something starting with __ and the normal name is an alias. */
24202#if defined __stub_$ac_func || defined __stub___$ac_func
24203choke me
24204#endif
24205
24206int
24207main ()
24208{
24209return $ac_func ();
24210 ;
24211 return 0;
24212}
24213_ACEOF
24214rm -f conftest.$ac_objext conftest$ac_exeext
24215if { (ac_try="$ac_link"
24216case "(($ac_try" in
24217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24218 *) ac_try_echo=$ac_try;;
24219esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024221 (eval "$ac_link") 2>conftest.er1
24222 ac_status=$?
24223 grep -v '^ *+' conftest.er1 >conftest.err
24224 rm -f conftest.er1
24225 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024227 (exit $ac_status); } && {
24228 test -z "$ac_c_werror_flag" ||
24229 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024230 } && test -s conftest$ac_exeext &&
24231 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024232 eval "$as_ac_var=yes"
24233else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024234 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024235sed 's/^/| /' conftest.$ac_ext >&5
24236
24237 eval "$as_ac_var=no"
24238fi
24239
24240rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24241 conftest$ac_exeext conftest.$ac_ext
24242fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024243ac_res=`eval echo '${'$as_ac_var'}'`
24244 { echo "$as_me:$LINENO: result: $ac_res" >&5
24245echo "${ECHO_T}$ac_res" >&6; }
24246if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024247 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024248#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000024249_ACEOF
24250
24251fi
24252done
24253
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024254{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
24255echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024256if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024257 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024258else
24259 cat >conftest.$ac_ext <<_ACEOF
24260/* confdefs.h. */
24261_ACEOF
24262cat confdefs.h >>conftest.$ac_ext
24263cat >>conftest.$ac_ext <<_ACEOF
24264/* end confdefs.h. */
24265#include <math.h>
24266
24267int
24268main ()
24269{
24270#ifndef isinf
24271 (void) isinf;
24272#endif
24273
24274 ;
24275 return 0;
24276}
24277_ACEOF
24278rm -f conftest.$ac_objext
24279if { (ac_try="$ac_compile"
24280case "(($ac_try" in
24281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24282 *) ac_try_echo=$ac_try;;
24283esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024285 (eval "$ac_compile") 2>conftest.er1
24286 ac_status=$?
24287 grep -v '^ *+' conftest.er1 >conftest.err
24288 rm -f conftest.er1
24289 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024291 (exit $ac_status); } && {
24292 test -z "$ac_c_werror_flag" ||
24293 test ! -s conftest.err
24294 } && test -s conftest.$ac_objext; then
24295 ac_cv_have_decl_isinf=yes
24296else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024297 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024298sed 's/^/| /' conftest.$ac_ext >&5
24299
24300 ac_cv_have_decl_isinf=no
24301fi
24302
24303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24304fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024305{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24306echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24307if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024308
24309cat >>confdefs.h <<_ACEOF
24310#define HAVE_DECL_ISINF 1
24311_ACEOF
24312
24313
24314else
24315 cat >>confdefs.h <<_ACEOF
24316#define HAVE_DECL_ISINF 0
24317_ACEOF
24318
24319
24320fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024321{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24322echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024323if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024324 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024325else
24326 cat >conftest.$ac_ext <<_ACEOF
24327/* confdefs.h. */
24328_ACEOF
24329cat confdefs.h >>conftest.$ac_ext
24330cat >>conftest.$ac_ext <<_ACEOF
24331/* end confdefs.h. */
24332#include <math.h>
24333
24334int
24335main ()
24336{
24337#ifndef isnan
24338 (void) isnan;
24339#endif
24340
24341 ;
24342 return 0;
24343}
24344_ACEOF
24345rm -f conftest.$ac_objext
24346if { (ac_try="$ac_compile"
24347case "(($ac_try" in
24348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24349 *) ac_try_echo=$ac_try;;
24350esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024352 (eval "$ac_compile") 2>conftest.er1
24353 ac_status=$?
24354 grep -v '^ *+' conftest.er1 >conftest.err
24355 rm -f conftest.er1
24356 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024358 (exit $ac_status); } && {
24359 test -z "$ac_c_werror_flag" ||
24360 test ! -s conftest.err
24361 } && test -s conftest.$ac_objext; then
24362 ac_cv_have_decl_isnan=yes
24363else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024364 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024365sed 's/^/| /' conftest.$ac_ext >&5
24366
24367 ac_cv_have_decl_isnan=no
24368fi
24369
24370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24371fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024372{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24373echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24374if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024375
24376cat >>confdefs.h <<_ACEOF
24377#define HAVE_DECL_ISNAN 1
24378_ACEOF
24379
24380
24381else
24382 cat >>confdefs.h <<_ACEOF
24383#define HAVE_DECL_ISNAN 0
24384_ACEOF
24385
24386
24387fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024388{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24389echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024390if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024391 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024392else
24393 cat >conftest.$ac_ext <<_ACEOF
24394/* confdefs.h. */
24395_ACEOF
24396cat confdefs.h >>conftest.$ac_ext
24397cat >>conftest.$ac_ext <<_ACEOF
24398/* end confdefs.h. */
24399#include <math.h>
24400
24401int
24402main ()
24403{
24404#ifndef isfinite
24405 (void) isfinite;
24406#endif
24407
24408 ;
24409 return 0;
24410}
24411_ACEOF
24412rm -f conftest.$ac_objext
24413if { (ac_try="$ac_compile"
24414case "(($ac_try" in
24415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24416 *) ac_try_echo=$ac_try;;
24417esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024419 (eval "$ac_compile") 2>conftest.er1
24420 ac_status=$?
24421 grep -v '^ *+' conftest.er1 >conftest.err
24422 rm -f conftest.er1
24423 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024425 (exit $ac_status); } && {
24426 test -z "$ac_c_werror_flag" ||
24427 test ! -s conftest.err
24428 } && test -s conftest.$ac_objext; then
24429 ac_cv_have_decl_isfinite=yes
24430else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024431 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024432sed 's/^/| /' conftest.$ac_ext >&5
24433
24434 ac_cv_have_decl_isfinite=no
24435fi
24436
24437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24438fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024439{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24440echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24441if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024442
24443cat >>confdefs.h <<_ACEOF
24444#define HAVE_DECL_ISFINITE 1
24445_ACEOF
24446
24447
24448else
24449 cat >>confdefs.h <<_ACEOF
24450#define HAVE_DECL_ISFINITE 0
24451_ACEOF
24452
24453
24454fi
24455
24456
Christian Heimes0a8143f2007-12-18 23:22:54 +000024457
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024458LIBS=$LIBS_SAVE
24459
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024460# For multiprocessing module, check that sem_open
24461# actually works. For FreeBSD versions <= 7.2,
24462# the kernel module that provides POSIX semaphores
24463# isn't loaded by default, so an attempt to call
24464# sem_open results in a 'Signal 12' error.
24465{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24466echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24467if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24468 echo $ECHO_N "(cached) $ECHO_C" >&6
24469else
24470 if test "$cross_compiling" = yes; then
24471 ac_cv_posix_semaphores_enabled=yes
24472else
24473 cat >conftest.$ac_ext <<_ACEOF
24474/* confdefs.h. */
24475_ACEOF
24476cat confdefs.h >>conftest.$ac_ext
24477cat >>conftest.$ac_ext <<_ACEOF
24478/* end confdefs.h. */
24479
24480#include <unistd.h>
24481#include <fcntl.h>
24482#include <stdio.h>
24483#include <semaphore.h>
24484#include <sys/stat.h>
24485
24486int main(void) {
24487 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24488 if (a == SEM_FAILED) {
24489 perror("sem_open");
24490 return 1;
24491 }
24492 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024493 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024494 return 0;
24495}
24496
24497_ACEOF
24498rm -f conftest$ac_exeext
24499if { (ac_try="$ac_link"
24500case "(($ac_try" in
24501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24502 *) ac_try_echo=$ac_try;;
24503esac
24504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24505 (eval "$ac_link") 2>&5
24506 ac_status=$?
24507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24508 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24509 { (case "(($ac_try" in
24510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24511 *) ac_try_echo=$ac_try;;
24512esac
24513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24514 (eval "$ac_try") 2>&5
24515 ac_status=$?
24516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24517 (exit $ac_status); }; }; then
24518 ac_cv_posix_semaphores_enabled=yes
24519else
24520 echo "$as_me: program exited with status $ac_status" >&5
24521echo "$as_me: failed program was:" >&5
24522sed 's/^/| /' conftest.$ac_ext >&5
24523
24524( exit $ac_status )
24525ac_cv_posix_semaphores_enabled=no
24526fi
24527rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24528fi
24529
24530
24531
24532fi
24533
24534{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24535echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24536if test $ac_cv_posix_semaphores_enabled = no
24537then
24538
24539cat >>confdefs.h <<\_ACEOF
24540#define POSIX_SEMAPHORES_NOT_ENABLED 1
24541_ACEOF
24542
24543fi
24544
24545# Multiprocessing check for broken sem_getvalue
24546{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24547echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
24548if test "${ac_cv_broken_sem_getvalue+set}" = set; then
24549 echo $ECHO_N "(cached) $ECHO_C" >&6
24550else
24551 if test "$cross_compiling" = yes; then
24552 ac_cv_broken_sem_getvalue=yes
24553else
24554 cat >conftest.$ac_ext <<_ACEOF
24555/* confdefs.h. */
24556_ACEOF
24557cat confdefs.h >>conftest.$ac_ext
24558cat >>conftest.$ac_ext <<_ACEOF
24559/* end confdefs.h. */
24560
24561#include <unistd.h>
24562#include <fcntl.h>
24563#include <stdio.h>
24564#include <semaphore.h>
24565#include <sys/stat.h>
24566
24567int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024568 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024569 int count;
24570 int res;
24571 if(a==SEM_FAILED){
24572 perror("sem_open");
24573 return 1;
24574
24575 }
24576 res = sem_getvalue(a, &count);
24577 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024578 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024579 return res==-1 ? 1 : 0;
24580}
24581
24582_ACEOF
24583rm -f conftest$ac_exeext
24584if { (ac_try="$ac_link"
24585case "(($ac_try" in
24586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24587 *) ac_try_echo=$ac_try;;
24588esac
24589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24590 (eval "$ac_link") 2>&5
24591 ac_status=$?
24592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24593 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24594 { (case "(($ac_try" in
24595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24596 *) ac_try_echo=$ac_try;;
24597esac
24598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24599 (eval "$ac_try") 2>&5
24600 ac_status=$?
24601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24602 (exit $ac_status); }; }; then
24603 ac_cv_broken_sem_getvalue=no
24604else
24605 echo "$as_me: program exited with status $ac_status" >&5
24606echo "$as_me: failed program was:" >&5
24607sed 's/^/| /' conftest.$ac_ext >&5
24608
24609( exit $ac_status )
24610ac_cv_broken_sem_getvalue=yes
24611fi
24612rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24613fi
24614
24615
24616
24617fi
24618
24619{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24620echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
24621if test $ac_cv_broken_sem_getvalue = yes
24622then
24623
24624cat >>confdefs.h <<\_ACEOF
24625#define HAVE_BROKEN_SEM_GETVALUE 1
24626_ACEOF
24627
24628fi
24629
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024630# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024631{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24632echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024633# Check whether --enable-big-digits was given.
24634if test "${enable_big_digits+set}" = set; then
24635 enableval=$enable_big_digits; case $enable_big_digits in
24636yes)
24637 enable_big_digits=30 ;;
24638no)
24639 enable_big_digits=15 ;;
2464015|30)
24641 ;;
24642*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024643 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24644echo "$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 +000024645 { (exit 1); exit 1; }; } ;;
24646esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024647{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24648echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024649
24650cat >>confdefs.h <<_ACEOF
24651#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24652_ACEOF
24653
24654
24655else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024656 { echo "$as_me:$LINENO: result: no value specified" >&5
24657echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024658fi
24659
24660
Guido van Rossumef2255b2000-03-10 22:30:29 +000024661# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024662if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024663 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24664echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024665if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024666 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024667fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024668{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24669echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024670else
Martin v. Löwis11437992002-04-12 09:54:03 +000024671 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024672{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24673echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024674cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024675/* confdefs.h. */
24676_ACEOF
24677cat confdefs.h >>conftest.$ac_ext
24678cat >>conftest.$ac_ext <<_ACEOF
24679/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024680$ac_includes_default
24681#include <wchar.h>
24682_ACEOF
24683rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024684if { (ac_try="$ac_compile"
24685case "(($ac_try" in
24686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24687 *) ac_try_echo=$ac_try;;
24688esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024690 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024692 grep -v '^ *+' conftest.er1 >conftest.err
24693 rm -f conftest.er1
24694 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024696 (exit $ac_status); } && {
24697 test -z "$ac_c_werror_flag" ||
24698 test ! -s conftest.err
24699 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024700 ac_header_compiler=yes
24701else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024702 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024703sed 's/^/| /' conftest.$ac_ext >&5
24704
Martin v. Löwiseba40652007-08-30 20:10:57 +000024705 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024706fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024707
24708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024709{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24710echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024711
24712# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024713{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24714echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024715cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024716/* confdefs.h. */
24717_ACEOF
24718cat confdefs.h >>conftest.$ac_ext
24719cat >>conftest.$ac_ext <<_ACEOF
24720/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024721#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024722_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024723if { (ac_try="$ac_cpp conftest.$ac_ext"
24724case "(($ac_try" in
24725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24726 *) ac_try_echo=$ac_try;;
24727esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024729 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024730 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024731 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024732 rm -f conftest.er1
24733 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024735 (exit $ac_status); } >/dev/null && {
24736 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24737 test ! -s conftest.err
24738 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024739 ac_header_preproc=yes
24740else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024742sed 's/^/| /' conftest.$ac_ext >&5
24743
Martin v. Löwis11437992002-04-12 09:54:03 +000024744 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024746
Martin v. Löwis11437992002-04-12 09:54:03 +000024747rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024748{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24749echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024750
24751# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024752case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24753 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024754 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24755echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24756 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24757echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024758 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024759 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024760 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024761 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24762echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24763 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24764echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24765 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24766echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24767 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24768echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24769 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24770echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24771 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24772echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000024773 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000024774## -------------------------------------- ##
24775## Report this to http://bugs.python.org/ ##
24776## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024777_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000024778 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024779 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024780esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024781{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24782echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024783if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024784 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024785else
24786 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024787fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024788{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24789echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024790
24791fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024792if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024793
24794
24795cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024796#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024797_ACEOF
24798
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024799 wchar_h="yes"
24800
Guido van Rossumef2255b2000-03-10 22:30:29 +000024801else
Martin v. Löwis11437992002-04-12 09:54:03 +000024802 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024803
24804fi
24805
Michael W. Hudson54241132001-12-07 15:38:26 +000024806
Martin v. Löwis11437992002-04-12 09:54:03 +000024807
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024808# determine wchar_t size
24809if test "$wchar_h" = yes
24810then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024811 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24812echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24813if test "${ac_cv_type_wchar_t+set}" = set; then
24814 echo $ECHO_N "(cached) $ECHO_C" >&6
24815else
24816 cat >conftest.$ac_ext <<_ACEOF
24817/* confdefs.h. */
24818_ACEOF
24819cat confdefs.h >>conftest.$ac_ext
24820cat >>conftest.$ac_ext <<_ACEOF
24821/* end confdefs.h. */
24822#include <wchar.h>
24823
24824typedef wchar_t ac__type_new_;
24825int
24826main ()
24827{
24828if ((ac__type_new_ *) 0)
24829 return 0;
24830if (sizeof (ac__type_new_))
24831 return 0;
24832 ;
24833 return 0;
24834}
24835_ACEOF
24836rm -f conftest.$ac_objext
24837if { (ac_try="$ac_compile"
24838case "(($ac_try" in
24839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24840 *) ac_try_echo=$ac_try;;
24841esac
24842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24843 (eval "$ac_compile") 2>conftest.er1
24844 ac_status=$?
24845 grep -v '^ *+' conftest.er1 >conftest.err
24846 rm -f conftest.er1
24847 cat conftest.err >&5
24848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24849 (exit $ac_status); } && {
24850 test -z "$ac_c_werror_flag" ||
24851 test ! -s conftest.err
24852 } && test -s conftest.$ac_objext; then
24853 ac_cv_type_wchar_t=yes
24854else
24855 echo "$as_me: failed program was:" >&5
24856sed 's/^/| /' conftest.$ac_ext >&5
24857
24858 ac_cv_type_wchar_t=no
24859fi
24860
24861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24862fi
24863{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24864echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24865
24866# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000024867# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24868# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24869# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024870{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24871echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024872if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024873 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024874else
Martin v. Löwis11437992002-04-12 09:54:03 +000024875 if test "$cross_compiling" = yes; then
24876 # Depending upon the size, compute the lo and hi bounds.
24877cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024878/* confdefs.h. */
24879_ACEOF
24880cat confdefs.h >>conftest.$ac_ext
24881cat >>conftest.$ac_ext <<_ACEOF
24882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024883#include <wchar.h>
24884
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024885 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024886int
24887main ()
24888{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024889static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024890test_array [0] = 0
24891
24892 ;
24893 return 0;
24894}
24895_ACEOF
24896rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024897if { (ac_try="$ac_compile"
24898case "(($ac_try" in
24899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24900 *) ac_try_echo=$ac_try;;
24901esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024903 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024905 grep -v '^ *+' conftest.er1 >conftest.err
24906 rm -f conftest.er1
24907 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024909 (exit $ac_status); } && {
24910 test -z "$ac_c_werror_flag" ||
24911 test ! -s conftest.err
24912 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024913 ac_lo=0 ac_mid=0
24914 while :; do
24915 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024916/* confdefs.h. */
24917_ACEOF
24918cat confdefs.h >>conftest.$ac_ext
24919cat >>conftest.$ac_ext <<_ACEOF
24920/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024921#include <wchar.h>
24922
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024923 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024924int
24925main ()
24926{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024927static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024928test_array [0] = 0
24929
24930 ;
24931 return 0;
24932}
24933_ACEOF
24934rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024935if { (ac_try="$ac_compile"
24936case "(($ac_try" in
24937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24938 *) ac_try_echo=$ac_try;;
24939esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024941 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024943 grep -v '^ *+' conftest.er1 >conftest.err
24944 rm -f conftest.er1
24945 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024947 (exit $ac_status); } && {
24948 test -z "$ac_c_werror_flag" ||
24949 test ! -s conftest.err
24950 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024951 ac_hi=$ac_mid; break
24952else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024954sed 's/^/| /' conftest.$ac_ext >&5
24955
Martin v. Löwiseba40652007-08-30 20:10:57 +000024956 ac_lo=`expr $ac_mid + 1`
24957 if test $ac_lo -le $ac_mid; then
24958 ac_lo= ac_hi=
24959 break
24960 fi
24961 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024962fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024963
24964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024965 done
24966else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024968sed 's/^/| /' conftest.$ac_ext >&5
24969
Martin v. Löwiseba40652007-08-30 20:10:57 +000024970 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024971/* confdefs.h. */
24972_ACEOF
24973cat confdefs.h >>conftest.$ac_ext
24974cat >>conftest.$ac_ext <<_ACEOF
24975/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024976#include <wchar.h>
24977
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024978 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024979int
24980main ()
24981{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024982static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024983test_array [0] = 0
24984
24985 ;
24986 return 0;
24987}
24988_ACEOF
24989rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024990if { (ac_try="$ac_compile"
24991case "(($ac_try" in
24992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24993 *) ac_try_echo=$ac_try;;
24994esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024996 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024997 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024998 grep -v '^ *+' conftest.er1 >conftest.err
24999 rm -f conftest.er1
25000 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025002 (exit $ac_status); } && {
25003 test -z "$ac_c_werror_flag" ||
25004 test ! -s conftest.err
25005 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025006 ac_hi=-1 ac_mid=-1
25007 while :; do
25008 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025009/* confdefs.h. */
25010_ACEOF
25011cat confdefs.h >>conftest.$ac_ext
25012cat >>conftest.$ac_ext <<_ACEOF
25013/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025014#include <wchar.h>
25015
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025016 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025017int
25018main ()
25019{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025020static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025021test_array [0] = 0
25022
25023 ;
25024 return 0;
25025}
25026_ACEOF
25027rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025028if { (ac_try="$ac_compile"
25029case "(($ac_try" in
25030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25031 *) ac_try_echo=$ac_try;;
25032esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025034 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025035 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025036 grep -v '^ *+' conftest.er1 >conftest.err
25037 rm -f conftest.er1
25038 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025040 (exit $ac_status); } && {
25041 test -z "$ac_c_werror_flag" ||
25042 test ! -s conftest.err
25043 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025044 ac_lo=$ac_mid; break
25045else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025047sed 's/^/| /' conftest.$ac_ext >&5
25048
Martin v. Löwiseba40652007-08-30 20:10:57 +000025049 ac_hi=`expr '(' $ac_mid ')' - 1`
25050 if test $ac_mid -le $ac_hi; then
25051 ac_lo= ac_hi=
25052 break
25053 fi
25054 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000025055fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025056
25057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025058 done
25059else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025061sed 's/^/| /' conftest.$ac_ext >&5
25062
Martin v. Löwiseba40652007-08-30 20:10:57 +000025063 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000025064fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025065
25066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025068
25069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025070# Binary search between lo and hi bounds.
25071while test "x$ac_lo" != "x$ac_hi"; do
25072 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25073 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025074/* confdefs.h. */
25075_ACEOF
25076cat confdefs.h >>conftest.$ac_ext
25077cat >>conftest.$ac_ext <<_ACEOF
25078/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025079#include <wchar.h>
25080
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025081 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025082int
25083main ()
25084{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025085static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025086test_array [0] = 0
25087
25088 ;
25089 return 0;
25090}
25091_ACEOF
25092rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025093if { (ac_try="$ac_compile"
25094case "(($ac_try" in
25095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25096 *) ac_try_echo=$ac_try;;
25097esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025099 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025100 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025101 grep -v '^ *+' conftest.er1 >conftest.err
25102 rm -f conftest.er1
25103 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025105 (exit $ac_status); } && {
25106 test -z "$ac_c_werror_flag" ||
25107 test ! -s conftest.err
25108 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025109 ac_hi=$ac_mid
25110else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025112sed 's/^/| /' conftest.$ac_ext >&5
25113
Martin v. Löwiseba40652007-08-30 20:10:57 +000025114 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025115fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025116
25117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025118done
25119case $ac_lo in
25120?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025121'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025122 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025123See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025124echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025125See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025126 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025127 else
25128 ac_cv_sizeof_wchar_t=0
25129 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025130esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025131else
Martin v. Löwis11437992002-04-12 09:54:03 +000025132 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025133/* confdefs.h. */
25134_ACEOF
25135cat confdefs.h >>conftest.$ac_ext
25136cat >>conftest.$ac_ext <<_ACEOF
25137/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025138#include <wchar.h>
25139
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025140 typedef wchar_t ac__type_sizeof_;
25141static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
25142static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000025143#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025144#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025145int
25146main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025147{
Martin v. Löwis11437992002-04-12 09:54:03 +000025148
25149 FILE *f = fopen ("conftest.val", "w");
25150 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025151 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025152 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025153 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025154 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025155 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025156 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025157 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025158 }
25159 else
25160 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025161 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025162 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025163 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025164 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025165 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025166 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025167
25168 ;
25169 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025170}
Martin v. Löwis11437992002-04-12 09:54:03 +000025171_ACEOF
25172rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025173if { (ac_try="$ac_link"
25174case "(($ac_try" in
25175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25176 *) ac_try_echo=$ac_try;;
25177esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025179 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025180 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025182 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025183 { (case "(($ac_try" in
25184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25185 *) ac_try_echo=$ac_try;;
25186esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025188 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025189 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025191 (exit $ac_status); }; }; then
25192 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000025193else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025194 echo "$as_me: program exited with status $ac_status" >&5
25195echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025196sed 's/^/| /' conftest.$ac_ext >&5
25197
Martin v. Löwis11437992002-04-12 09:54:03 +000025198( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025199if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025200 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025201See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025202echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025203See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025204 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025205 else
25206 ac_cv_sizeof_wchar_t=0
25207 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025208fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025209rm -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 +000025210fi
25211rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000025212fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025213{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
25214echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025215
25216
25217
Martin v. Löwis11437992002-04-12 09:54:03 +000025218cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025219#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025220_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025221
Michael W. Hudson54241132001-12-07 15:38:26 +000025222
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025223fi
25224
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025225{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
25226echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025227have_ucs4_tcl=no
25228cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025229/* confdefs.h. */
25230_ACEOF
25231cat confdefs.h >>conftest.$ac_ext
25232cat >>conftest.$ac_ext <<_ACEOF
25233/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025234
25235#include <tcl.h>
25236#if TCL_UTF_MAX != 6
25237# error "NOT UCS4_TCL"
25238#endif
25239int
25240main ()
25241{
25242
25243 ;
25244 return 0;
25245}
25246_ACEOF
25247rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025248if { (ac_try="$ac_compile"
25249case "(($ac_try" in
25250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25251 *) ac_try_echo=$ac_try;;
25252esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025254 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025255 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025256 grep -v '^ *+' conftest.er1 >conftest.err
25257 rm -f conftest.er1
25258 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025260 (exit $ac_status); } && {
25261 test -z "$ac_c_werror_flag" ||
25262 test ! -s conftest.err
25263 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025264
25265
25266cat >>confdefs.h <<\_ACEOF
25267#define HAVE_UCS4_TCL 1
25268_ACEOF
25269
25270 have_ucs4_tcl=yes
25271
25272else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025274sed 's/^/| /' conftest.$ac_ext >&5
25275
Martin v. Löwiseba40652007-08-30 20:10:57 +000025276
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025277fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025278
25279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025280{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
25281echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025282
Skip Montanaro6dead952003-09-25 14:50:04 +000025283# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025284if test "$wchar_h" = yes
25285then
25286 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025287 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
25288echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025289 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025290 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025291else
25292
25293 if test "$cross_compiling" = yes; then
25294 ac_cv_wchar_t_signed=yes
25295else
25296 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025297/* confdefs.h. */
25298_ACEOF
25299cat confdefs.h >>conftest.$ac_ext
25300cat >>conftest.$ac_ext <<_ACEOF
25301/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025302
25303 #include <wchar.h>
25304 int main()
25305 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000025306 /* Success: exit code 0 */
25307 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025308 }
25309
25310_ACEOF
25311rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025312if { (ac_try="$ac_link"
25313case "(($ac_try" in
25314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25315 *) ac_try_echo=$ac_try;;
25316esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025318 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025319 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025321 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025322 { (case "(($ac_try" in
25323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25324 *) ac_try_echo=$ac_try;;
25325esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025327 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025328 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025330 (exit $ac_status); }; }; then
25331 ac_cv_wchar_t_signed=yes
25332else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025333 echo "$as_me: program exited with status $ac_status" >&5
25334echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025335sed 's/^/| /' conftest.$ac_ext >&5
25336
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025337( exit $ac_status )
25338ac_cv_wchar_t_signed=no
25339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025340rm -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 +000025341fi
25342
Martin v. Löwiseba40652007-08-30 20:10:57 +000025343
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025344fi
25345
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025346 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25347echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025348fi
25349
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025350{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
25351echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025352# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025353if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025354 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025355else
25356 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000025357fi
25358
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025359
25360if test $enable_unicode = yes
25361then
Martin v. Löwisfd917792001-06-27 20:22:04 +000025362 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025363 case "$have_ucs4_tcl" in
25364 yes) enable_unicode="ucs4"
25365 ;;
25366 *) enable_unicode="ucs2"
25367 ;;
25368 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025369fi
25370
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025371
25372
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025373case "$enable_unicode" in
25374ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000025375 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025376#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000025377_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025378
25379 ;;
25380ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000025381 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025382#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025383_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025384
25385 ;;
25386esac
25387
Michael W. Hudson54241132001-12-07 15:38:26 +000025388
Martin v. Löwis11437992002-04-12 09:54:03 +000025389
25390
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025391
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025392if test "$enable_unicode" = "no"
25393then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025394 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025395 { echo "$as_me:$LINENO: result: not used" >&5
25396echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025397else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025398 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000025399
25400cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025401#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025402_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025403
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025404
25405 # wchar_t is only usable if it maps to an unsigned type
25406 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025407 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025408 then
25409 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025410
Martin v. Löwis11437992002-04-12 09:54:03 +000025411cat >>confdefs.h <<\_ACEOF
25412#define HAVE_USABLE_WCHAR_T 1
25413_ACEOF
25414
25415 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025416#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025417_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025418
25419 elif test "$ac_cv_sizeof_short" = "$unicode_size"
25420 then
25421 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000025422 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025423#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025424_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025425
25426 elif test "$ac_cv_sizeof_long" = "$unicode_size"
25427 then
25428 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000025429 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025430#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025431_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025432
25433 else
25434 PY_UNICODE_TYPE="no type found"
25435 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025436 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25437echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025438fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000025439
25440# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025441{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25442echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025443if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025444 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025445else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025446 # See if sys/param.h defines the BYTE_ORDER macro.
25447cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025448/* confdefs.h. */
25449_ACEOF
25450cat confdefs.h >>conftest.$ac_ext
25451cat >>conftest.$ac_ext <<_ACEOF
25452/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025453#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025454#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025455
Martin v. Löwis11437992002-04-12 09:54:03 +000025456int
25457main ()
25458{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025459#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25460 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25461 bogus endian macros
25462#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025463
25464 ;
25465 return 0;
25466}
25467_ACEOF
25468rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025469if { (ac_try="$ac_compile"
25470case "(($ac_try" in
25471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25472 *) ac_try_echo=$ac_try;;
25473esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025475 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025476 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025477 grep -v '^ *+' conftest.er1 >conftest.err
25478 rm -f conftest.er1
25479 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025481 (exit $ac_status); } && {
25482 test -z "$ac_c_werror_flag" ||
25483 test ! -s conftest.err
25484 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025485 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025486cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025487/* confdefs.h. */
25488_ACEOF
25489cat confdefs.h >>conftest.$ac_ext
25490cat >>conftest.$ac_ext <<_ACEOF
25491/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025492#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025493#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025494
Martin v. Löwis11437992002-04-12 09:54:03 +000025495int
25496main ()
25497{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025498#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025499 not big endian
25500#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025501
25502 ;
25503 return 0;
25504}
25505_ACEOF
25506rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025507if { (ac_try="$ac_compile"
25508case "(($ac_try" in
25509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25510 *) ac_try_echo=$ac_try;;
25511esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025513 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025515 grep -v '^ *+' conftest.er1 >conftest.err
25516 rm -f conftest.er1
25517 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025519 (exit $ac_status); } && {
25520 test -z "$ac_c_werror_flag" ||
25521 test ! -s conftest.err
25522 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025523 ac_cv_c_bigendian=yes
25524else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025526sed 's/^/| /' conftest.$ac_ext >&5
25527
Martin v. Löwiseba40652007-08-30 20:10:57 +000025528 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025529fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025530
25531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025532else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025533 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025534sed 's/^/| /' conftest.$ac_ext >&5
25535
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025536 # It does not; compile a test program.
25537if test "$cross_compiling" = yes; then
25538 # try to guess the endianness by grepping values into an object file
25539 ac_cv_c_bigendian=unknown
25540 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025541/* confdefs.h. */
25542_ACEOF
25543cat confdefs.h >>conftest.$ac_ext
25544cat >>conftest.$ac_ext <<_ACEOF
25545/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025546short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25547short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25548void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25549short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25550short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25551void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025552int
25553main ()
25554{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025555 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025556 ;
25557 return 0;
25558}
25559_ACEOF
25560rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025561if { (ac_try="$ac_compile"
25562case "(($ac_try" in
25563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25564 *) ac_try_echo=$ac_try;;
25565esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025567 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025568 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025569 grep -v '^ *+' conftest.er1 >conftest.err
25570 rm -f conftest.er1
25571 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025573 (exit $ac_status); } && {
25574 test -z "$ac_c_werror_flag" ||
25575 test ! -s conftest.err
25576 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025577 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025578 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025579fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025580if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25581 if test "$ac_cv_c_bigendian" = unknown; then
25582 ac_cv_c_bigendian=no
25583 else
25584 # finding both strings is unlikely to happen, but who knows?
25585 ac_cv_c_bigendian=unknown
25586 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025587fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025588else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025590sed 's/^/| /' conftest.$ac_ext >&5
25591
Martin v. Löwiseba40652007-08-30 20:10:57 +000025592
Martin v. Löwis11437992002-04-12 09:54:03 +000025593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025594
25595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025596else
25597 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025598/* confdefs.h. */
25599_ACEOF
25600cat confdefs.h >>conftest.$ac_ext
25601cat >>conftest.$ac_ext <<_ACEOF
25602/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000025603$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025604int
25605main ()
25606{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025607
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025608 /* Are we little or big endian? From Harbison&Steele. */
25609 union
25610 {
25611 long int l;
25612 char c[sizeof (long int)];
25613 } u;
25614 u.l = 1;
25615 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025616
25617 ;
25618 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025619}
Martin v. Löwis11437992002-04-12 09:54:03 +000025620_ACEOF
25621rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025622if { (ac_try="$ac_link"
25623case "(($ac_try" in
25624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25625 *) ac_try_echo=$ac_try;;
25626esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025628 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025629 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025631 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025632 { (case "(($ac_try" in
25633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25634 *) ac_try_echo=$ac_try;;
25635esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025637 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025638 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025640 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025641 ac_cv_c_bigendian=no
25642else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025643 echo "$as_me: program exited with status $ac_status" >&5
25644echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025645sed 's/^/| /' conftest.$ac_ext >&5
25646
Martin v. Löwis11437992002-04-12 09:54:03 +000025647( exit $ac_status )
25648ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025649fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025650rm -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 +000025651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025652
25653
Martin v. Löwis11437992002-04-12 09:54:03 +000025654fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025655
25656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25657fi
25658{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25659echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25660case $ac_cv_c_bigendian in
25661 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025662
25663cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025664#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025665_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025666 ;;
25667 no)
25668 ;;
25669 *)
25670 { { echo "$as_me:$LINENO: error: unknown endianness
25671presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25672echo "$as_me: error: unknown endianness
25673presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025674 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025675esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025676
Michael W. Hudson54241132001-12-07 15:38:26 +000025677
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025678# Check whether right shifting a negative integer extends the sign bit
25679# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025680{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25681echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025682if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025683 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025684else
Martin v. Löwis11437992002-04-12 09:54:03 +000025685
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025686if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025687 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025688else
Martin v. Löwis11437992002-04-12 09:54:03 +000025689 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025690/* confdefs.h. */
25691_ACEOF
25692cat confdefs.h >>conftest.$ac_ext
25693cat >>conftest.$ac_ext <<_ACEOF
25694/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025695
25696int main()
25697{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025698 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025699}
25700
Martin v. Löwis11437992002-04-12 09:54:03 +000025701_ACEOF
25702rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025703if { (ac_try="$ac_link"
25704case "(($ac_try" in
25705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25706 *) ac_try_echo=$ac_try;;
25707esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025709 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025710 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025712 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025713 { (case "(($ac_try" in
25714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25715 *) ac_try_echo=$ac_try;;
25716esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025718 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025719 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025721 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025722 ac_cv_rshift_extends_sign=yes
25723else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025724 echo "$as_me: program exited with status $ac_status" >&5
25725echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025726sed 's/^/| /' conftest.$ac_ext >&5
25727
Martin v. Löwis11437992002-04-12 09:54:03 +000025728( exit $ac_status )
25729ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025730fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025731rm -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 +000025732fi
25733
Martin v. Löwiseba40652007-08-30 20:10:57 +000025734
25735fi
25736
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025737{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25738echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025739if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025740then
Martin v. Löwis11437992002-04-12 09:54:03 +000025741
25742cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025743#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025744_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025745
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025746fi
25747
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025748# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025749{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25750echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025751if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025752 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025753else
Martin v. Löwis11437992002-04-12 09:54:03 +000025754
25755cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025756/* confdefs.h. */
25757_ACEOF
25758cat confdefs.h >>conftest.$ac_ext
25759cat >>conftest.$ac_ext <<_ACEOF
25760/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025761#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025762int
25763main ()
25764{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025765
25766 FILE *f = fopen("/dev/null", "r");
25767 flockfile(f);
25768 getc_unlocked(f);
25769 funlockfile(f);
25770
Martin v. Löwis11437992002-04-12 09:54:03 +000025771 ;
25772 return 0;
25773}
25774_ACEOF
25775rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025776if { (ac_try="$ac_link"
25777case "(($ac_try" in
25778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25779 *) ac_try_echo=$ac_try;;
25780esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025782 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025783 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025784 grep -v '^ *+' conftest.er1 >conftest.err
25785 rm -f conftest.er1
25786 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025788 (exit $ac_status); } && {
25789 test -z "$ac_c_werror_flag" ||
25790 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025791 } && test -s conftest$ac_exeext &&
25792 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025793 ac_cv_have_getc_unlocked=yes
25794else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025796sed 's/^/| /' conftest.$ac_ext >&5
25797
Martin v. Löwiseba40652007-08-30 20:10:57 +000025798 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025799fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025800
25801rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025802 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025803fi
25804
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025805{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25806echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025807if test "$ac_cv_have_getc_unlocked" = yes
25808then
Martin v. Löwis11437992002-04-12 09:54:03 +000025809
25810cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025811#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025812_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025813
25814fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025815
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025816# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025817# save the value of LIBS so we don't actually link Python with readline
25818LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025819
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025820# On some systems we need to link readline to a termcap compatible
25821# library. NOTE: Keep the precedence of listed libraries synchronised
25822# with setup.py.
25823py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025824{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25825echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025826for py_libtermcap in "" ncursesw ncurses curses termcap; do
25827 if test -z "$py_libtermcap"; then
25828 READLINE_LIBS="-lreadline"
25829 else
25830 READLINE_LIBS="-lreadline -l$py_libtermcap"
25831 fi
25832 LIBS="$READLINE_LIBS $LIBS_no_readline"
25833 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025834/* confdefs.h. */
25835_ACEOF
25836cat confdefs.h >>conftest.$ac_ext
25837cat >>conftest.$ac_ext <<_ACEOF
25838/* end confdefs.h. */
25839
Martin v. Löwiseba40652007-08-30 20:10:57 +000025840/* Override any GCC internal prototype to avoid an error.
25841 Use char because int might match the return type of a GCC
25842 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025843#ifdef __cplusplus
25844extern "C"
25845#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025846char readline ();
25847int
25848main ()
25849{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025850return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025851 ;
25852 return 0;
25853}
25854_ACEOF
25855rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025856if { (ac_try="$ac_link"
25857case "(($ac_try" in
25858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25859 *) ac_try_echo=$ac_try;;
25860esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025862 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025863 ac_status=$?
25864 grep -v '^ *+' conftest.er1 >conftest.err
25865 rm -f conftest.er1
25866 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025868 (exit $ac_status); } && {
25869 test -z "$ac_c_werror_flag" ||
25870 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025871 } && test -s conftest$ac_exeext &&
25872 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025873 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025874else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025875 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025876sed 's/^/| /' conftest.$ac_ext >&5
25877
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025878
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025879fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025880
25881rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025882 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025883 if test $py_cv_lib_readline = yes; then
25884 break
25885 fi
25886done
25887# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25888#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000025889if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025890 { echo "$as_me:$LINENO: result: none" >&5
25891echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025892else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025893 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25894echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025895
25896cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025897#define HAVE_LIBREADLINE 1
25898_ACEOF
25899
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025900fi
25901
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025902# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025903{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25904echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025905if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025906 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025907else
25908 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025909LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025910cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025911/* confdefs.h. */
25912_ACEOF
25913cat confdefs.h >>conftest.$ac_ext
25914cat >>conftest.$ac_ext <<_ACEOF
25915/* end confdefs.h. */
25916
Martin v. Löwiseba40652007-08-30 20:10:57 +000025917/* Override any GCC internal prototype to avoid an error.
25918 Use char because int might match the return type of a GCC
25919 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025920#ifdef __cplusplus
25921extern "C"
25922#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025923char rl_callback_handler_install ();
25924int
25925main ()
25926{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025927return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025928 ;
25929 return 0;
25930}
25931_ACEOF
25932rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025933if { (ac_try="$ac_link"
25934case "(($ac_try" in
25935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25936 *) ac_try_echo=$ac_try;;
25937esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025939 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025940 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025941 grep -v '^ *+' conftest.er1 >conftest.err
25942 rm -f conftest.er1
25943 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025945 (exit $ac_status); } && {
25946 test -z "$ac_c_werror_flag" ||
25947 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025948 } && test -s conftest$ac_exeext &&
25949 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025950 ac_cv_lib_readline_rl_callback_handler_install=yes
25951else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025952 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025953sed 's/^/| /' conftest.$ac_ext >&5
25954
Martin v. Löwiseba40652007-08-30 20:10:57 +000025955 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025956fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025957
25958rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025959 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025960LIBS=$ac_check_lib_save_LIBS
25961fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025962{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25963echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25964if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025965
25966cat >>confdefs.h <<\_ACEOF
25967#define HAVE_RL_CALLBACK 1
25968_ACEOF
25969
25970fi
25971
25972
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025973# check for readline 2.2
25974cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025975/* confdefs.h. */
25976_ACEOF
25977cat confdefs.h >>conftest.$ac_ext
25978cat >>conftest.$ac_ext <<_ACEOF
25979/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025980#include <readline/readline.h>
25981_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025982if { (ac_try="$ac_cpp conftest.$ac_ext"
25983case "(($ac_try" in
25984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25985 *) ac_try_echo=$ac_try;;
25986esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025988 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025989 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025990 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025991 rm -f conftest.er1
25992 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025994 (exit $ac_status); } >/dev/null && {
25995 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25996 test ! -s conftest.err
25997 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025998 have_readline=yes
25999else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026000 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026001sed 's/^/| /' conftest.$ac_ext >&5
26002
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026003 have_readline=no
26004fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026005
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026006rm -f conftest.err conftest.$ac_ext
26007if test $have_readline = yes
26008then
26009 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026010/* confdefs.h. */
26011_ACEOF
26012cat confdefs.h >>conftest.$ac_ext
26013cat >>conftest.$ac_ext <<_ACEOF
26014/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026015#include <readline/readline.h>
26016
26017_ACEOF
26018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000026019 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026020
26021cat >>confdefs.h <<\_ACEOF
26022#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
26023_ACEOF
26024
26025fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000026026rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000026027
26028 cat >conftest.$ac_ext <<_ACEOF
26029/* confdefs.h. */
26030_ACEOF
26031cat confdefs.h >>conftest.$ac_ext
26032cat >>conftest.$ac_ext <<_ACEOF
26033/* end confdefs.h. */
26034#include <readline/readline.h>
26035
26036_ACEOF
26037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26038 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
26039
26040cat >>confdefs.h <<\_ACEOF
26041#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
26042_ACEOF
26043
26044fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000026045rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026046
26047fi
26048
Martin v. Löwis0daad592001-09-30 21:09:59 +000026049# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026050{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
26051echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026052if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026053 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000026054else
Martin v. Löwis11437992002-04-12 09:54:03 +000026055 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026056LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026057cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026058/* confdefs.h. */
26059_ACEOF
26060cat confdefs.h >>conftest.$ac_ext
26061cat >>conftest.$ac_ext <<_ACEOF
26062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026063
Martin v. Löwiseba40652007-08-30 20:10:57 +000026064/* Override any GCC internal prototype to avoid an error.
26065 Use char because int might match the return type of a GCC
26066 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026067#ifdef __cplusplus
26068extern "C"
26069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026070char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026071int
26072main ()
26073{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026074return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026075 ;
26076 return 0;
26077}
26078_ACEOF
26079rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026080if { (ac_try="$ac_link"
26081case "(($ac_try" in
26082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26083 *) ac_try_echo=$ac_try;;
26084esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026086 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026087 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026088 grep -v '^ *+' conftest.er1 >conftest.err
26089 rm -f conftest.er1
26090 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026092 (exit $ac_status); } && {
26093 test -z "$ac_c_werror_flag" ||
26094 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026095 } && test -s conftest$ac_exeext &&
26096 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026097 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000026098else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026100sed 's/^/| /' conftest.$ac_ext >&5
26101
Martin v. Löwiseba40652007-08-30 20:10:57 +000026102 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000026103fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026104
26105rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026106 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026107LIBS=$ac_check_lib_save_LIBS
26108fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026109{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
26110echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
26111if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026112
Martin v. Löwis11437992002-04-12 09:54:03 +000026113cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026114#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026115_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026116
Martin v. Löwis0daad592001-09-30 21:09:59 +000026117fi
26118
Michael W. Hudson54241132001-12-07 15:38:26 +000026119
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026120# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026121{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
26122echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026123if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026124 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026125else
26126 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026127LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026128cat >conftest.$ac_ext <<_ACEOF
26129/* confdefs.h. */
26130_ACEOF
26131cat confdefs.h >>conftest.$ac_ext
26132cat >>conftest.$ac_ext <<_ACEOF
26133/* end confdefs.h. */
26134
26135/* Override any GCC internal prototype to avoid an error.
26136 Use char because int might match the return type of a GCC
26137 builtin and then its argument prototype would still apply. */
26138#ifdef __cplusplus
26139extern "C"
26140#endif
26141char rl_completion_display_matches_hook ();
26142int
26143main ()
26144{
26145return rl_completion_display_matches_hook ();
26146 ;
26147 return 0;
26148}
26149_ACEOF
26150rm -f conftest.$ac_objext conftest$ac_exeext
26151if { (ac_try="$ac_link"
26152case "(($ac_try" in
26153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26154 *) ac_try_echo=$ac_try;;
26155esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026157 (eval "$ac_link") 2>conftest.er1
26158 ac_status=$?
26159 grep -v '^ *+' conftest.er1 >conftest.err
26160 rm -f conftest.er1
26161 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026163 (exit $ac_status); } && {
26164 test -z "$ac_c_werror_flag" ||
26165 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026166 } && test -s conftest$ac_exeext &&
26167 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026168 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
26169else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026170 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026171sed 's/^/| /' conftest.$ac_ext >&5
26172
26173 ac_cv_lib_readline_rl_completion_display_matches_hook=no
26174fi
26175
26176rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26177 conftest$ac_exeext conftest.$ac_ext
26178LIBS=$ac_check_lib_save_LIBS
26179fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026180{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
26181echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
26182if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026183
26184cat >>confdefs.h <<\_ACEOF
26185#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
26186_ACEOF
26187
26188fi
26189
26190
Martin v. Löwis0daad592001-09-30 21:09:59 +000026191# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026192{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
26193echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026194if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026195 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000026196else
Martin v. Löwis11437992002-04-12 09:54:03 +000026197 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026198LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026199cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026200/* confdefs.h. */
26201_ACEOF
26202cat confdefs.h >>conftest.$ac_ext
26203cat >>conftest.$ac_ext <<_ACEOF
26204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026205
Martin v. Löwiseba40652007-08-30 20:10:57 +000026206/* Override any GCC internal prototype to avoid an error.
26207 Use char because int might match the return type of a GCC
26208 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026209#ifdef __cplusplus
26210extern "C"
26211#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026212char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026213int
26214main ()
26215{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026216return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026217 ;
26218 return 0;
26219}
26220_ACEOF
26221rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026222if { (ac_try="$ac_link"
26223case "(($ac_try" in
26224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26225 *) ac_try_echo=$ac_try;;
26226esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026228 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026229 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026230 grep -v '^ *+' conftest.er1 >conftest.err
26231 rm -f conftest.er1
26232 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026234 (exit $ac_status); } && {
26235 test -z "$ac_c_werror_flag" ||
26236 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026237 } && test -s conftest$ac_exeext &&
26238 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026239 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000026240else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026241 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026242sed 's/^/| /' conftest.$ac_ext >&5
26243
Martin v. Löwiseba40652007-08-30 20:10:57 +000026244 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000026245fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026246
26247rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026248 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026249LIBS=$ac_check_lib_save_LIBS
26250fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026251{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
26252echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
26253if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026254
Martin v. Löwis11437992002-04-12 09:54:03 +000026255cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026256#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026257_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026258
Guido van Rossum353ae582001-07-10 16:45:32 +000026259fi
26260
Jack Jansendd19cf82001-12-06 22:36:17 +000026261
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026262# also in readline 4.2
26263cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026264/* confdefs.h. */
26265_ACEOF
26266cat confdefs.h >>conftest.$ac_ext
26267cat >>conftest.$ac_ext <<_ACEOF
26268/* end confdefs.h. */
26269#include <readline/readline.h>
26270_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026271if { (ac_try="$ac_cpp conftest.$ac_ext"
26272case "(($ac_try" in
26273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26274 *) ac_try_echo=$ac_try;;
26275esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026277 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026278 ac_status=$?
26279 grep -v '^ *+' conftest.er1 >conftest.err
26280 rm -f conftest.er1
26281 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026283 (exit $ac_status); } >/dev/null && {
26284 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26285 test ! -s conftest.err
26286 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026287 have_readline=yes
26288else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026289 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026290sed 's/^/| /' conftest.$ac_ext >&5
26291
26292 have_readline=no
26293fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026294
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026295rm -f conftest.err conftest.$ac_ext
26296if test $have_readline = yes
26297then
26298 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026299/* confdefs.h. */
26300_ACEOF
26301cat confdefs.h >>conftest.$ac_ext
26302cat >>conftest.$ac_ext <<_ACEOF
26303/* end confdefs.h. */
26304#include <readline/readline.h>
26305
26306_ACEOF
26307if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26308 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26309
26310cat >>confdefs.h <<\_ACEOF
26311#define HAVE_RL_CATCH_SIGNAL 1
26312_ACEOF
26313
26314fi
Benjamin Peterson2c196742009-12-31 03:17:18 +000026315rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026316
26317fi
26318
Martin v. Löwis82bca632006-02-10 20:49:30 +000026319# End of readline checks: restore LIBS
26320LIBS=$LIBS_no_readline
26321
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026322{ echo "$as_me:$LINENO: checking for broken nice()" >&5
26323echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026324if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026325 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026326else
Martin v. Löwis11437992002-04-12 09:54:03 +000026327
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026328if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026329 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026330else
Martin v. Löwis11437992002-04-12 09:54:03 +000026331 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026332/* confdefs.h. */
26333_ACEOF
26334cat confdefs.h >>conftest.$ac_ext
26335cat >>conftest.$ac_ext <<_ACEOF
26336/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026337
26338int main()
26339{
26340 int val1 = nice(1);
26341 if (val1 != -1 && val1 == nice(2))
26342 exit(0);
26343 exit(1);
26344}
26345
Martin v. Löwis11437992002-04-12 09:54:03 +000026346_ACEOF
26347rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026348if { (ac_try="$ac_link"
26349case "(($ac_try" in
26350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26351 *) ac_try_echo=$ac_try;;
26352esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026354 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026355 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026357 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026358 { (case "(($ac_try" in
26359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26360 *) ac_try_echo=$ac_try;;
26361esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026363 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026364 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026366 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026367 ac_cv_broken_nice=yes
26368else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026369 echo "$as_me: program exited with status $ac_status" >&5
26370echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026371sed 's/^/| /' conftest.$ac_ext >&5
26372
Martin v. Löwis11437992002-04-12 09:54:03 +000026373( exit $ac_status )
26374ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026375fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026376rm -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 +000026377fi
26378
Martin v. Löwiseba40652007-08-30 20:10:57 +000026379
26380fi
26381
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026382{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26383echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026384if test "$ac_cv_broken_nice" = yes
26385then
Martin v. Löwis11437992002-04-12 09:54:03 +000026386
26387cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026388#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026389_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026390
26391fi
26392
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026393{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26394echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026395if test "${ac_cv_broken_poll+set}" = set; then
26396 echo $ECHO_N "(cached) $ECHO_C" >&6
26397else
26398 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026399 ac_cv_broken_poll=no
26400else
26401 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026402/* confdefs.h. */
26403_ACEOF
26404cat confdefs.h >>conftest.$ac_ext
26405cat >>conftest.$ac_ext <<_ACEOF
26406/* end confdefs.h. */
26407
26408#include <poll.h>
26409
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026410int main()
26411{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026412 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026413 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026414
26415 close (42);
26416
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026417 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026418 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026419 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026420 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026421 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026422 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026423 return 1;
26424}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026425
26426_ACEOF
26427rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026428if { (ac_try="$ac_link"
26429case "(($ac_try" in
26430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26431 *) ac_try_echo=$ac_try;;
26432esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026434 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026435 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026437 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026438 { (case "(($ac_try" in
26439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26440 *) ac_try_echo=$ac_try;;
26441esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026443 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026444 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026446 (exit $ac_status); }; }; then
26447 ac_cv_broken_poll=yes
26448else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026449 echo "$as_me: program exited with status $ac_status" >&5
26450echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026451sed 's/^/| /' conftest.$ac_ext >&5
26452
26453( exit $ac_status )
26454ac_cv_broken_poll=no
26455fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026456rm -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 +000026457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026458
26459
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026460fi
26461
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026462{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26463echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026464if test "$ac_cv_broken_poll" = yes
26465then
26466
26467cat >>confdefs.h <<\_ACEOF
26468#define HAVE_BROKEN_POLL 1
26469_ACEOF
26470
26471fi
26472
Brett Cannon43802422005-02-10 20:48:03 +000026473# 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 +000026474# (which is not required by ISO C or UNIX spec) and/or if we support
26475# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026476{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26477echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026478if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026479 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026480else
26481 cat >conftest.$ac_ext <<_ACEOF
26482/* confdefs.h. */
26483_ACEOF
26484cat confdefs.h >>conftest.$ac_ext
26485cat >>conftest.$ac_ext <<_ACEOF
26486/* end confdefs.h. */
26487#include <sys/types.h>
26488#include <$ac_cv_struct_tm>
26489
26490
26491int
26492main ()
26493{
26494static struct tm ac_aggr;
26495if (ac_aggr.tm_zone)
26496return 0;
26497 ;
26498 return 0;
26499}
26500_ACEOF
26501rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026502if { (ac_try="$ac_compile"
26503case "(($ac_try" in
26504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26505 *) ac_try_echo=$ac_try;;
26506esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026508 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026509 ac_status=$?
26510 grep -v '^ *+' conftest.er1 >conftest.err
26511 rm -f conftest.er1
26512 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026514 (exit $ac_status); } && {
26515 test -z "$ac_c_werror_flag" ||
26516 test ! -s conftest.err
26517 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026518 ac_cv_member_struct_tm_tm_zone=yes
26519else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026520 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026521sed 's/^/| /' conftest.$ac_ext >&5
26522
Martin v. Löwiseba40652007-08-30 20:10:57 +000026523 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026524/* confdefs.h. */
26525_ACEOF
26526cat confdefs.h >>conftest.$ac_ext
26527cat >>conftest.$ac_ext <<_ACEOF
26528/* end confdefs.h. */
26529#include <sys/types.h>
26530#include <$ac_cv_struct_tm>
26531
26532
26533int
26534main ()
26535{
26536static struct tm ac_aggr;
26537if (sizeof ac_aggr.tm_zone)
26538return 0;
26539 ;
26540 return 0;
26541}
26542_ACEOF
26543rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026544if { (ac_try="$ac_compile"
26545case "(($ac_try" in
26546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26547 *) ac_try_echo=$ac_try;;
26548esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026550 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026551 ac_status=$?
26552 grep -v '^ *+' conftest.er1 >conftest.err
26553 rm -f conftest.er1
26554 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026556 (exit $ac_status); } && {
26557 test -z "$ac_c_werror_flag" ||
26558 test ! -s conftest.err
26559 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026560 ac_cv_member_struct_tm_tm_zone=yes
26561else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026562 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026563sed 's/^/| /' conftest.$ac_ext >&5
26564
Martin v. Löwiseba40652007-08-30 20:10:57 +000026565 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026566fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026567
26568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026570
26571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026572fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026573{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26574echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26575if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026576
26577cat >>confdefs.h <<_ACEOF
26578#define HAVE_STRUCT_TM_TM_ZONE 1
26579_ACEOF
26580
26581
26582fi
26583
26584if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26585
26586cat >>confdefs.h <<\_ACEOF
26587#define HAVE_TM_ZONE 1
26588_ACEOF
26589
26590else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026591 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26592echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000026593if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026594 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000026595else
26596 cat >conftest.$ac_ext <<_ACEOF
26597/* confdefs.h. */
26598_ACEOF
26599cat confdefs.h >>conftest.$ac_ext
26600cat >>conftest.$ac_ext <<_ACEOF
26601/* end confdefs.h. */
26602#include <time.h>
26603
26604int
26605main ()
26606{
26607#ifndef tzname
26608 (void) tzname;
26609#endif
26610
26611 ;
26612 return 0;
26613}
26614_ACEOF
26615rm -f conftest.$ac_objext
26616if { (ac_try="$ac_compile"
26617case "(($ac_try" in
26618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26619 *) ac_try_echo=$ac_try;;
26620esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026622 (eval "$ac_compile") 2>conftest.er1
26623 ac_status=$?
26624 grep -v '^ *+' conftest.er1 >conftest.err
26625 rm -f conftest.er1
26626 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026628 (exit $ac_status); } && {
26629 test -z "$ac_c_werror_flag" ||
26630 test ! -s conftest.err
26631 } && test -s conftest.$ac_objext; then
26632 ac_cv_have_decl_tzname=yes
26633else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026634 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026635sed 's/^/| /' conftest.$ac_ext >&5
26636
26637 ac_cv_have_decl_tzname=no
26638fi
26639
26640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26641fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026642{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26643echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26644if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026645
26646cat >>confdefs.h <<_ACEOF
26647#define HAVE_DECL_TZNAME 1
26648_ACEOF
26649
26650
26651else
26652 cat >>confdefs.h <<_ACEOF
26653#define HAVE_DECL_TZNAME 0
26654_ACEOF
26655
26656
26657fi
26658
26659
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026660 { echo "$as_me:$LINENO: checking for tzname" >&5
26661echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026662if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026663 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026664else
26665 cat >conftest.$ac_ext <<_ACEOF
26666/* confdefs.h. */
26667_ACEOF
26668cat confdefs.h >>conftest.$ac_ext
26669cat >>conftest.$ac_ext <<_ACEOF
26670/* end confdefs.h. */
26671#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000026672#if !HAVE_DECL_TZNAME
26673extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026674#endif
26675
26676int
26677main ()
26678{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026679return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026680 ;
26681 return 0;
26682}
26683_ACEOF
26684rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026685if { (ac_try="$ac_link"
26686case "(($ac_try" in
26687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26688 *) ac_try_echo=$ac_try;;
26689esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026691 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026692 ac_status=$?
26693 grep -v '^ *+' conftest.er1 >conftest.err
26694 rm -f conftest.er1
26695 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026697 (exit $ac_status); } && {
26698 test -z "$ac_c_werror_flag" ||
26699 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026700 } && test -s conftest$ac_exeext &&
26701 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026702 ac_cv_var_tzname=yes
26703else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026704 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026705sed 's/^/| /' conftest.$ac_ext >&5
26706
Martin v. Löwiseba40652007-08-30 20:10:57 +000026707 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026708fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026709
26710rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026711 conftest$ac_exeext conftest.$ac_ext
26712fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026713{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26714echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026715 if test $ac_cv_var_tzname = yes; then
26716
26717cat >>confdefs.h <<\_ACEOF
26718#define HAVE_TZNAME 1
26719_ACEOF
26720
26721 fi
26722fi
26723
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026724
Martin v. Löwis1d459062005-03-14 21:23:33 +000026725# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026726{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26727echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026728if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026729 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026730else
26731
26732if test "$cross_compiling" = yes; then
26733 ac_cv_working_tzset=no
26734else
26735 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026736/* confdefs.h. */
26737_ACEOF
26738cat confdefs.h >>conftest.$ac_ext
26739cat >>conftest.$ac_ext <<_ACEOF
26740/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026741
26742#include <stdlib.h>
26743#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026744#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026745
26746#if HAVE_TZNAME
26747extern char *tzname[];
26748#endif
26749
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026750int main()
26751{
Brett Cannon18367812003-09-19 00:59:16 +000026752 /* Note that we need to ensure that not only does tzset(3)
26753 do 'something' with localtime, but it works as documented
26754 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026755 This includes making sure that tzname is set properly if
26756 tm->tm_zone does not exist since it is the alternative way
26757 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026758
26759 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026760 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026761 */
26762
Martin v. Löwis1d459062005-03-14 21:23:33 +000026763 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026764 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26765
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026766 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026767 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026768 if (localtime(&groundhogday)->tm_hour != 0)
26769 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026770#if HAVE_TZNAME
26771 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26772 if (strcmp(tzname[0], "UTC") ||
26773 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26774 exit(1);
26775#endif
Brett Cannon18367812003-09-19 00:59:16 +000026776
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026777 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026778 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026779 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026780 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026781#if HAVE_TZNAME
26782 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26783 exit(1);
26784#endif
Brett Cannon18367812003-09-19 00:59:16 +000026785
26786 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26787 tzset();
26788 if (localtime(&groundhogday)->tm_hour != 11)
26789 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026790#if HAVE_TZNAME
26791 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26792 exit(1);
26793#endif
26794
26795#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026796 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26797 exit(1);
26798 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26799 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026800#endif
Brett Cannon18367812003-09-19 00:59:16 +000026801
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026802 exit(0);
26803}
26804
26805_ACEOF
26806rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026807if { (ac_try="$ac_link"
26808case "(($ac_try" in
26809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26810 *) ac_try_echo=$ac_try;;
26811esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026813 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026814 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026816 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026817 { (case "(($ac_try" in
26818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26819 *) ac_try_echo=$ac_try;;
26820esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026822 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026823 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026825 (exit $ac_status); }; }; then
26826 ac_cv_working_tzset=yes
26827else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026828 echo "$as_me: program exited with status $ac_status" >&5
26829echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026830sed 's/^/| /' conftest.$ac_ext >&5
26831
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026832( exit $ac_status )
26833ac_cv_working_tzset=no
26834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026835rm -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 +000026836fi
26837
Martin v. Löwiseba40652007-08-30 20:10:57 +000026838
26839fi
26840
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026841{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26842echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026843if test "$ac_cv_working_tzset" = yes
26844then
26845
26846cat >>confdefs.h <<\_ACEOF
26847#define HAVE_WORKING_TZSET 1
26848_ACEOF
26849
26850fi
26851
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026852# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026853{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26854echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026855if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026856 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026857else
26858 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026859/* confdefs.h. */
26860_ACEOF
26861cat confdefs.h >>conftest.$ac_ext
26862cat >>conftest.$ac_ext <<_ACEOF
26863/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026864#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026865int
26866main ()
26867{
26868
26869struct stat st;
26870st.st_mtim.tv_nsec = 1;
26871
26872 ;
26873 return 0;
26874}
26875_ACEOF
26876rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026877if { (ac_try="$ac_compile"
26878case "(($ac_try" in
26879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26880 *) ac_try_echo=$ac_try;;
26881esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026883 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026884 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026885 grep -v '^ *+' conftest.er1 >conftest.err
26886 rm -f conftest.er1
26887 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026889 (exit $ac_status); } && {
26890 test -z "$ac_c_werror_flag" ||
26891 test ! -s conftest.err
26892 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026893 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026894else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026896sed 's/^/| /' conftest.$ac_ext >&5
26897
Martin v. Löwiseba40652007-08-30 20:10:57 +000026898 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026899fi
26900
Martin v. Löwiseba40652007-08-30 20:10:57 +000026901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26902fi
26903
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026904{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26905echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026906if test "$ac_cv_stat_tv_nsec" = yes
26907then
26908
26909cat >>confdefs.h <<\_ACEOF
26910#define HAVE_STAT_TV_NSEC 1
26911_ACEOF
26912
26913fi
26914
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026915# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026916{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26917echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026918if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026919 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026920else
26921 cat >conftest.$ac_ext <<_ACEOF
26922/* confdefs.h. */
26923_ACEOF
26924cat confdefs.h >>conftest.$ac_ext
26925cat >>conftest.$ac_ext <<_ACEOF
26926/* end confdefs.h. */
26927#include <sys/stat.h>
26928int
26929main ()
26930{
26931
26932struct stat st;
26933st.st_mtimespec.tv_nsec = 1;
26934
26935 ;
26936 return 0;
26937}
26938_ACEOF
26939rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026940if { (ac_try="$ac_compile"
26941case "(($ac_try" in
26942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26943 *) ac_try_echo=$ac_try;;
26944esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026946 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026947 ac_status=$?
26948 grep -v '^ *+' conftest.er1 >conftest.err
26949 rm -f conftest.er1
26950 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026952 (exit $ac_status); } && {
26953 test -z "$ac_c_werror_flag" ||
26954 test ! -s conftest.err
26955 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026956 ac_cv_stat_tv_nsec2=yes
26957else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026958 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026959sed 's/^/| /' conftest.$ac_ext >&5
26960
Martin v. Löwiseba40652007-08-30 20:10:57 +000026961 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026962fi
26963
Martin v. Löwiseba40652007-08-30 20:10:57 +000026964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26965fi
26966
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026967{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26968echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026969if test "$ac_cv_stat_tv_nsec2" = yes
26970then
26971
26972cat >>confdefs.h <<\_ACEOF
26973#define HAVE_STAT_TV_NSEC2 1
26974_ACEOF
26975
26976fi
26977
Jack Jansen666b1e72001-10-31 12:11:48 +000026978# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026979{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26980echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026981if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026982 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026983else
Martin v. Löwis11437992002-04-12 09:54:03 +000026984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026985/* confdefs.h. */
26986_ACEOF
26987cat confdefs.h >>conftest.$ac_ext
26988cat >>conftest.$ac_ext <<_ACEOF
26989/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026990#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026991int
26992main ()
26993{
Jack Jansen666b1e72001-10-31 12:11:48 +000026994
26995 int rtn;
26996 rtn = mvwdelch(0,0,0);
26997
Martin v. Löwis11437992002-04-12 09:54:03 +000026998 ;
26999 return 0;
27000}
27001_ACEOF
27002rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027003if { (ac_try="$ac_compile"
27004case "(($ac_try" in
27005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27006 *) ac_try_echo=$ac_try;;
27007esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027009 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027010 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027011 grep -v '^ *+' conftest.er1 >conftest.err
27012 rm -f conftest.er1
27013 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027015 (exit $ac_status); } && {
27016 test -z "$ac_c_werror_flag" ||
27017 test ! -s conftest.err
27018 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027019 ac_cv_mvwdelch_is_expression=yes
27020else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027022sed 's/^/| /' conftest.$ac_ext >&5
27023
Martin v. Löwiseba40652007-08-30 20:10:57 +000027024 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027025fi
27026
Martin v. Löwiseba40652007-08-30 20:10:57 +000027027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27028fi
27029
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027030{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
27031echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000027032
27033if test "$ac_cv_mvwdelch_is_expression" = yes
27034then
Martin v. Löwis11437992002-04-12 09:54:03 +000027035
27036cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027037#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027038_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027039
27040fi
27041
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027042{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
27043echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027044if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027045 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027046else
Martin v. Löwis11437992002-04-12 09:54:03 +000027047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027048/* confdefs.h. */
27049_ACEOF
27050cat confdefs.h >>conftest.$ac_ext
27051cat >>conftest.$ac_ext <<_ACEOF
27052/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027053#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027054int
27055main ()
27056{
Jack Jansen666b1e72001-10-31 12:11:48 +000027057
27058 WINDOW *w;
27059 w->_flags = 0;
27060
Martin v. Löwis11437992002-04-12 09:54:03 +000027061 ;
27062 return 0;
27063}
27064_ACEOF
27065rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027066if { (ac_try="$ac_compile"
27067case "(($ac_try" in
27068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27069 *) ac_try_echo=$ac_try;;
27070esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027072 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027073 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027074 grep -v '^ *+' conftest.er1 >conftest.err
27075 rm -f conftest.er1
27076 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027078 (exit $ac_status); } && {
27079 test -z "$ac_c_werror_flag" ||
27080 test ! -s conftest.err
27081 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027082 ac_cv_window_has_flags=yes
27083else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027085sed 's/^/| /' conftest.$ac_ext >&5
27086
Martin v. Löwiseba40652007-08-30 20:10:57 +000027087 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027088fi
27089
Martin v. Löwiseba40652007-08-30 20:10:57 +000027090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27091fi
27092
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027093{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
27094echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027095
Jack Jansen666b1e72001-10-31 12:11:48 +000027096
27097if test "$ac_cv_window_has_flags" = yes
27098then
Martin v. Löwis11437992002-04-12 09:54:03 +000027099
27100cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027101#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027102_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027103
27104fi
27105
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027106{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
27107echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027108cat >conftest.$ac_ext <<_ACEOF
27109/* confdefs.h. */
27110_ACEOF
27111cat confdefs.h >>conftest.$ac_ext
27112cat >>conftest.$ac_ext <<_ACEOF
27113/* end confdefs.h. */
27114#include <curses.h>
27115int
27116main ()
27117{
27118void *x=is_term_resized
27119 ;
27120 return 0;
27121}
27122_ACEOF
27123rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027124if { (ac_try="$ac_compile"
27125case "(($ac_try" in
27126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27127 *) ac_try_echo=$ac_try;;
27128esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027130 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027131 ac_status=$?
27132 grep -v '^ *+' conftest.er1 >conftest.err
27133 rm -f conftest.er1
27134 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027136 (exit $ac_status); } && {
27137 test -z "$ac_c_werror_flag" ||
27138 test ! -s conftest.err
27139 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027140
27141cat >>confdefs.h <<\_ACEOF
27142#define HAVE_CURSES_IS_TERM_RESIZED 1
27143_ACEOF
27144
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027145 { echo "$as_me:$LINENO: result: yes" >&5
27146echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027147else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027148 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027149sed 's/^/| /' conftest.$ac_ext >&5
27150
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027151 { echo "$as_me:$LINENO: result: no" >&5
27152echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027153
27154fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027155
Martin v. Löwiseba40652007-08-30 20:10:57 +000027156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27157
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027158{ echo "$as_me:$LINENO: checking for resize_term" >&5
27159echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027160cat >conftest.$ac_ext <<_ACEOF
27161/* confdefs.h. */
27162_ACEOF
27163cat confdefs.h >>conftest.$ac_ext
27164cat >>conftest.$ac_ext <<_ACEOF
27165/* end confdefs.h. */
27166#include <curses.h>
27167int
27168main ()
27169{
27170void *x=resize_term
27171 ;
27172 return 0;
27173}
27174_ACEOF
27175rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027176if { (ac_try="$ac_compile"
27177case "(($ac_try" in
27178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27179 *) ac_try_echo=$ac_try;;
27180esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027182 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027183 ac_status=$?
27184 grep -v '^ *+' conftest.er1 >conftest.err
27185 rm -f conftest.er1
27186 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027188 (exit $ac_status); } && {
27189 test -z "$ac_c_werror_flag" ||
27190 test ! -s conftest.err
27191 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027192
27193cat >>confdefs.h <<\_ACEOF
27194#define HAVE_CURSES_RESIZE_TERM 1
27195_ACEOF
27196
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027197 { echo "$as_me:$LINENO: result: yes" >&5
27198echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027199else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027200 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027201sed 's/^/| /' conftest.$ac_ext >&5
27202
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027203 { echo "$as_me:$LINENO: result: no" >&5
27204echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027205
27206fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027207
Martin v. Löwiseba40652007-08-30 20:10:57 +000027208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27209
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027210{ echo "$as_me:$LINENO: checking for resizeterm" >&5
27211echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027212cat >conftest.$ac_ext <<_ACEOF
27213/* confdefs.h. */
27214_ACEOF
27215cat confdefs.h >>conftest.$ac_ext
27216cat >>conftest.$ac_ext <<_ACEOF
27217/* end confdefs.h. */
27218#include <curses.h>
27219int
27220main ()
27221{
27222void *x=resizeterm
27223 ;
27224 return 0;
27225}
27226_ACEOF
27227rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027228if { (ac_try="$ac_compile"
27229case "(($ac_try" in
27230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27231 *) ac_try_echo=$ac_try;;
27232esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027234 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027235 ac_status=$?
27236 grep -v '^ *+' conftest.er1 >conftest.err
27237 rm -f conftest.er1
27238 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027240 (exit $ac_status); } && {
27241 test -z "$ac_c_werror_flag" ||
27242 test ! -s conftest.err
27243 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027244
27245cat >>confdefs.h <<\_ACEOF
27246#define HAVE_CURSES_RESIZETERM 1
27247_ACEOF
27248
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027249 { echo "$as_me:$LINENO: result: yes" >&5
27250echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027251else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027252 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027253sed 's/^/| /' conftest.$ac_ext >&5
27254
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027255 { echo "$as_me:$LINENO: result: no" >&5
27256echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027257
27258fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027259
Martin v. Löwiseba40652007-08-30 20:10:57 +000027260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27261
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027262{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
27263echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027264
27265if test -r /dev/ptmx
27266then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027267 { echo "$as_me:$LINENO: result: yes" >&5
27268echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027269
27270cat >>confdefs.h <<\_ACEOF
27271#define HAVE_DEV_PTMX 1
27272_ACEOF
27273
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027274else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027275 { echo "$as_me:$LINENO: result: no" >&5
27276echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027277fi
27278
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027279{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
27280echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027281
27282if test -r /dev/ptc
27283then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027284 { echo "$as_me:$LINENO: result: yes" >&5
27285echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027286
27287cat >>confdefs.h <<\_ACEOF
27288#define HAVE_DEV_PTC 1
27289_ACEOF
27290
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027291else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027292 { echo "$as_me:$LINENO: result: no" >&5
27293echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027294fi
27295
Mark Dickinson82864d12009-11-15 16:18:58 +000027296if test "$have_long_long" = yes
27297then
27298 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
27299echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
27300 if test "${ac_cv_have_long_long_format+set}" = set; then
27301 echo $ECHO_N "(cached) $ECHO_C" >&6
27302else
27303 if test "$cross_compiling" = yes; then
27304 ac_cv_have_long_long_format=no
27305else
27306 cat >conftest.$ac_ext <<_ACEOF
27307/* confdefs.h. */
27308_ACEOF
27309cat confdefs.h >>conftest.$ac_ext
27310cat >>conftest.$ac_ext <<_ACEOF
27311/* end confdefs.h. */
27312
27313 #include <stdio.h>
27314 #include <stddef.h>
27315 #include <string.h>
27316
27317 #ifdef HAVE_SYS_TYPES_H
27318 #include <sys/types.h>
27319 #endif
27320
27321 int main()
27322 {
27323 char buffer[256];
27324
27325 if (sprintf(buffer, "%lld", (long long)123) < 0)
27326 return 1;
27327 if (strcmp(buffer, "123"))
27328 return 1;
27329
27330 if (sprintf(buffer, "%lld", (long long)-123) < 0)
27331 return 1;
27332 if (strcmp(buffer, "-123"))
27333 return 1;
27334
27335 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
27336 return 1;
27337 if (strcmp(buffer, "123"))
27338 return 1;
27339
27340 return 0;
27341 }
27342
27343_ACEOF
27344rm -f conftest$ac_exeext
27345if { (ac_try="$ac_link"
27346case "(($ac_try" in
27347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27348 *) ac_try_echo=$ac_try;;
27349esac
27350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27351 (eval "$ac_link") 2>&5
27352 ac_status=$?
27353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27354 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27355 { (case "(($ac_try" in
27356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27357 *) ac_try_echo=$ac_try;;
27358esac
27359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27360 (eval "$ac_try") 2>&5
27361 ac_status=$?
27362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27363 (exit $ac_status); }; }; then
27364 ac_cv_have_long_long_format=yes
27365else
27366 echo "$as_me: program exited with status $ac_status" >&5
27367echo "$as_me: failed program was:" >&5
27368sed 's/^/| /' conftest.$ac_ext >&5
27369
27370( exit $ac_status )
27371ac_cv_have_long_long_format=no
27372fi
27373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27374fi
27375
27376
27377
27378fi
27379
27380 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27381echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27382fi
27383
Mark Dickinson5ce84742009-12-31 20:48:04 +000027384if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000027385then
27386
27387cat >>confdefs.h <<\_ACEOF
27388#define PY_FORMAT_LONG_LONG "ll"
27389_ACEOF
27390
27391fi
27392
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000027393if test $ac_sys_system = Darwin
27394then
27395 LIBS="$LIBS -framework CoreFoundation"
27396fi
27397
Mark Dickinson82864d12009-11-15 16:18:58 +000027398
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027399{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27400echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027401if test "${ac_cv_have_size_t_format+set}" = set; then
27402 echo $ECHO_N "(cached) $ECHO_C" >&6
27403else
27404 if test "$cross_compiling" = yes; then
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027405 ac_cv_have_size_t_format="cross -- assuming yes"
27406
Brett Cannon09d12362006-05-11 05:11:33 +000027407else
27408 cat >conftest.$ac_ext <<_ACEOF
27409/* confdefs.h. */
27410_ACEOF
27411cat confdefs.h >>conftest.$ac_ext
27412cat >>conftest.$ac_ext <<_ACEOF
27413/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027414
Brett Cannon09d12362006-05-11 05:11:33 +000027415#include <stdio.h>
27416#include <stddef.h>
27417#include <string.h>
27418
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027419#ifdef HAVE_SYS_TYPES_H
27420#include <sys/types.h>
27421#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027422
27423#ifdef HAVE_SSIZE_T
27424typedef ssize_t Py_ssize_t;
27425#elif SIZEOF_VOID_P == SIZEOF_LONG
27426typedef long Py_ssize_t;
27427#else
27428typedef int Py_ssize_t;
27429#endif
Brett Cannon09d12362006-05-11 05:11:33 +000027430
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027431int main()
27432{
27433 char buffer[256];
27434
Brett Cannon09d12362006-05-11 05:11:33 +000027435 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27436 return 1;
27437
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027438 if (strcmp(buffer, "123"))
27439 return 1;
27440
27441 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27442 return 1;
27443
27444 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000027445 return 1;
27446
27447 return 0;
27448}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027449
Brett Cannon09d12362006-05-11 05:11:33 +000027450_ACEOF
27451rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027452if { (ac_try="$ac_link"
27453case "(($ac_try" in
27454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27455 *) ac_try_echo=$ac_try;;
27456esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027458 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027459 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027461 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027462 { (case "(($ac_try" in
27463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27464 *) ac_try_echo=$ac_try;;
27465esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027467 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027468 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027470 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027471 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027472else
27473 echo "$as_me: program exited with status $ac_status" >&5
27474echo "$as_me: failed program was:" >&5
27475sed 's/^/| /' conftest.$ac_ext >&5
27476
27477( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027478ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027479fi
27480rm -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 +000027481fi
27482
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027483
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027484fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027485{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27486echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027487if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027488
27489cat >>confdefs.h <<\_ACEOF
27490#define PY_FORMAT_SIZE_T "z"
27491_ACEOF
27492
27493fi
27494
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027495{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27496echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027497if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027498 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027499else
Martin v. Löwis11437992002-04-12 09:54:03 +000027500 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027501/* confdefs.h. */
27502_ACEOF
27503cat confdefs.h >>conftest.$ac_ext
27504cat >>conftest.$ac_ext <<_ACEOF
27505/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027506
27507#ifdef HAVE_SYS_TYPES_H
27508#include <sys/types.h>
27509#endif
27510#ifdef HAVE_SYS_SOCKET_H
27511#include <sys/socket.h>
27512#endif
27513
27514
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027515typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027516int
27517main ()
27518{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027519if ((ac__type_new_ *) 0)
27520 return 0;
27521if (sizeof (ac__type_new_))
27522 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027523 ;
27524 return 0;
27525}
27526_ACEOF
27527rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027528if { (ac_try="$ac_compile"
27529case "(($ac_try" in
27530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27531 *) ac_try_echo=$ac_try;;
27532esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027534 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027535 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027536 grep -v '^ *+' conftest.er1 >conftest.err
27537 rm -f conftest.er1
27538 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027540 (exit $ac_status); } && {
27541 test -z "$ac_c_werror_flag" ||
27542 test ! -s conftest.err
27543 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027544 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027545else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027547sed 's/^/| /' conftest.$ac_ext >&5
27548
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027549 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027550fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027551
27552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027553fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027554{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27555echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27556if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027557 :
27558else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027559
Martin v. Löwis01c04012002-11-11 14:58:44 +000027560cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027561#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027562_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027563
27564fi
27565
Michael W. Hudson54241132001-12-07 15:38:26 +000027566
Michael W. Hudson54241132001-12-07 15:38:26 +000027567
27568
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027569for h in `(cd $srcdir;echo Python/thread_*.h)`
27570do
27571 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27572done
27573
Michael W. Hudson54241132001-12-07 15:38:26 +000027574
Neal Norwitzd24499d2005-12-18 21:36:39 +000027575SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027576{ echo "$as_me:$LINENO: checking for build directories" >&5
27577echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027578for dir in $SRCDIRS; do
27579 if test ! -d $dir; then
27580 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027581 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027582done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027583{ echo "$as_me:$LINENO: result: done" >&5
27584echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027585
Guido van Rossum627b2d71993-12-24 10:39:16 +000027586# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027587ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027588
Martin v. Löwis11437992002-04-12 09:54:03 +000027589cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027590# This file is a shell script that caches the results of configure
27591# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027592# scripts and configure runs, see configure's option --config-cache.
27593# It is not useful on other systems. If it contains results you don't
27594# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027595#
Martin v. Löwis11437992002-04-12 09:54:03 +000027596# config.status only pays attention to the cache file if you give it
27597# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027598#
Skip Montanaro6dead952003-09-25 14:50:04 +000027599# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027600# loading this file, other *unset* `ac_cv_foo' will be assigned the
27601# following values.
27602
27603_ACEOF
27604
Guido van Rossumf78abae1997-01-21 22:02:36 +000027605# The following way of writing the cache mishandles newlines in values,
27606# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027607# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027608# Ultrix sh set writes to stderr and can't be redirected directly,
27609# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027610(
27611 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27612 eval ac_val=\$$ac_var
27613 case $ac_val in #(
27614 *${as_nl}*)
27615 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027616 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27617echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027618 esac
27619 case $ac_var in #(
27620 _ | IFS | as_nl) ;; #(
27621 *) $as_unset $ac_var ;;
27622 esac ;;
27623 esac
27624 done
27625
Martin v. Löwis11437992002-04-12 09:54:03 +000027626 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027627 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27628 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027629 # `set' does not quote correctly, so add quotes (double-quote
27630 # substitution turns \\\\ into \\, and sed turns \\ into \).
27631 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027632 "s/'/'\\\\''/g;
27633 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027634 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027635 *)
27636 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027637 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027638 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027639 esac |
27640 sort
27641) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027642 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027643 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027644 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000027645 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027646 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27647 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027648 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27649 :end' >>confcache
27650if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27651 if test -w "$cache_file"; then
27652 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027653 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27654echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027655 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027656 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027657 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27658echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027659 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027660fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027661rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027662
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027663test "x$prefix" = xNONE && prefix=$ac_default_prefix
27664# Let make expand exec_prefix.
27665test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027666
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027667DEFS=-DHAVE_CONFIG_H
27668
Skip Montanaro6dead952003-09-25 14:50:04 +000027669ac_libobjs=
27670ac_ltlibobjs=
27671for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27672 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027673 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027674 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027675 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27676 # will be set to the directory where LIBOBJS objects are built.
27677 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27678 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027679done
27680LIBOBJS=$ac_libobjs
27681
27682LTLIBOBJS=$ac_ltlibobjs
27683
27684
Martin v. Löwis11437992002-04-12 09:54:03 +000027685
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027686: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027687ac_clean_files_save=$ac_clean_files
27688ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027689{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27690echo "$as_me: creating $CONFIG_STATUS" >&6;}
27691cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027692#! $SHELL
27693# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027694# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027695# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027696# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027697
Martin v. Löwis11437992002-04-12 09:54:03 +000027698debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027699ac_cs_recheck=false
27700ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027701SHELL=\${CONFIG_SHELL-$SHELL}
27702_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027703
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027704cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027705## --------------------- ##
27706## M4sh Initialization. ##
27707## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027708
Martin v. Löwiseba40652007-08-30 20:10:57 +000027709# Be more Bourne compatible
27710DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027711if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27712 emulate sh
27713 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027714 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027715 # is contrary to our usage. Disable this feature.
27716 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027717 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027718else
Martin v. Löwiseba40652007-08-30 20:10:57 +000027719 case `(set -o) 2>/dev/null` in
27720 *posix*) set -o posix ;;
27721esac
27722
Martin v. Löwis11437992002-04-12 09:54:03 +000027723fi
Michael W. Hudson54241132001-12-07 15:38:26 +000027724
Skip Montanaro6dead952003-09-25 14:50:04 +000027725
Martin v. Löwis11437992002-04-12 09:54:03 +000027726
27727
Martin v. Löwiseba40652007-08-30 20:10:57 +000027728# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027729# Avoid depending upon Character Ranges.
27730as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27731as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27732as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27733as_cr_digits='0123456789'
27734as_cr_alnum=$as_cr_Letters$as_cr_digits
27735
27736# The user is always right.
27737if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027738 echo "#! /bin/sh" >conf$$.sh
27739 echo "exit 0" >>conf$$.sh
27740 chmod +x conf$$.sh
27741 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27742 PATH_SEPARATOR=';'
27743 else
27744 PATH_SEPARATOR=:
27745 fi
27746 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027747fi
27748
Martin v. Löwiseba40652007-08-30 20:10:57 +000027749# Support unset when possible.
27750if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27751 as_unset=unset
27752else
27753 as_unset=false
27754fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027755
Martin v. Löwiseba40652007-08-30 20:10:57 +000027756
27757# IFS
27758# We need space, tab and new line, in precisely that order. Quoting is
27759# there to prevent editors from complaining about space-tab.
27760# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27761# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027762as_nl='
27763'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027764IFS=" "" $as_nl"
27765
27766# Find who we are. Look in the path if we contain no directory separator.
27767case $0 in
27768 *[\\/]* ) as_myself=$0 ;;
27769 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027770for as_dir in $PATH
27771do
27772 IFS=$as_save_IFS
27773 test -z "$as_dir" && as_dir=.
27774 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27775done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027776IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027777
Martin v. Löwiseba40652007-08-30 20:10:57 +000027778 ;;
27779esac
27780# We did not find ourselves, most probably we were run as `sh COMMAND'
27781# in which case we are not to be found in the path.
27782if test "x$as_myself" = x; then
27783 as_myself=$0
27784fi
27785if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027786 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000027787 { (exit 1); exit 1; }
27788fi
27789
27790# Work around bugs in pre-3.0 UWIN ksh.
27791for as_var in ENV MAIL MAILPATH
27792do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27793done
27794PS1='$ '
27795PS2='> '
27796PS4='+ '
27797
27798# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027799for as_var in \
27800 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27801 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27802 LC_TELEPHONE LC_TIME
27803do
27804 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27805 eval $as_var=C; export $as_var
27806 else
27807 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27808 fi
27809done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027810
27811# Required to use basename.
27812if expr a : '\(a\)' >/dev/null 2>&1 &&
27813 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27814 as_expr=expr
27815else
27816 as_expr=false
27817fi
27818
27819if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27820 as_basename=basename
27821else
27822 as_basename=false
27823fi
27824
27825
27826# Name of the executable.
27827as_me=`$as_basename -- "$0" ||
27828$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27829 X"$0" : 'X\(//\)$' \| \
27830 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027831echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027832 sed '/^.*\/\([^/][^/]*\)\/*$/{
27833 s//\1/
27834 q
27835 }
27836 /^X\/\(\/\/\)$/{
27837 s//\1/
27838 q
27839 }
27840 /^X\/\(\/\).*/{
27841 s//\1/
27842 q
27843 }
27844 s/.*/./; q'`
27845
27846# CDPATH.
27847$as_unset CDPATH
27848
27849
27850
Martin v. Löwis11437992002-04-12 09:54:03 +000027851 as_lineno_1=$LINENO
27852 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027853 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000027854 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027855
Martin v. Löwis11437992002-04-12 09:54:03 +000027856 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27857 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000027858 # line-number line after each line using $LINENO; the second 'sed'
27859 # does the real work. The second script uses 'N' to pair each
27860 # line-number line with the line containing $LINENO, and appends
27861 # trailing '-' during substitution so that $LINENO is not a special
27862 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027863 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000027864 # scripts with optimization help from Paolo Bonzini. Blame Lee
27865 # E. McMahon (1931-1989) for sed's syntax. :-)
27866 sed -n '
27867 p
27868 /[$]LINENO/=
27869 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027870 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027871 s/[$]LINENO.*/&-/
27872 t lineno
27873 b
27874 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027875 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000027876 :loop
27877 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027878 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000027879 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027880 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000027881 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027882 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027883 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027884
Martin v. Löwis11437992002-04-12 09:54:03 +000027885 # Don't try to exec as it changes $[0], causing all sort of problems
27886 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000027887 # original and so on. Autoconf is especially sensitive to this).
27888 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027889 # Exit status is that of the last command.
27890 exit
27891}
27892
27893
Martin v. Löwiseba40652007-08-30 20:10:57 +000027894if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27895 as_dirname=dirname
27896else
27897 as_dirname=false
27898fi
27899
27900ECHO_C= ECHO_N= ECHO_T=
27901case `echo -n x` in
27902-n*)
27903 case `echo 'x\c'` in
27904 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27905 *) ECHO_C='\c';;
27906 esac;;
27907*)
27908 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027909esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027910
Martin v. Löwiseba40652007-08-30 20:10:57 +000027911if expr a : '\(a\)' >/dev/null 2>&1 &&
27912 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027913 as_expr=expr
27914else
27915 as_expr=false
27916fi
27917
27918rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000027919if test -d conf$$.dir; then
27920 rm -f conf$$.dir/conf$$.file
27921else
27922 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027923 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000027924fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027925echo >conf$$.file
27926if ln -s conf$$.file conf$$ 2>/dev/null; then
27927 as_ln_s='ln -s'
27928 # ... but there are two gotchas:
27929 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27930 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27931 # In both cases, we have to default to `cp -p'.
27932 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027933 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027934elif ln conf$$.file conf$$ 2>/dev/null; then
27935 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027936else
27937 as_ln_s='cp -p'
27938fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027939rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27940rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027941
Skip Montanaro6dead952003-09-25 14:50:04 +000027942if mkdir -p . 2>/dev/null; then
27943 as_mkdir_p=:
27944else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027945 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027946 as_mkdir_p=false
27947fi
27948
Martin v. Löwiseba40652007-08-30 20:10:57 +000027949if test -x / >/dev/null 2>&1; then
27950 as_test_x='test -x'
27951else
27952 if ls -dL / >/dev/null 2>&1; then
27953 as_ls_L_option=L
27954 else
27955 as_ls_L_option=
27956 fi
27957 as_test_x='
27958 eval sh -c '\''
27959 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027960 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000027961 else
27962 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027963 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027964 esac;
27965 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27966 ???[sx]*):;;*)false;;esac;fi
27967 '\'' sh
27968 '
27969fi
27970as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027971
27972# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027973as_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 +000027974
27975# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027976as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027977
27978
Martin v. Löwis11437992002-04-12 09:54:03 +000027979exec 6>&1
27980
Martin v. Löwiseba40652007-08-30 20:10:57 +000027981# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027982# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000027983# values after options handling.
27984ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000027985This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027986generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027987
27988 CONFIG_FILES = $CONFIG_FILES
27989 CONFIG_HEADERS = $CONFIG_HEADERS
27990 CONFIG_LINKS = $CONFIG_LINKS
27991 CONFIG_COMMANDS = $CONFIG_COMMANDS
27992 $ $0 $@
27993
Martin v. Löwiseba40652007-08-30 20:10:57 +000027994on `(hostname || uname -n) 2>/dev/null | sed 1q`
27995"
27996
Martin v. Löwis11437992002-04-12 09:54:03 +000027997_ACEOF
27998
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027999cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028000# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000028001config_files="$ac_config_files"
28002config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000028003
Martin v. Löwiseba40652007-08-30 20:10:57 +000028004_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028005
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028006cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028007ac_cs_usage="\
28008\`$as_me' instantiates files from templates according to the
28009current configuration.
28010
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028011Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000028012
28013 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000028014 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028015 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000028016 -d, --debug don't remove temporary files
28017 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028018 --file=FILE[:TEMPLATE]
28019 instantiate the configuration file FILE
28020 --header=FILE[:TEMPLATE]
28021 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000028022
28023Configuration files:
28024$config_files
28025
28026Configuration headers:
28027$config_headers
28028
28029Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000028030
Martin v. Löwiseba40652007-08-30 20:10:57 +000028031_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028032cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028033ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000028034python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028035configured by $0, generated by GNU Autoconf 2.61,
28036 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000028037
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028038Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000028039This config.status script is free software; the Free Software Foundation
28040gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028041
28042ac_pwd='$ac_pwd'
28043srcdir='$srcdir'
28044INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000028045_ACEOF
28046
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028047cat >>$CONFIG_STATUS <<\_ACEOF
28048# If no file are specified by the user, then we need to provide default
28049# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000028050ac_need_defaults=:
28051while test $# != 0
28052do
28053 case $1 in
28054 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000028055 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28056 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000028057 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000028058 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028059 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000028060 ac_option=$1
28061 ac_optarg=$2
28062 ac_shift=shift
28063 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028064 esac
28065
Skip Montanaro6dead952003-09-25 14:50:04 +000028066 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000028067 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000028068 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28069 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028070 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028071 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028072 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000028073 debug=: ;;
28074 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000028075 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028076 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028077 ac_need_defaults=false;;
28078 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000028079 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028080 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028081 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028082 --he | --h)
28083 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028084 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028085Try \`$0 --help' for more information." >&2
28086 { (exit 1); exit 1; }; };;
28087 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028088 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000028089 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
28090 | -silent | --silent | --silen | --sile | --sil | --si | --s)
28091 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028092
28093 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028094 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028095Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028096 { (exit 1); exit 1; }; } ;;
28097
Martin v. Löwiseba40652007-08-30 20:10:57 +000028098 *) ac_config_targets="$ac_config_targets $1"
28099 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028100
28101 esac
28102 shift
28103done
28104
Skip Montanaro6dead952003-09-25 14:50:04 +000028105ac_configure_extra_args=
28106
28107if $ac_cs_silent; then
28108 exec 6>/dev/null
28109 ac_configure_extra_args="$ac_configure_extra_args --silent"
28110fi
28111
28112_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028113cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000028114if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028115 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
28116 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000028117 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028118 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000028119fi
28120
Martin v. Löwis11437992002-04-12 09:54:03 +000028121_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028122cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028123exec 5>>config.log
28124{
28125 echo
28126 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28127## Running $as_me. ##
28128_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028129 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028130} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000028131
Martin v. Löwiseba40652007-08-30 20:10:57 +000028132_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028133cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028134_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028135
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028136cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028137
28138# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000028139for ac_config_target in $ac_config_targets
28140do
Martin v. Löwiseba40652007-08-30 20:10:57 +000028141 case $ac_config_target in
28142 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
28143 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
28144 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
28145 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000028146 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
28147 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028148 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
28149 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000028150 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028151
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028152 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
28153echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028154 { (exit 1); exit 1; }; };;
28155 esac
28156done
28157
Martin v. Löwiseba40652007-08-30 20:10:57 +000028158
Martin v. Löwis11437992002-04-12 09:54:03 +000028159# If the user did not use the arguments to specify the items to instantiate,
28160# then the envvar interface is used. Set only those that are not.
28161# We use the long form for the default assignment because of an extremely
28162# bizarre bug on SunOS 4.1.3.
28163if $ac_need_defaults; then
28164 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28165 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28166fi
28167
Skip Montanaro6dead952003-09-25 14:50:04 +000028168# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000028169# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000028170# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028171# Hook for its removal unless debugging.
28172# Note that there is a small window in which the directory will not be cleaned:
28173# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000028174$debug ||
28175{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028176 tmp=
28177 trap 'exit_status=$?
28178 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
28179' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000028180 trap '{ (exit 1); exit 1; }' 1 2 13 15
28181}
Martin v. Löwis11437992002-04-12 09:54:03 +000028182# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000028183
Martin v. Löwis11437992002-04-12 09:54:03 +000028184{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028185 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000028186 test -n "$tmp" && test -d "$tmp"
28187} ||
28188{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028189 tmp=./conf$$-$RANDOM
28190 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000028191} ||
28192{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028193 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028194 { (exit 1); exit 1; }
28195}
28196
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028197#
28198# Set up the sed scripts for CONFIG_FILES section.
28199#
28200
28201# No need to generate the scripts if there are no CONFIG_FILES.
28202# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000028203if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028204
28205_ACEOF
28206
Martin v. Löwiseba40652007-08-30 20:10:57 +000028207
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028208
Martin v. Löwiseba40652007-08-30 20:10:57 +000028209ac_delim='%!_!# '
28210for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028211 cat >conf$$subs.sed <<_ACEOF
28212SHELL!$SHELL$ac_delim
28213PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
28214PACKAGE_NAME!$PACKAGE_NAME$ac_delim
28215PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
28216PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
28217PACKAGE_STRING!$PACKAGE_STRING$ac_delim
28218PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
28219exec_prefix!$exec_prefix$ac_delim
28220prefix!$prefix$ac_delim
28221program_transform_name!$program_transform_name$ac_delim
28222bindir!$bindir$ac_delim
28223sbindir!$sbindir$ac_delim
28224libexecdir!$libexecdir$ac_delim
28225datarootdir!$datarootdir$ac_delim
28226datadir!$datadir$ac_delim
28227sysconfdir!$sysconfdir$ac_delim
28228sharedstatedir!$sharedstatedir$ac_delim
28229localstatedir!$localstatedir$ac_delim
28230includedir!$includedir$ac_delim
28231oldincludedir!$oldincludedir$ac_delim
28232docdir!$docdir$ac_delim
28233infodir!$infodir$ac_delim
28234htmldir!$htmldir$ac_delim
28235dvidir!$dvidir$ac_delim
28236pdfdir!$pdfdir$ac_delim
28237psdir!$psdir$ac_delim
28238libdir!$libdir$ac_delim
28239localedir!$localedir$ac_delim
28240mandir!$mandir$ac_delim
28241DEFS!$DEFS$ac_delim
28242ECHO_C!$ECHO_C$ac_delim
28243ECHO_N!$ECHO_N$ac_delim
28244ECHO_T!$ECHO_T$ac_delim
28245LIBS!$LIBS$ac_delim
28246build_alias!$build_alias$ac_delim
28247host_alias!$host_alias$ac_delim
28248target_alias!$target_alias$ac_delim
28249VERSION!$VERSION$ac_delim
28250SOVERSION!$SOVERSION$ac_delim
28251CONFIG_ARGS!$CONFIG_ARGS$ac_delim
28252UNIVERSALSDK!$UNIVERSALSDK$ac_delim
28253ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren92919a62009-12-24 13:30:58 +000028254LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028255PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
28256PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
28257PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
28258PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
28259PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
28260FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
28261FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28262FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28263FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28264FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28265MACHDEP!$MACHDEP$ac_delim
28266SGI_ABI!$SGI_ABI$ac_delim
28267EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
28268EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
28269CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28270EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28271CC!$CC$ac_delim
28272CFLAGS!$CFLAGS$ac_delim
28273LDFLAGS!$LDFLAGS$ac_delim
28274CPPFLAGS!$CPPFLAGS$ac_delim
28275ac_ct_CC!$ac_ct_CC$ac_delim
28276EXEEXT!$EXEEXT$ac_delim
28277OBJEXT!$OBJEXT$ac_delim
28278CXX!$CXX$ac_delim
28279MAINCC!$MAINCC$ac_delim
28280CPP!$CPP$ac_delim
28281GREP!$GREP$ac_delim
28282EGREP!$EGREP$ac_delim
28283BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28284LIBRARY!$LIBRARY$ac_delim
28285LDLIBRARY!$LDLIBRARY$ac_delim
28286DLLLIBRARY!$DLLLIBRARY$ac_delim
28287BLDLIBRARY!$BLDLIBRARY$ac_delim
28288LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28289INSTSONAME!$INSTSONAME$ac_delim
28290RUNSHARED!$RUNSHARED$ac_delim
28291LINKCC!$LINKCC$ac_delim
28292GNULD!$GNULD$ac_delim
28293RANLIB!$RANLIB$ac_delim
28294AR!$AR$ac_delim
28295ARFLAGS!$ARFLAGS$ac_delim
28296SVNVERSION!$SVNVERSION$ac_delim
28297INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28298INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28299INSTALL_DATA!$INSTALL_DATA$ac_delim
28300LN!$LN$ac_delim
28301OPT!$OPT$ac_delim
28302BASECFLAGS!$BASECFLAGS$ac_delim
28303UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28304OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28305LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28306SO!$SO$ac_delim
28307LDSHARED!$LDSHARED$ac_delim
28308BLDSHARED!$BLDSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028309_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028310
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028311 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 +000028312 break
28313 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028314 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28315echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028316 { (exit 1); exit 1; }; }
28317 else
28318 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028319 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028320done
28321
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028322ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28323if test -n "$ac_eof"; then
28324 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28325 ac_eof=`expr $ac_eof + 1`
28326fi
28327
28328cat >>$CONFIG_STATUS <<_ACEOF
28329cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28330/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000028331_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028332sed '
28333s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28334s/^/s,@/; s/!/@,|#_!!_#|/
28335:n
28336t n
28337s/'"$ac_delim"'$/,g/; t
28338s/$/\\/; p
28339N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28340' >>$CONFIG_STATUS <conf$$subs.sed
28341rm -f conf$$subs.sed
28342cat >>$CONFIG_STATUS <<_ACEOF
28343CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000028344_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028345
28346
28347ac_delim='%!_!# '
28348for ac_last_try in false false false false false :; do
28349 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren92919a62009-12-24 13:30:58 +000028350CCSHARED!$CCSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028351LINKFORSHARED!$LINKFORSHARED$ac_delim
28352CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
28353SHLIBS!$SHLIBS$ac_delim
28354USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28355SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28356USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28357LDLAST!$LDLAST$ac_delim
28358THREADOBJ!$THREADOBJ$ac_delim
28359DLINCLDIR!$DLINCLDIR$ac_delim
28360DYNLOADFILE!$DYNLOADFILE$ac_delim
28361MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28362TRUE!$TRUE$ac_delim
28363LIBOBJS!$LIBOBJS$ac_delim
28364HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28365HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28366HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28367HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28368HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28369LIBM!$LIBM$ac_delim
28370LIBC!$LIBC$ac_delim
28371UNICODE_OBJS!$UNICODE_OBJS$ac_delim
28372THREADHEADERS!$THREADHEADERS$ac_delim
28373SRCDIRS!$SRCDIRS$ac_delim
28374LTLIBOBJS!$LTLIBOBJS$ac_delim
28375_ACEOF
28376
Ronald Oussoren92919a62009-12-24 13:30:58 +000028377 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 25; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028378 break
28379 elif $ac_last_try; then
28380 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28381echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028382 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028383 else
28384 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28385 fi
28386done
28387
28388ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28389if test -n "$ac_eof"; then
28390 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28391 ac_eof=`expr $ac_eof + 1`
28392fi
28393
28394cat >>$CONFIG_STATUS <<_ACEOF
28395cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28396/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000028397_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028398sed '
28399s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28400s/^/s,@/; s/!/@,|#_!!_#|/
28401:n
28402t n
28403s/'"$ac_delim"'$/,g/; t
28404s/$/\\/; p
28405N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28406' >>$CONFIG_STATUS <conf$$subs.sed
28407rm -f conf$$subs.sed
28408cat >>$CONFIG_STATUS <<_ACEOF
28409:end
28410s/|#_!!_#|//g
28411CEOF$ac_eof
28412_ACEOF
28413
Martin v. Löwiseba40652007-08-30 20:10:57 +000028414
28415# VPATH may cause trouble with some makes, so we remove $(srcdir),
28416# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28417# trailing colons and then remove the whole line if VPATH becomes empty
28418# (actually we leave an empty line to preserve line numbers).
28419if test "x$srcdir" = x.; then
28420 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28421s/:*\$(srcdir):*/:/
28422s/:*\${srcdir}:*/:/
28423s/:*@srcdir@:*/:/
28424s/^\([^=]*=[ ]*\):*/\1/
28425s/:*$//
28426s/^[^=]*=[ ]*$//
28427}'
28428fi
28429
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028430cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028431fi # test -n "$CONFIG_FILES"
28432
Martin v. Löwiseba40652007-08-30 20:10:57 +000028433
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028434for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000028435do
28436 case $ac_tag in
28437 :[FHLC]) ac_mode=$ac_tag; continue;;
28438 esac
28439 case $ac_mode$ac_tag in
28440 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028441 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28442echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028443 { (exit 1); exit 1; }; };;
28444 :[FH]-) ac_tag=-:-;;
28445 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28446 esac
28447 ac_save_IFS=$IFS
28448 IFS=:
28449 set x $ac_tag
28450 IFS=$ac_save_IFS
28451 shift
28452 ac_file=$1
28453 shift
28454
28455 case $ac_mode in
28456 :L) ac_source=$1;;
28457 :[FH])
28458 ac_file_inputs=
28459 for ac_f
28460 do
28461 case $ac_f in
28462 -) ac_f="$tmp/stdin";;
28463 *) # Look for the file first in the build tree, then in the source tree
28464 # (if the path is not absolute). The absolute path cannot be DOS-style,
28465 # because $ac_f cannot contain `:'.
28466 test -f "$ac_f" ||
28467 case $ac_f in
28468 [\\/$]*) false;;
28469 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28470 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028471 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28472echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028473 { (exit 1); exit 1; }; };;
28474 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028475 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028476 done
28477
28478 # Let's still pretend it is `configure' which instantiates (i.e., don't
28479 # use $as_me), people would be surprised to read:
28480 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028481 configure_input="Generated from "`IFS=:
28482 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028483 if test x"$ac_file" != x-; then
28484 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028485 { echo "$as_me:$LINENO: creating $ac_file" >&5
28486echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028487 fi
28488
28489 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028490 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028491 esac
28492 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028493 esac
28494
Martin v. Löwiseba40652007-08-30 20:10:57 +000028495 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028496$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028497 X"$ac_file" : 'X\(//\)[^/]' \| \
28498 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028499 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028500echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028501 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28502 s//\1/
28503 q
28504 }
28505 /^X\(\/\/\)[^/].*/{
28506 s//\1/
28507 q
28508 }
28509 /^X\(\/\/\)$/{
28510 s//\1/
28511 q
28512 }
28513 /^X\(\/\).*/{
28514 s//\1/
28515 q
28516 }
28517 s/.*/./; q'`
28518 { as_dir="$ac_dir"
28519 case $as_dir in #(
28520 -*) as_dir=./$as_dir;;
28521 esac
28522 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028523 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000028524 while :; do
28525 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028526 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000028527 *) as_qdir=$as_dir;;
28528 esac
28529 as_dirs="'$as_qdir' $as_dirs"
28530 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028531$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028532 X"$as_dir" : 'X\(//\)[^/]' \| \
28533 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028534 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028535echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028536 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28537 s//\1/
28538 q
28539 }
28540 /^X\(\/\/\)[^/].*/{
28541 s//\1/
28542 q
28543 }
28544 /^X\(\/\/\)$/{
28545 s//\1/
28546 q
28547 }
28548 /^X\(\/\).*/{
28549 s//\1/
28550 q
28551 }
28552 s/.*/./; q'`
28553 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028554 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028555 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028556 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28557echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028558 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028559 ac_builddir=.
28560
Martin v. Löwiseba40652007-08-30 20:10:57 +000028561case "$ac_dir" in
28562.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28563*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028564 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028565 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028566 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028567 case $ac_top_builddir_sub in
28568 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28569 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28570 esac ;;
28571esac
28572ac_abs_top_builddir=$ac_pwd
28573ac_abs_builddir=$ac_pwd$ac_dir_suffix
28574# for backward compatibility:
28575ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028576
28577case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028578 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028579 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028580 ac_top_srcdir=$ac_top_builddir_sub
28581 ac_abs_top_srcdir=$ac_pwd ;;
28582 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028583 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028584 ac_top_srcdir=$srcdir
28585 ac_abs_top_srcdir=$srcdir ;;
28586 *) # Relative name.
28587 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28588 ac_top_srcdir=$ac_top_build_prefix$srcdir
28589 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028590esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028591ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028592
Martin v. Löwis11437992002-04-12 09:54:03 +000028593
Martin v. Löwiseba40652007-08-30 20:10:57 +000028594 case $ac_mode in
28595 :F)
28596 #
28597 # CONFIG_FILE
28598 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028599
28600 case $INSTALL in
28601 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028602 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028603 esac
Brett Cannon19fab762007-06-02 03:02:29 +000028604_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028605
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028606cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028607# If the template does not know about datarootdir, expand it.
28608# FIXME: This hack should be removed a few years after 2.60.
28609ac_datarootdir_hack=; ac_datarootdir_seen=
28610
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028611case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000028612 p
28613 q
28614}
28615/@datadir@/p
28616/@docdir@/p
28617/@infodir@/p
28618/@localedir@/p
28619/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028620' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028621*datarootdir*) ac_datarootdir_seen=yes;;
28622*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028623 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28624echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028625_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028626cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028627 ac_datarootdir_hack='
28628 s&@datadir@&$datadir&g
28629 s&@docdir@&$docdir&g
28630 s&@infodir@&$infodir&g
28631 s&@localedir@&$localedir&g
28632 s&@mandir@&$mandir&g
28633 s&\\\${datarootdir}&$datarootdir&g' ;;
28634esac
28635_ACEOF
28636
28637# Neutralize VPATH when `$srcdir' = `.'.
28638# Shell code in configure.ac might set extrasub.
28639# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028640cat >>$CONFIG_STATUS <<_ACEOF
28641 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028642$extrasub
28643_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028644cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028645:t
28646/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028647s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000028648s&@top_builddir@&$ac_top_builddir_sub&;t t
28649s&@srcdir@&$ac_srcdir&;t t
28650s&@abs_srcdir@&$ac_abs_srcdir&;t t
28651s&@top_srcdir@&$ac_top_srcdir&;t t
28652s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28653s&@builddir@&$ac_builddir&;t t
28654s&@abs_builddir@&$ac_abs_builddir&;t t
28655s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28656s&@INSTALL@&$ac_INSTALL&;t t
28657$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028658" $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 +000028659
Martin v. Löwiseba40652007-08-30 20:10:57 +000028660test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28661 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28662 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028663 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028664which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028665echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028666which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028667
Martin v. Löwiseba40652007-08-30 20:10:57 +000028668 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028669 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028670 -) cat "$tmp/out"; rm -f "$tmp/out";;
28671 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28672 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028673 ;;
28674 :H)
28675 #
28676 # CONFIG_HEADER
28677 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028678_ACEOF
28679
28680# Transform confdefs.h into a sed script `conftest.defines', that
28681# substitutes the proper values into config.h.in to produce config.h.
28682rm -f conftest.defines conftest.tail
28683# First, append a space to every undef/define line, to ease matching.
28684echo 's/$/ /' >conftest.defines
28685# Then, protect against being on the right side of a sed subst, or in
28686# an unquoted here document, in config.status. If some macros were
28687# called several times there might be several #defines for the same
28688# symbol, which is useless. But do not sort them, since the last
28689# AC_DEFINE must be honored.
28690ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28691# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28692# NAME is the cpp macro being defined, VALUE is the value it is being given.
28693# PARAMS is the parameter list in the macro definition--in most cases, it's
28694# just an empty string.
28695ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28696ac_dB='\\)[ (].*,\\1define\\2'
28697ac_dC=' '
28698ac_dD=' ,'
28699
28700uniq confdefs.h |
28701 sed -n '
28702 t rset
28703 :rset
28704 s/^[ ]*#[ ]*define[ ][ ]*//
28705 t ok
28706 d
28707 :ok
28708 s/[\\&,]/\\&/g
28709 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28710 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28711 ' >>conftest.defines
28712
28713# Remove the space that was appended to ease matching.
28714# Then replace #undef with comments. This is necessary, for
28715# example, in the case of _POSIX_SOURCE, which is predefined and required
28716# on some systems where configure will not decide to define it.
28717# (The regexp can be short, since the line contains either #define or #undef.)
28718echo 's/ $//
28719s,^[ #]*u.*,/* & */,' >>conftest.defines
28720
28721# Break up conftest.defines:
28722ac_max_sed_lines=50
28723
28724# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28725# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28726# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28727# et cetera.
28728ac_in='$ac_file_inputs'
28729ac_out='"$tmp/out1"'
28730ac_nxt='"$tmp/out2"'
28731
28732while :
28733do
28734 # Write a here document:
28735 cat >>$CONFIG_STATUS <<_ACEOF
28736 # First, check the format of the line:
28737 cat >"\$tmp/defines.sed" <<\\CEOF
28738/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28739/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28740b
28741:def
28742_ACEOF
28743 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28744 echo 'CEOF
28745 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28746 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28747 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28748 grep . conftest.tail >/dev/null || break
28749 rm -f conftest.defines
28750 mv conftest.tail conftest.defines
28751done
28752rm -f conftest.defines conftest.tail
28753
28754echo "ac_result=$ac_in" >>$CONFIG_STATUS
28755cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028756 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028757 echo "/* $configure_input */" >"$tmp/config.h"
28758 cat "$ac_result" >>"$tmp/config.h"
28759 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28760 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28761echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028762 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028763 rm -f $ac_file
28764 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028765 fi
28766 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028767 echo "/* $configure_input */"
28768 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028769 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028770 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028771 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028772
Martin v. Löwiseba40652007-08-30 20:10:57 +000028773
28774 esac
28775
28776done # for ac_tag
28777
Guido van Rossum627b2d71993-12-24 10:39:16 +000028778
Martin v. Löwis11437992002-04-12 09:54:03 +000028779{ (exit 0); exit 0; }
28780_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028781chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028782ac_clean_files=$ac_clean_files_save
28783
28784
28785# configure is writing to config.log, and then calls config.status.
28786# config.status does its own redirection, appending to config.log.
28787# Unfortunately, on DOS this fails, as config.log is still kept open
28788# by configure, so config.status won't be able to write to it; its
28789# output is simply discarded. So we exec the FD to /dev/null,
28790# effectively closing config.log, so it can be properly (re)opened and
28791# appended to by config.status. When coming back to configure, we
28792# need to make the FD available again.
28793if test "$no_create" != yes; then
28794 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028795 ac_config_status_args=
28796 test "$silent" = yes &&
28797 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028798 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028799 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028800 exec 5>>config.log
28801 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28802 # would make configure fail if this is the last instruction.
28803 $ac_cs_success || { (exit 1); exit 1; }
28804fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028805
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028806
Martin v. Löwisf7afe952006-04-14 15:16:15 +000028807echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028808if test ! -f Modules/Setup
28809then
28810 cp $srcdir/Modules/Setup.dist Modules/Setup
28811fi
28812
Martin v. Löwisf7afe952006-04-14 15:16:15 +000028813echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028814if test ! -f Modules/Setup.local
28815then
28816 echo "# Edit this file for local setup changes" >Modules/Setup.local
28817fi
28818
28819echo "creating Makefile"
28820$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28821 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028822 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000028823
28824case $ac_sys_system in
28825BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028826 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000028827
28828 Support for BeOS is deprecated as of Python 2.6.
28829 See PEP 11 for the gory details.
28830 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028831echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000028832
28833 Support for BeOS is deprecated as of Python 2.6.
28834 See PEP 11 for the gory details.
28835 " >&2;}
28836 ;;
28837*) ;;
28838esac
28839
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028840mv config.c Modules