blob: 54da4bc2b4453fa037dc67f4aaa73987e3836b84 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Gregory P. Smith373469a2009-11-01 21:03:38 +00002# From configure.in Revision: 76028 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004# Generated by GNU Autoconf 2.61 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Martin v. Löwiseba40652007-08-30 20:10:57 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Martin v. Löwiseba40652007-08-30 20:10:57 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Martin v. Löwiseba40652007-08-30 20:10:57 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000069as_nl='
70'
Martin v. Löwiseba40652007-08-30 20:10:57 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000138echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000164 if test $as_have_required = yes && (eval ":
Martin v. Löwiseba40652007-08-30 20:10:57 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Martin v. Löwiseba40652007-08-30 20:10:57 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Martin v. Löwiseba40652007-08-30 20:10:57 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Martin v. Löwiseba40652007-08-30 20:10:57 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000485
Martin v. Löwiseba40652007-08-30 20:10:57 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000498 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +0000499fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Martin v. Löwiseba40652007-08-30 20:10:57 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000535 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +0000536 else
537 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000538 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000578PACKAGE_VERSION='2.7'
579PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000619ac_subst_vars='SHELL
Alexandre Vassalottia2db6872009-07-17 07:46:46 +0000620PATH_SEPARATOR
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
661PYTHONFRAMEWORK
662PYTHONFRAMEWORKIDENTIFIER
663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673EXTRAPLATDIR
674EXTRAMACHDEPPATH
675CONFIGURE_MACOSX_DEPLOYMENT_TARGET
676EXPORT_MACOSX_DEPLOYMENT_TARGET
677CC
678CFLAGS
679LDFLAGS
680CPPFLAGS
681ac_ct_CC
682EXEEXT
683OBJEXT
684CXX
685MAINCC
686CPP
687GREP
688EGREP
689BUILDEXEEXT
690LIBRARY
691LDLIBRARY
692DLLLIBRARY
693BLDLIBRARY
694LDLIBRARYDIR
695INSTSONAME
696RUNSHARED
697LINKCC
698GNULD
699RANLIB
700AR
701ARFLAGS
702SVNVERSION
703INSTALL_PROGRAM
704INSTALL_SCRIPT
705INSTALL_DATA
706LN
707OPT
708BASECFLAGS
709UNIVERSAL_ARCH_FLAGS
710OTHER_LIBTOOL_OPT
711LIBTOOL_CRUFT
712SO
713LDSHARED
714BLDSHARED
715CCSHARED
716LINKFORSHARED
717CFLAGSFORSHARED
718SHLIBS
719USE_SIGNAL_MODULE
720SIGNAL_OBJS
721USE_THREAD_MODULE
722LDLAST
723THREADOBJ
724DLINCLDIR
725DYNLOADFILE
726MACHDEP_OBJS
727TRUE
728LIBOBJS
729HAVE_GETHOSTBYNAME_R_6_ARG
730HAVE_GETHOSTBYNAME_R_5_ARG
731HAVE_GETHOSTBYNAME_R_3_ARG
732HAVE_GETHOSTBYNAME_R
733HAVE_GETHOSTBYNAME
734LIBM
735LIBC
736UNICODE_OBJS
737THREADHEADERS
738SRCDIRS
739LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000741 ac_precious_vars='build_alias
742host_alias
743target_alias
744CC
745CFLAGS
746LDFLAGS
747LIBS
748CPPFLAGS
749CPP'
750
Guido van Rossum627b2d71993-12-24 10:39:16 +0000751
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000753ac_init_help=
754ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755# The variables have the same names as the options, with
756# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000757cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000759no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000760no_recursion=
761prefix=NONE
762program_prefix=NONE
763program_suffix=NONE
764program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000769x_includes=NONE
770x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000771
772# Installation directory options.
773# These are left unexpanded so users can "make install exec_prefix=/foo"
774# and all the variables that are supposed to be based on exec_prefix
775# by default will actually change.
776# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000777# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778bindir='${exec_prefix}/bin'
779sbindir='${exec_prefix}/sbin'
780libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000781datarootdir='${prefix}/share'
782datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783sysconfdir='${prefix}/etc'
784sharedstatedir='${prefix}/com'
785localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000786includedir='${prefix}/include'
787oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000788docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
789infodir='${datarootdir}/info'
790htmldir='${docdir}'
791dvidir='${docdir}'
792pdfdir='${docdir}'
793psdir='${docdir}'
794libdir='${exec_prefix}/lib'
795localedir='${datarootdir}/locale'
796mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000797
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000799ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000801do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 # If the previous option needs an argument, assign it.
803 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000804 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805 ac_prev=
806 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000807 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Martin v. Löwiseba40652007-08-30 20:10:57 +0000809 case $ac_option in
810 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
811 *) ac_optarg=yes ;;
812 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814 # Accept the important Cygnus configure options, so we can diagnose typos.
815
Martin v. Löwiseba40652007-08-30 20:10:57 +0000816 case $ac_dashdash$ac_option in
817 --)
818 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820 -bindir | --bindir | --bindi | --bind | --bin | --bi)
821 ac_prev=bindir ;;
822 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824
825 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000828 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830 -cache-file | --cache-file | --cache-fil | --cache-fi \
831 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
832 ac_prev=cache_file ;;
833 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
834 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000835 cache_file=$ac_optarg ;;
836
837 --config-cache | -C)
838 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000842 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844
Martin v. Löwiseba40652007-08-30 20:10:57 +0000845 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
846 | --dataroo | --dataro | --datar)
847 ac_prev=datarootdir ;;
848 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
849 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
850 datarootdir=$ac_optarg ;;
851
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852 -disable-* | --disable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000853 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000855 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
856 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000858 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
859 eval enable_$ac_feature=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000860
861 -docdir | --docdir | --docdi | --doc | --do)
862 ac_prev=docdir ;;
863 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
864 docdir=$ac_optarg ;;
865
866 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
867 ac_prev=dvidir ;;
868 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
869 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870
871 -enable-* | --enable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000872 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000874 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
875 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000877 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
878 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
881 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
882 | --exec | --exe | --ex)
883 ac_prev=exec_prefix ;;
884 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
885 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
886 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000887 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
889 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890 # Obsolete; use --with-gas.
891 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Martin v. Löwis11437992002-04-12 09:54:03 +0000893 -help | --help | --hel | --he | -h)
894 ac_init_help=long ;;
895 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
896 ac_init_help=recursive ;;
897 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
898 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
900 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Martin v. Löwiseba40652007-08-30 20:10:57 +0000905 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
906 ac_prev=htmldir ;;
907 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
908 | --ht=*)
909 htmldir=$ac_optarg ;;
910
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911 -includedir | --includedir | --includedi | --included | --include \
912 | --includ | --inclu | --incl | --inc)
913 ac_prev=includedir ;;
914 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
915 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -infodir | --infodir | --infodi | --infod | --info | --inf)
919 ac_prev=infodir ;;
920 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libdir | --libdir | --libdi | --libd)
924 ac_prev=libdir ;;
925 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927
928 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
929 | --libexe | --libex | --libe)
930 ac_prev=libexecdir ;;
931 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
932 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
Martin v. Löwiseba40652007-08-30 20:10:57 +0000935 -localedir | --localedir | --localedi | --localed | --locale)
936 ac_prev=localedir ;;
937 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
938 localedir=$ac_optarg ;;
939
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000941 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 ac_prev=localstatedir ;;
943 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000944 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
947 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
948 ac_prev=mandir ;;
949 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 # Obsolete; use --without-fp.
954 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955
956 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958 no_create=yes ;;
959
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
962 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
965 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
966 | --oldin | --oldi | --old | --ol | --o)
967 ac_prev=oldincludedir ;;
968 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
969 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
970 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
974 ac_prev=prefix ;;
975 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
978 -program-prefix | --program-prefix | --program-prefi | --program-pref \
979 | --program-pre | --program-pr | --program-p)
980 ac_prev=program_prefix ;;
981 -program-prefix=* | --program-prefix=* | --program-prefi=* \
982 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -program-suffix | --program-suffix | --program-suffi | --program-suff \
986 | --program-suf | --program-su | --program-s)
987 ac_prev=program_suffix ;;
988 -program-suffix=* | --program-suffix=* | --program-suffi=* \
989 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -program-transform-name | --program-transform-name \
993 | --program-transform-nam | --program-transform-na \
994 | --program-transform-n | --program-transform- \
995 | --program-transform | --program-transfor \
996 | --program-transfo | --program-transf \
997 | --program-trans | --program-tran \
998 | --progr-tra | --program-tr | --program-t)
999 ac_prev=program_transform_name ;;
1000 -program-transform-name=* | --program-transform-name=* \
1001 | --program-transform-nam=* | --program-transform-na=* \
1002 | --program-transform-n=* | --program-transform-=* \
1003 | --program-transform=* | --program-transfor=* \
1004 | --program-transfo=* | --program-transf=* \
1005 | --program-trans=* | --program-tran=* \
1006 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Martin v. Löwiseba40652007-08-30 20:10:57 +00001009 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1010 ac_prev=pdfdir ;;
1011 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1012 pdfdir=$ac_optarg ;;
1013
1014 -psdir | --psdir | --psdi | --psd | --ps)
1015 ac_prev=psdir ;;
1016 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1017 psdir=$ac_optarg ;;
1018
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1020 | -silent | --silent | --silen | --sile | --sil)
1021 silent=yes ;;
1022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1024 ac_prev=sbindir ;;
1025 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1026 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1030 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1031 | --sharedst | --shareds | --shared | --share | --shar \
1032 | --sha | --sh)
1033 ac_prev=sharedstatedir ;;
1034 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1035 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1036 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1037 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040 -site | --site | --sit)
1041 ac_prev=site ;;
1042 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1046 ac_prev=srcdir ;;
1047 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1051 | --syscon | --sysco | --sysc | --sys | --sy)
1052 ac_prev=sysconfdir ;;
1053 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1054 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
1062 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1063 verbose=yes ;;
1064
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 -version | --version | --versio | --versi | --vers | -V)
1066 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -with-* | --with-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001069 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001071 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1072 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001074 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1075 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -without-* | --without-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001078 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001080 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1081 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001083 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1084 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 --x)
1087 # Obsolete; use --with-x.
1088 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1091 | --x-incl | --x-inc | --x-in | --x-i)
1092 ac_prev=x_includes ;;
1093 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1094 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1098 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1099 ac_prev=x_libraries ;;
1100 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1101 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001104 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001105Try \`$0 --help' for more information." >&2
1106 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 ;;
1108
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 *=*)
1110 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1111 # Reject names that are not valid shell variable names.
1112 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001113 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001115 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 export $ac_envvar ;;
1117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001118 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 # FIXME: should be removed in autoconf 3.0.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001120 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001122 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 ;;
1125
1126 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001127done
1128
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001131 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133fi
1134
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001135# Be sure to have absolute directory names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001136for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1137 datadir sysconfdir sharedstatedir localstatedir includedir \
1138 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1139 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001141 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001143 [\\/$]* | ?:[\\/]* ) continue;;
1144 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001146 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001147 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001148done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001149
Martin v. Löwis11437992002-04-12 09:54:03 +00001150# There might be people who depend on the old broken behavior: `$host'
1151# used to hold the argument of --host etc.
1152# FIXME: To remove some day.
1153build=$build_alias
1154host=$host_alias
1155target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001156
Martin v. Löwis11437992002-04-12 09:54:03 +00001157# FIXME: To remove some day.
1158if test "x$host_alias" != x; then
1159 if test "x$build_alias" = x; then
1160 cross_compiling=maybe
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001161 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 If a cross compiler is detected then cross compile mode will be used." >&2
1163 elif test "x$build_alias" != "x$host_alias"; then
1164 cross_compiling=yes
1165 fi
1166fi
1167
1168ac_tool_prefix=
1169test -n "$host_alias" && ac_tool_prefix=$host_alias-
1170
1171test "$silent" = yes && exec 6>/dev/null
1172
Guido van Rossum627b2d71993-12-24 10:39:16 +00001173
Martin v. Löwiseba40652007-08-30 20:10:57 +00001174ac_pwd=`pwd` && test -n "$ac_pwd" &&
1175ac_ls_di=`ls -di .` &&
1176ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001177 { echo "$as_me: error: Working directory cannot be determined" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001178 { (exit 1); exit 1; }; }
1179test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001180 { echo "$as_me: error: pwd does not report name of working directory" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001181 { (exit 1); exit 1; }; }
1182
1183
Guido van Rossum627b2d71993-12-24 10:39:16 +00001184# Find the source files, if location was not specified.
1185if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001187 # Try the directory containing this script, then the parent directory.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001188 ac_confdir=`$as_dirname -- "$0" ||
1189$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1190 X"$0" : 'X\(//\)[^/]' \| \
1191 X"$0" : 'X\(//\)$' \| \
1192 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1193echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001194 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1195 s//\1/
1196 q
1197 }
1198 /^X\(\/\/\)[^/].*/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\/\)$/{
1203 s//\1/
1204 q
1205 }
1206 /^X\(\/\).*/{
1207 s//\1/
1208 q
1209 }
1210 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001212 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213 srcdir=..
1214 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215else
1216 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001218if test ! -r "$srcdir/$ac_unique_file"; then
1219 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001220 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001223ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1224ac_abs_confdir=`(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001225 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001226 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001227 pwd)`
1228# When building in place, set srcdir=.
1229if test "$ac_abs_confdir" = "$ac_pwd"; then
1230 srcdir=.
1231fi
1232# Remove unnecessary trailing slashes from srcdir.
1233# Double slashes in file names in object file debugging info
1234# mess up M-x gdb in Emacs.
1235case $srcdir in
1236*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1237esac
1238for ac_var in $ac_precious_vars; do
1239 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_env_${ac_var}_value=\$${ac_var}
1241 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1242 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1243done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001244
Martin v. Löwis11437992002-04-12 09:54:03 +00001245#
1246# Report the --help message.
1247#
1248if test "$ac_init_help" = "long"; then
1249 # Omit some internal or obsolete options to make the list less imposing.
1250 # This message is too long to be a string in the A/UX 3.1 sh.
1251 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001252\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001253
1254Usage: $0 [OPTION]... [VAR=VALUE]...
1255
1256To assign environment variables (e.g., CC, CFLAGS...), specify them as
1257VAR=VALUE. See below for descriptions of some of the useful variables.
1258
1259Defaults for the options are specified in brackets.
1260
1261Configuration:
1262 -h, --help display this help and exit
1263 --help=short display options specific to this package
1264 --help=recursive display the short help of all the included packages
1265 -V, --version display version information and exit
1266 -q, --quiet, --silent do not print \`checking...' messages
1267 --cache-file=FILE cache test results in FILE [disabled]
1268 -C, --config-cache alias for \`--cache-file=config.cache'
1269 -n, --no-create do not create output files
1270 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1271
Martin v. Löwis11437992002-04-12 09:54:03 +00001272Installation directories:
1273 --prefix=PREFIX install architecture-independent files in PREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001274 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001276 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001277
1278By default, \`make install' will install all the files in
1279\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1280an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1281for instance \`--prefix=\$HOME'.
1282
1283For better control, use the options below.
1284
1285Fine tuning of the installation directories:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001286 --bindir=DIR user executables [EPREFIX/bin]
1287 --sbindir=DIR system admin executables [EPREFIX/sbin]
1288 --libexecdir=DIR program executables [EPREFIX/libexec]
1289 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1290 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1291 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1292 --libdir=DIR object code libraries [EPREFIX/lib]
1293 --includedir=DIR C header files [PREFIX/include]
1294 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1295 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1296 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1297 --infodir=DIR info documentation [DATAROOTDIR/info]
1298 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1299 --mandir=DIR man documentation [DATAROOTDIR/man]
1300 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1301 --htmldir=DIR html documentation [DOCDIR]
1302 --dvidir=DIR dvi documentation [DOCDIR]
1303 --pdfdir=DIR pdf documentation [DOCDIR]
1304 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001305_ACEOF
1306
1307 cat <<\_ACEOF
1308_ACEOF
1309fi
1310
1311if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001313 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001314 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 cat <<\_ACEOF
1316
1317Optional Features:
1318 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1319 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001320 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001321 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322 --enable-framework[=INSTALLDIR]
1323 Build (MacOSX|Darwin) framework
1324 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001325 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001326 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1327 --enable-ipv6 Enable ipv6 (with ipv4) support
1328 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001329 --enable-big-digits[=BITS]
1330 use big digits for Python longs [BITS=30]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001331 --enable-unicode[=ucs[24]]
1332 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001333
1334Optional Packages:
1335 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1336 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001337 --with-universal-archs=ARCH
1338 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001339 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001340 --with-framework-name=FRAMEWORK
1341 specify an alternate name of the framework built
1342 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001343 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001344 --with-cxx-main=<compiler>
1345 compile main() and link python executable with C++
1346 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --with-suffix=.exe set executable suffix
1348 --with-pydebug build with Py_DEBUG defined
1349 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001350 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001351 --with-dbmliborder=db1:db2:...
1352 order to check db backends for dbm. Valid value is a
1353 colon separated string with the backend names
1354 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001355 --with-signal-module disable/enable signal module
1356 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1357 --with(out)-threads[=DIRECTORY]
1358 disable/enable thread support
1359 --with(out)-thread[=DIRECTORY]
1360 deprecated; use --with(out)-threads
1361 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001363 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001364 --with(out)-pymalloc disable/enable specialized mallocs
1365 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001366 --with-fpectl enable SIGFPE catching
1367 --with-libm=STRING math library
1368 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001369
1370Some influential environment variables:
1371 CC C compiler command
1372 CFLAGS C compiler flags
1373 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1374 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001375 LIBS libraries to pass to the linker, e.g. -l<library>
1376 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1377 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 CPP C preprocessor
1379
1380Use these variables to override the choices made by `configure' or to help
1381it to find libraries and programs with nonstandard names/locations.
1382
Georg Brandl464432d2009-05-20 18:24:08 +00001383Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001384_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001385ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001386fi
1387
1388if test "$ac_init_help" = "recursive"; then
1389 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001391 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 ac_builddir=.
1393
Martin v. Löwiseba40652007-08-30 20:10:57 +00001394case "$ac_dir" in
1395.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1396*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001397 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001398 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001399 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001400 case $ac_top_builddir_sub in
1401 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1402 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1403 esac ;;
1404esac
1405ac_abs_top_builddir=$ac_pwd
1406ac_abs_builddir=$ac_pwd$ac_dir_suffix
1407# for backward compatibility:
1408ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001409
1410case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001411 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001413 ac_top_srcdir=$ac_top_builddir_sub
1414 ac_abs_top_srcdir=$ac_pwd ;;
1415 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001417 ac_top_srcdir=$srcdir
1418 ac_abs_top_srcdir=$srcdir ;;
1419 *) # Relative name.
1420 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1421 ac_top_srcdir=$ac_top_build_prefix$srcdir
1422 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001423esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001424ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001425
Martin v. Löwiseba40652007-08-30 20:10:57 +00001426 cd "$ac_dir" || { ac_status=$?; continue; }
1427 # Check for guested configure.
1428 if test -f "$ac_srcdir/configure.gnu"; then
1429 echo &&
1430 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1431 elif test -f "$ac_srcdir/configure"; then
1432 echo &&
1433 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001435 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001436 fi || ac_status=$?
1437 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 done
1439fi
1440
Martin v. Löwiseba40652007-08-30 20:10:57 +00001441test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001442if $ac_init_version; then
1443 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001444python configure 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001445generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001446
Martin v. Löwiseba40652007-08-30 20:10:57 +00001447Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014482002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001449This configure script is free software; the Free Software Foundation
1450gives unlimited permission to copy, distribute and modify it.
1451_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001452 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001454cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001455This file contains any messages produced by compilers while
1456running configure, to aid debugging if configure makes a mistake.
1457
Martin v. Löwis174440b2008-10-03 08:59:41 +00001458It was created by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001459generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001460
1461 $ $0 $@
1462
1463_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001464exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001465{
1466cat <<_ASUNAME
1467## --------- ##
1468## Platform. ##
1469## --------- ##
1470
1471hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1472uname -m = `(uname -m) 2>/dev/null || echo unknown`
1473uname -r = `(uname -r) 2>/dev/null || echo unknown`
1474uname -s = `(uname -s) 2>/dev/null || echo unknown`
1475uname -v = `(uname -v) 2>/dev/null || echo unknown`
1476
1477/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1478/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1479
1480/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1481/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1482/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001483/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001484/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1485/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1486/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1487
1488_ASUNAME
1489
1490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1491for as_dir in $PATH
1492do
1493 IFS=$as_save_IFS
1494 test -z "$as_dir" && as_dir=.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001495 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001496done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001497IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001498
1499} >&5
1500
1501cat >&5 <<_ACEOF
1502
1503
1504## ----------- ##
1505## Core tests. ##
1506## ----------- ##
1507
1508_ACEOF
1509
1510
1511# Keep a trace of the command line.
1512# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001513# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001514# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001515# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001517ac_configure_args0=
1518ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001519ac_must_keep_next=false
1520for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001521do
Skip Montanaro6dead952003-09-25 14:50:04 +00001522 for ac_arg
1523 do
1524 case $ac_arg in
1525 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1526 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1527 | -silent | --silent | --silen | --sile | --sil)
1528 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001529 *\'*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001530 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001531 esac
1532 case $ac_pass in
1533 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1534 2)
1535 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1536 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001537 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001538 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001539 case $ac_arg in
1540 *=* | --config-cache | -C | -disable-* | --disable-* \
1541 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1542 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1543 | -with-* | --with-* | -without-* | --without-* | --x)
1544 case "$ac_configure_args0 " in
1545 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1546 esac
1547 ;;
1548 -* ) ac_must_keep_next=true ;;
1549 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001550 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001551 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001552 ;;
1553 esac
1554 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001555done
Skip Montanaro6dead952003-09-25 14:50:04 +00001556$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1557$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001558
1559# When interrupted or exit'd, cleanup temporary files, and complete
1560# config.log. We remove comments because anyway the quotes in there
1561# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001562# WARNING: Use '\'' to represent an apostrophe within the trap.
1563# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001564trap 'exit_status=$?
1565 # Save into config.log some information that might help in debugging.
1566 {
1567 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001568
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 cat <<\_ASBOX
1570## ---------------- ##
1571## Cache variables. ##
1572## ---------------- ##
1573_ASBOX
1574 echo
1575 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001576(
1577 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1578 eval ac_val=\$$ac_var
1579 case $ac_val in #(
1580 *${as_nl}*)
1581 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001582 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1583echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001584 esac
1585 case $ac_var in #(
1586 _ | IFS | as_nl) ;; #(
1587 *) $as_unset $ac_var ;;
1588 esac ;;
1589 esac
1590 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001592 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1593 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001595 "s/'\''/'\''\\\\'\'''\''/g;
1596 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1597 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001598 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001599 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001600 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001601 esac |
1602 sort
1603)
Martin v. Löwis11437992002-04-12 09:54:03 +00001604 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001605
1606 cat <<\_ASBOX
1607## ----------------- ##
1608## Output variables. ##
1609## ----------------- ##
1610_ASBOX
1611 echo
1612 for ac_var in $ac_subst_vars
1613 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001614 eval ac_val=\$$ac_var
1615 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001616 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001617 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001618 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001619 done | sort
1620 echo
1621
1622 if test -n "$ac_subst_files"; then
1623 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001624## ------------------- ##
1625## File substitutions. ##
1626## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001627_ASBOX
1628 echo
1629 for ac_var in $ac_subst_files
1630 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001631 eval ac_val=\$$ac_var
1632 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001633 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001634 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001635 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001636 done | sort
1637 echo
1638 fi
1639
Martin v. Löwis11437992002-04-12 09:54:03 +00001640 if test -s confdefs.h; then
1641 cat <<\_ASBOX
1642## ----------- ##
1643## confdefs.h. ##
1644## ----------- ##
1645_ASBOX
1646 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001647 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001648 echo
1649 fi
1650 test "$ac_signal" != 0 &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001651 echo "$as_me: caught signal $ac_signal"
1652 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001654 rm -f core *.core core.conftest.* &&
1655 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001656 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001657' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001658for ac_signal in 1 2 13 15; do
1659 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1660done
1661ac_signal=0
1662
1663# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001664rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001665
1666# Predefined preprocessor variables.
1667
1668cat >>confdefs.h <<_ACEOF
1669#define PACKAGE_NAME "$PACKAGE_NAME"
1670_ACEOF
1671
1672
1673cat >>confdefs.h <<_ACEOF
1674#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1675_ACEOF
1676
1677
1678cat >>confdefs.h <<_ACEOF
1679#define PACKAGE_VERSION "$PACKAGE_VERSION"
1680_ACEOF
1681
1682
1683cat >>confdefs.h <<_ACEOF
1684#define PACKAGE_STRING "$PACKAGE_STRING"
1685_ACEOF
1686
1687
1688cat >>confdefs.h <<_ACEOF
1689#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1690_ACEOF
1691
1692
1693# Let the site file select an alternate cache file if it wants to.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001694# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001695if test -n "$CONFIG_SITE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001696 set x "$CONFIG_SITE"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001697elif test "x$prefix" != xNONE; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001698 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001700 set x "$ac_default_prefix/share/config.site" \
1701 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001703shift
1704for ac_site_file
Martin v. Löwiseba40652007-08-30 20:10:57 +00001705do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706 if test -r "$ac_site_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001707 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1708echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001710 . "$ac_site_file"
1711 fi
1712done
1713
1714if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001715 # Some versions of bash will fail to source /dev/null (special
1716 # files actually), so we avoid doing that.
1717 if test -f "$cache_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001718 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1719echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001721 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1722 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001723 esac
1724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001725else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001726 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1727echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001728 >$cache_file
1729fi
1730
1731# Check that the precious variables saved in the cache have kept the same
1732# value.
1733ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001734for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001735 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1736 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001737 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1738 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001739 case $ac_old_set,$ac_new_set in
1740 set,)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001741 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1742echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001743 ac_cache_corrupted=: ;;
1744 ,set)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001745 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1746echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001747 ac_cache_corrupted=: ;;
1748 ,);;
1749 *)
1750 if test "x$ac_old_val" != "x$ac_new_val"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001751 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1752echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1753 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1754echo "$as_me: former value: $ac_old_val" >&2;}
1755 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1756echo "$as_me: current value: $ac_new_val" >&2;}
1757 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001758 fi;;
1759 esac
1760 # Pass precious variables to config.status.
1761 if test "$ac_new_set" = set; then
1762 case $ac_new_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001763 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001764 *) ac_arg=$ac_var=$ac_new_val ;;
1765 esac
1766 case " $ac_configure_args " in
1767 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1768 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1769 esac
1770 fi
1771done
1772if $ac_cache_corrupted; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001773 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1774echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1775 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1776echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001777 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001778fi
1779
Martin v. Löwiseba40652007-08-30 20:10:57 +00001780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
Guido van Rossum7f43da71994-08-01 12:15:30 +00001804ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001806ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1807ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1808ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001809
Guido van Rossum627b2d71993-12-24 10:39:16 +00001810
Michael W. Hudson54241132001-12-07 15:38:26 +00001811
Martin v. Löwiseba40652007-08-30 20:10:57 +00001812ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001813
1814
Martin v. Löwis11437992002-04-12 09:54:03 +00001815
Georg Brandlbcd64a32009-03-31 21:45:18 +00001816if test "$prefix" != "/"; then
1817 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1818fi
1819
1820
Martin v. Löwis11437992002-04-12 09:54:03 +00001821
1822
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001823
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001824
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001825# We don't use PACKAGE_ variables, and they cause conflicts
1826# with other autoconf-based packages that include Python.h
1827grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1828rm confdefs.h
1829mv confdefs.h.new confdefs.h
1830
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001831
Martin v. Löwis174440b2008-10-03 08:59:41 +00001832VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001833
Martin v. Löwis1142de32002-03-29 16:28:31 +00001834
1835SOVERSION=1.0
1836
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001837# The later defininition of _XOPEN_SOURCE disables certain features
1838# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1839
1840cat >>confdefs.h <<\_ACEOF
1841#define _GNU_SOURCE 1
1842_ACEOF
1843
1844
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001845# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1846# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1847# them.
1848
1849cat >>confdefs.h <<\_ACEOF
1850#define _NETBSD_SOURCE 1
1851_ACEOF
1852
1853
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001854# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1855# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1856# them.
1857
1858cat >>confdefs.h <<\_ACEOF
1859#define __BSD_VISIBLE 1
1860_ACEOF
1861
1862
Martin v. Löwisd6320502004-08-12 13:45:08 +00001863# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1864# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1865
1866cat >>confdefs.h <<\_ACEOF
1867#define _BSD_TYPES 1
1868_ACEOF
1869
1870
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001871# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1872# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1873# them.
1874
1875cat >>confdefs.h <<\_ACEOF
1876#define _DARWIN_C_SOURCE 1
1877_ACEOF
1878
1879
1880
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001881define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001882
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001883# Arguments passed to configure.
1884
1885CONFIG_ARGS="$ac_configure_args"
1886
Martin v. Löwiseba40652007-08-30 20:10:57 +00001887# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001888if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001889 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001890 case $enableval in
1891 yes)
1892 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1893 ;;
1894 esac
1895 case $enableval in
1896 no)
1897 UNIVERSALSDK=
1898 enable_universalsdk=
1899 ;;
1900 *)
1901 UNIVERSALSDK=$enableval
1902 ;;
1903 esac
1904
1905else
1906
1907 UNIVERSALSDK=
1908 enable_universalsdk=
1909
Martin v. Löwiseba40652007-08-30 20:10:57 +00001910fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001911
1912
Martin v. Löwiseba40652007-08-30 20:10:57 +00001913
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001914
1915
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001916UNIVERSAL_ARCHS="32-bit"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001917{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1918echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001919
1920# Check whether --with-universal-archs was given.
1921if test "${with_universal_archs+set}" = set; then
1922 withval=$with_universal_archs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001923 { echo "$as_me:$LINENO: result: $withval" >&5
1924echo "${ECHO_T}$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001925 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001926 if test "${enable_universalsdk}" ; then
1927 :
1928 else
1929 { { echo "$as_me:$LINENO: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&5
1930echo "$as_me: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&2;}
1931 { (exit 1); exit 1; }; }
1932 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001933
1934else
1935
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001936 { echo "$as_me:$LINENO: result: 32-bit" >&5
1937echo "${ECHO_T}32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001938
1939fi
1940
1941
1942
1943
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001944
1945# Check whether --with-framework-name was given.
1946if test "${with_framework_name+set}" = set; then
1947 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001948 if test "${enable_framework}"; then
1949 :
1950 else
1951 { { echo "$as_me:$LINENO: error: --with-framework-name without --enable-framework. See Mac/README" >&5
1952echo "$as_me: error: --with-framework-name without --enable-framework. See Mac/README" >&2;}
1953 { (exit 1); exit 1; }; }
1954 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001955 PYTHONFRAMEWORK=${withval}
1956 PYTHONFRAMEWORKDIR=${withval}.framework
1957 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1958
1959else
1960
1961 PYTHONFRAMEWORK=Python
1962 PYTHONFRAMEWORKDIR=Python.framework
1963 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1964
1965fi
1966
Martin v. Löwiseba40652007-08-30 20:10:57 +00001967# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001968if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001969 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001970 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001971 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001972 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001973 esac
1974 case $enableval in
1975 no)
1976 PYTHONFRAMEWORK=
1977 PYTHONFRAMEWORKDIR=no-framework
1978 PYTHONFRAMEWORKPREFIX=
1979 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001980 FRAMEWORKINSTALLFIRST=
1981 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001982 FRAMEWORKALTINSTALLFIRST=
1983 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001984 if test "x${prefix}" = "xNONE"; then
1985 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1986 else
1987 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1988 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001989 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001990 ;;
1991 *)
1992 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001993 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001994 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001995 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1996 if test "$UNIVERSAL_ARCHS" = "all"
1997 then
1998 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001999 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002000 else
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00002001 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002002 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
2003 fi
2004
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002005 if test "x${prefix}" = "xNONE" ; then
2006 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2007 else
2008 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2009 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002010 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002011
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002012 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002013 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002014 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002015
Martin v. Löwiseba40652007-08-30 20:10:57 +00002016 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002017
Martin v. Löwiseba40652007-08-30 20:10:57 +00002018 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002019
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002020 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2021
2022 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2023
Jack Jansene578a632001-08-15 01:27:14 +00002024 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002025
Guido van Rossum563e7081996-09-10 18:20:48 +00002026else
Martin v. Löwis11437992002-04-12 09:54:03 +00002027
Jack Jansene578a632001-08-15 01:27:14 +00002028 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002029 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002030 PYTHONFRAMEWORKPREFIX=
2031 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002032 FRAMEWORKINSTALLFIRST=
2033 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002034 FRAMEWORKALTINSTALLFIRST=
2035 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002036 if test "x${prefix}" = "xNONE" ; then
2037 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2038 else
2039 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2040 fi
Jack Jansene578a632001-08-15 01:27:14 +00002041 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002042
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002043 if test "$UNIVERSAL_ARCHS" = "all"
2044 then
2045 FRAMEWORKINSTALLLAST=update4wayuniversal
2046 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2047 fi
2048
Martin v. Löwiseba40652007-08-30 20:10:57 +00002049fi
2050
Michael W. Hudson54241132001-12-07 15:38:26 +00002051
2052
2053
2054
Jack Jansene578a632001-08-15 01:27:14 +00002055
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002056
2057
Ronald Oussoren5b787322006-06-06 19:50:24 +00002058
2059
2060
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002061
Jack Jansene578a632001-08-15 01:27:14 +00002062##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002063## AC_HELP_STRING(--with-dyld,
2064## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002065##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002066# Set name for machine-dependent library files
2067
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002068{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2069echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002070if test -z "$MACHDEP"
2071then
Guido van Rossum563e7081996-09-10 18:20:48 +00002072 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002073 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002074 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002075 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002076 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002077 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002078 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002079 ac_md_system=`echo $ac_sys_system |
2080 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2081 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002082 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002083 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002084
Guido van Rossum07397971997-04-29 21:49:50 +00002085 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002086 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002087 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002088 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002089 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002090 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002091 esac
2092fi
Guido van Rossum91922671997-10-09 20:24:13 +00002093
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002094# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2095# disable features if it is defined, without any means to access these
2096# features as extensions. For these systems, we skip the definition of
2097# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2098# some feature, make sure there is no alternative way to access this
2099# feature. Also, when using wildcards, make sure you have verified the
2100# need for not defining _XOPEN_SOURCE on all systems matching the
2101# wildcard, and that the wildcard does not include future systems
2102# (which may remove their limitations).
2103case $ac_sys_system/$ac_sys_release in
2104 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2105 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002106 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002107 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002108 define_xopen_source=no
2109 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2110 # also defined. This can be overridden by defining _BSD_SOURCE
2111 # As this has a different meaning on Linux, only define it on OpenBSD
2112
2113cat >>confdefs.h <<\_ACEOF
2114#define _BSD_SOURCE 1
2115_ACEOF
2116
2117 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002118 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2119 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2120 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002121 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 +00002122 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002123 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2124 # of union __?sigval. Reported by Stuart Bishop.
2125 SunOS/5.6)
2126 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002127 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2128 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002129 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002130 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002131 define_xopen_source=no;;
2132 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002133 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002134 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002135 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002136 # On FreeBSD 4, the math functions C89 does not cover are never defined
2137 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2138 FreeBSD/4.*)
2139 define_xopen_source=no;;
2140 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2141 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2142 # identifies itself as Darwin/7.*
2143 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2144 # disables platform specific features beyond repair.
2145 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2146 # has no effect, don't bother defining them
2147 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002148 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002149 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2150 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2151 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002152 AIX/4)
2153 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002154 AIX/5)
2155 if test `uname -r` -eq 1; then
2156 define_xopen_source=no
2157 fi
2158 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002159 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2160 # defining NI_NUMERICHOST.
2161 QNX/6.3.2)
2162 define_xopen_source=no
2163 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002164
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002165esac
2166
2167if test $define_xopen_source = yes
2168then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002169 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2170 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002171 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2172 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002173 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002174 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002175
2176cat >>confdefs.h <<\_ACEOF
2177#define _XOPEN_SOURCE 500
2178_ACEOF
2179
2180 ;;
2181 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002182
2183cat >>confdefs.h <<\_ACEOF
2184#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002185_ACEOF
2186
Skip Montanarof0d5f792004-08-15 14:08:23 +00002187 ;;
2188 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002189
2190 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2191 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2192 # several APIs are not declared. Since this is also needed in some
2193 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002194 # except for Solaris 10, where it must not be defined,
2195 # as it implies XPG4.2
2196 case $ac_sys_system/$ac_sys_release in
2197 SunOS/5.10)
2198 ;;
2199 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002200
2201cat >>confdefs.h <<\_ACEOF
2202#define _XOPEN_SOURCE_EXTENDED 1
2203_ACEOF
2204
Martin v. Löwis7dece662005-11-26 11:38:24 +00002205 ;;
2206 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002207
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002208
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002209cat >>confdefs.h <<\_ACEOF
2210#define _POSIX_C_SOURCE 200112L
2211_ACEOF
2212
2213
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002214fi
2215
Guido van Rossum91922671997-10-09 20:24:13 +00002216#
2217# SGI compilers allow the specification of the both the ABI and the
2218# ISA on the command line. Depending on the values of these switches,
2219# different and often incompatable code will be generated.
2220#
2221# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2222# thus supply support for various ABI/ISA combinations. The MACHDEP
2223# variable is also adjusted.
2224#
2225
2226if test ! -z "$SGI_ABI"
2227then
2228 CC="cc $SGI_ABI"
2229 LDFLAGS="$SGI_ABI $LDFLAGS"
2230 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2231fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002232{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2233echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002234
Jack Jansen83f898c2002-12-30 22:23:40 +00002235# And add extra plat-mac for darwin
2236
Jack Jansen7b59b422003-03-17 15:44:10 +00002237
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002238{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2239echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002240if test -z "$EXTRAPLATDIR"
2241then
2242 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002243 darwin)
2244 EXTRAPLATDIR="\$(PLATMACDIRS)"
2245 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2246 ;;
2247 *)
2248 EXTRAPLATDIR=""
2249 EXTRAMACHDEPPATH=""
2250 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002251 esac
2252fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002253{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2254echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002255
Jack Jansen6b08a402004-06-03 12:41:45 +00002256# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2257# it may influence the way we can build extensions, so distutils
2258# needs to check it
2259
Ronald Oussoren988117f2006-04-29 11:31:35 +00002260
Jack Jansen6b08a402004-06-03 12:41:45 +00002261CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002262EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002263
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002264{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2265echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002266ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002267{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2268echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002269
Guido van Rossum627b2d71993-12-24 10:39:16 +00002270# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002271
2272# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2273# for debug/optimization stuff. BASECFLAGS is for flags that are required
2274# just to get things to compile and link. Users are free to override OPT
2275# when running configure or make. The build should not break if they do.
2276# BASECFLAGS should generally not be messed with, however.
2277
2278# XXX shouldn't some/most/all of this code be merged with the stuff later
2279# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002280{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2281echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002282
Martin v. Löwiseba40652007-08-30 20:10:57 +00002283# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002284if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002285 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002286 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002287 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002288 without_gcc=yes;;
2289 yes) CC=gcc
2290 without_gcc=no;;
2291 *) CC=$withval
2292 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002293 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002294else
Martin v. Löwis11437992002-04-12 09:54:03 +00002295
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002296 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002297 AIX*) CC=cc_r
2298 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002299 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002300 case $BE_HOST_CPU in
2301 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002302 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002303 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002304 BASECFLAGS="$BASECFLAGS -export pragma"
2305 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002306 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002307 ;;
2308 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002309 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002310 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002311 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002312 ;;
2313 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002314 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2315echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002316 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002317 ;;
2318 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002319 AR="\$(srcdir)/Modules/ar_beos"
2320 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002321 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002322 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002323 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002324fi
2325
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002326{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2327echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002328
Guido van Rossum8b131c51995-03-09 14:10:13 +00002329# If the user switches compilers, we can't believe the cache
2330if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2331then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002332 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002333(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002334echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002335(it is also a good idea to do 'make clean' before compiling)" >&2;}
2336 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002337fi
2338
Martin v. Löwis11437992002-04-12 09:54:03 +00002339ac_ext=c
2340ac_cpp='$CPP $CPPFLAGS'
2341ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2342ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2343ac_compiler_gnu=$ac_cv_c_compiler_gnu
2344if test -n "$ac_tool_prefix"; then
2345 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2346set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002347{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2348echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002349if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002350 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002351else
2352 if test -n "$CC"; then
2353 ac_cv_prog_CC="$CC" # Let the user override the test.
2354else
Martin v. Löwis11437992002-04-12 09:54:03 +00002355as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2356for as_dir in $PATH
2357do
2358 IFS=$as_save_IFS
2359 test -z "$as_dir" && as_dir=.
2360 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002361 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 +00002362 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002363 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002364 break 2
2365 fi
2366done
2367done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002368IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002369
Jack Jansendd19cf82001-12-06 22:36:17 +00002370fi
2371fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002372CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002373if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002374 { echo "$as_me:$LINENO: result: $CC" >&5
2375echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002376else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002377 { echo "$as_me:$LINENO: result: no" >&5
2378echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002379fi
2380
Martin v. Löwiseba40652007-08-30 20:10:57 +00002381
Martin v. Löwis11437992002-04-12 09:54:03 +00002382fi
2383if test -z "$ac_cv_prog_CC"; then
2384 ac_ct_CC=$CC
2385 # Extract the first word of "gcc", so it can be a program name with args.
2386set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002387{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2388echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002389if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002390 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002391else
2392 if test -n "$ac_ct_CC"; then
2393 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2394else
2395as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2396for as_dir in $PATH
2397do
2398 IFS=$as_save_IFS
2399 test -z "$as_dir" && as_dir=.
2400 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002401 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 +00002402 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002403 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002404 break 2
2405 fi
2406done
2407done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002408IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002409
2410fi
2411fi
2412ac_ct_CC=$ac_cv_prog_ac_ct_CC
2413if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002414 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2415echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002416else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002417 { echo "$as_me:$LINENO: result: no" >&5
2418echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002419fi
2420
Martin v. Löwiseba40652007-08-30 20:10:57 +00002421 if test "x$ac_ct_CC" = x; then
2422 CC=""
2423 else
2424 case $cross_compiling:$ac_tool_warned in
2425yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002426{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2427whose name does not start with the host triplet. If you think this
2428configuration is useful to you, please write to autoconf@gnu.org." >&5
2429echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2430whose name does not start with the host triplet. If you think this
2431configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002432ac_tool_warned=yes ;;
2433esac
2434 CC=$ac_ct_CC
2435 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002436else
2437 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002438fi
2439
Jack Jansendd19cf82001-12-06 22:36:17 +00002440if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002441 if test -n "$ac_tool_prefix"; then
2442 # 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 +00002443set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002444{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2445echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002446if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002447 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002448else
2449 if test -n "$CC"; then
2450 ac_cv_prog_CC="$CC" # Let the user override the test.
2451else
Martin v. Löwis11437992002-04-12 09:54:03 +00002452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2453for as_dir in $PATH
2454do
2455 IFS=$as_save_IFS
2456 test -z "$as_dir" && as_dir=.
2457 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002458 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 +00002459 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002460 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002461 break 2
2462 fi
2463done
2464done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002465IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002466
2467fi
2468fi
2469CC=$ac_cv_prog_CC
2470if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002471 { echo "$as_me:$LINENO: result: $CC" >&5
2472echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002473else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002474 { echo "$as_me:$LINENO: result: no" >&5
2475echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002476fi
2477
Martin v. Löwiseba40652007-08-30 20:10:57 +00002478
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002480fi
2481if test -z "$CC"; then
2482 # Extract the first word of "cc", so it can be a program name with args.
2483set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002484{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2485echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002486if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002487 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002488else
2489 if test -n "$CC"; then
2490 ac_cv_prog_CC="$CC" # Let the user override the test.
2491else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002492 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2494for as_dir in $PATH
2495do
2496 IFS=$as_save_IFS
2497 test -z "$as_dir" && as_dir=.
2498 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002499 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 +00002500 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2501 ac_prog_rejected=yes
2502 continue
2503 fi
2504 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002505 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002506 break 2
2507 fi
2508done
2509done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002510IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002511
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002512if test $ac_prog_rejected = yes; then
2513 # We found a bogon in the path, so make sure we never use it.
2514 set dummy $ac_cv_prog_CC
2515 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002517 # We chose a different compiler from the bogus one.
2518 # However, it has the same basename, so the bogon will be chosen
2519 # first if we set CC to just the basename; use the full file name.
2520 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002521 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002522 fi
2523fi
2524fi
2525fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002526CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002527if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002528 { echo "$as_me:$LINENO: result: $CC" >&5
2529echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002530else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002531 { echo "$as_me:$LINENO: result: no" >&5
2532echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002533fi
2534
Martin v. Löwiseba40652007-08-30 20:10:57 +00002535
Martin v. Löwis11437992002-04-12 09:54:03 +00002536fi
2537if test -z "$CC"; then
2538 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002539 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 do
2541 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2542set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002543{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2544echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002545if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002546 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002547else
2548 if test -n "$CC"; then
2549 ac_cv_prog_CC="$CC" # Let the user override the test.
2550else
Martin v. Löwis11437992002-04-12 09:54:03 +00002551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2552for as_dir in $PATH
2553do
2554 IFS=$as_save_IFS
2555 test -z "$as_dir" && as_dir=.
2556 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002557 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 +00002558 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002559 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002560 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002561 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002562done
2563done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002564IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002565
2566fi
2567fi
2568CC=$ac_cv_prog_CC
2569if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002570 { echo "$as_me:$LINENO: result: $CC" >&5
2571echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002572else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002573 { echo "$as_me:$LINENO: result: no" >&5
2574echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002575fi
2576
Martin v. Löwiseba40652007-08-30 20:10:57 +00002577
Martin v. Löwis11437992002-04-12 09:54:03 +00002578 test -n "$CC" && break
2579 done
2580fi
2581if test -z "$CC"; then
2582 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002583 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002584do
2585 # Extract the first word of "$ac_prog", so it can be a program name with args.
2586set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002587{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2588echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002589if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002590 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002591else
2592 if test -n "$ac_ct_CC"; then
2593 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2594else
2595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2596for as_dir in $PATH
2597do
2598 IFS=$as_save_IFS
2599 test -z "$as_dir" && as_dir=.
2600 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002601 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 +00002602 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002603 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 break 2
2605 fi
2606done
2607done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002608IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002609
Martin v. Löwis11437992002-04-12 09:54:03 +00002610fi
2611fi
2612ac_ct_CC=$ac_cv_prog_ac_ct_CC
2613if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002614 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2615echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002616else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002617 { echo "$as_me:$LINENO: result: no" >&5
2618echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002619fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002620
Martin v. Löwiseba40652007-08-30 20:10:57 +00002621
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 test -n "$ac_ct_CC" && break
2623done
Michael W. Hudson54241132001-12-07 15:38:26 +00002624
Martin v. Löwiseba40652007-08-30 20:10:57 +00002625 if test "x$ac_ct_CC" = x; then
2626 CC=""
2627 else
2628 case $cross_compiling:$ac_tool_warned in
2629yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002630{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2631whose name does not start with the host triplet. If you think this
2632configuration is useful to you, please write to autoconf@gnu.org." >&5
2633echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2634whose name does not start with the host triplet. If you think this
2635configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002636ac_tool_warned=yes ;;
2637esac
2638 CC=$ac_ct_CC
2639 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002640fi
2641
2642fi
2643
2644
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002645test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002646See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002647echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002648See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002649 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002650
2651# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002652echo "$as_me:$LINENO: checking for C compiler version" >&5
2653ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002654{ (ac_try="$ac_compiler --version >&5"
2655case "(($ac_try" in
2656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2657 *) ac_try_echo=$ac_try;;
2658esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002660 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002664{ (ac_try="$ac_compiler -v >&5"
2665case "(($ac_try" in
2666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2667 *) ac_try_echo=$ac_try;;
2668esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002670 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002674{ (ac_try="$ac_compiler -V >&5"
2675case "(($ac_try" in
2676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2677 *) ac_try_echo=$ac_try;;
2678esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002680 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002683 (exit $ac_status); }
2684
2685cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002686/* confdefs.h. */
2687_ACEOF
2688cat confdefs.h >>conftest.$ac_ext
2689cat >>conftest.$ac_ext <<_ACEOF
2690/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002691
Martin v. Löwis11437992002-04-12 09:54:03 +00002692int
2693main ()
2694{
2695
2696 ;
2697 return 0;
2698}
2699_ACEOF
2700ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002701ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002702# Try to create an executable without -o first, disregard a.out.
2703# It will help us diagnose broken compilers, and finding out an intuition
2704# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002705{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2706echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2707ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2708#
2709# List of possible output files, starting from the most likely.
2710# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2711# only as a last resort. b.out is created by i960 compilers.
2712ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2713#
2714# The IRIX 6 linker writes into existing files which may not be
2715# executable, retaining their permissions. Remove them first so a
2716# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002717ac_rmfiles=
2718for ac_file in $ac_files
2719do
2720 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002721 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002722 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2723 esac
2724done
2725rm -f $ac_rmfiles
2726
2727if { (ac_try="$ac_link_default"
2728case "(($ac_try" in
2729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2730 *) ac_try_echo=$ac_try;;
2731esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002733 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002737 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2738# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2739# in a Makefile. We should not override ac_cv_exeext if it was cached,
2740# so that the user can short-circuit this test for compilers unknown to
2741# Autoconf.
2742for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002743do
2744 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002746 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002747 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002748 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002749 # We found the default executable, but exeext='' is most
2750 # certainly right.
2751 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002752 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002753 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2754 then :; else
2755 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2756 fi
2757 # We set ac_cv_exeext here because the later test for it is not
2758 # safe: cross compilers may not add the suffix if given an `-o'
2759 # argument, so we may need to know it at that point already.
2760 # Even if this section looks crufty: it has the advantage of
2761 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002762 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002763 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002764 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002765 esac
2766done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002767test "$ac_cv_exeext" = no && ac_cv_exeext=
2768
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002769else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002770 ac_file=''
2771fi
2772
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002773{ echo "$as_me:$LINENO: result: $ac_file" >&5
2774echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002775if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002777sed 's/^/| /' conftest.$ac_ext >&5
2778
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002779{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002780See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002781echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002782See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002783 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002784fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002785
Martin v. Löwis11437992002-04-12 09:54:03 +00002786ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002787
Martin v. Löwiseba40652007-08-30 20:10:57 +00002788# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002789# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002790{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2791echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002792# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2793# If not cross compiling, check that we can run a simple program.
2794if test "$cross_compiling" != yes; then
2795 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002796 { (case "(($ac_try" in
2797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2798 *) ac_try_echo=$ac_try;;
2799esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002801 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002802 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002804 (exit $ac_status); }; }; then
2805 cross_compiling=no
2806 else
2807 if test "$cross_compiling" = maybe; then
2808 cross_compiling=yes
2809 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002810 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002811If you meant to cross compile, use \`--host'.
2812See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002813echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002814If you meant to cross compile, use \`--host'.
2815See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002816 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002817 fi
2818 fi
2819fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002820{ echo "$as_me:$LINENO: result: yes" >&5
2821echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002822
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002823rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002824ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002825# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002826# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002827{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2828echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2829{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2830echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002831
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002832{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2833echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002834if { (ac_try="$ac_link"
2835case "(($ac_try" in
2836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2837 *) ac_try_echo=$ac_try;;
2838esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002840 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002841 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002843 (exit $ac_status); }; then
2844 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2845# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2846# work properly (i.e., refer to `conftest.exe'), while it won't with
2847# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002848for ac_file in conftest.exe conftest conftest.*; do
2849 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002850 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002851 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002852 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002853 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002854 * ) break;;
2855 esac
2856done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002857else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002858 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002859See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002860echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002861See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002862 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002863fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002864
Martin v. Löwis11437992002-04-12 09:54:03 +00002865rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002866{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2867echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002868
2869rm -f conftest.$ac_ext
2870EXEEXT=$ac_cv_exeext
2871ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002872{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2873echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002874if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002875 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002876else
Martin v. Löwis11437992002-04-12 09:54:03 +00002877 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002878/* confdefs.h. */
2879_ACEOF
2880cat confdefs.h >>conftest.$ac_ext
2881cat >>conftest.$ac_ext <<_ACEOF
2882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002883
Martin v. Löwis11437992002-04-12 09:54:03 +00002884int
2885main ()
2886{
2887
2888 ;
2889 return 0;
2890}
2891_ACEOF
2892rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002893if { (ac_try="$ac_compile"
2894case "(($ac_try" in
2895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2896 *) ac_try_echo=$ac_try;;
2897esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002899 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002900 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002902 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002903 for ac_file in conftest.o conftest.obj conftest.*; do
2904 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002905 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002906 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002907 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2908 break;;
2909 esac
2910done
2911else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002913sed 's/^/| /' conftest.$ac_ext >&5
2914
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002915{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002916See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002917echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002918See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002919 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002920fi
2921
2922rm -f conftest.$ac_cv_objext conftest.$ac_ext
2923fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002924{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2925echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002926OBJEXT=$ac_cv_objext
2927ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002928{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2929echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002930if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002931 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002932else
2933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002934/* confdefs.h. */
2935_ACEOF
2936cat confdefs.h >>conftest.$ac_ext
2937cat >>conftest.$ac_ext <<_ACEOF
2938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002939
Martin v. Löwis11437992002-04-12 09:54:03 +00002940int
2941main ()
2942{
2943#ifndef __GNUC__
2944 choke me
2945#endif
2946
2947 ;
2948 return 0;
2949}
2950_ACEOF
2951rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002952if { (ac_try="$ac_compile"
2953case "(($ac_try" in
2954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2955 *) ac_try_echo=$ac_try;;
2956esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002958 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002960 grep -v '^ *+' conftest.er1 >conftest.err
2961 rm -f conftest.er1
2962 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002964 (exit $ac_status); } && {
2965 test -z "$ac_c_werror_flag" ||
2966 test ! -s conftest.err
2967 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002968 ac_compiler_gnu=yes
2969else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002971sed 's/^/| /' conftest.$ac_ext >&5
2972
Martin v. Löwiseba40652007-08-30 20:10:57 +00002973 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002974fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002975
2976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002977ac_cv_c_compiler_gnu=$ac_compiler_gnu
2978
2979fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002980{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2981echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2982GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002983ac_test_CFLAGS=${CFLAGS+set}
2984ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002985{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2986echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002987if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002988 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002989else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002990 ac_save_c_werror_flag=$ac_c_werror_flag
2991 ac_c_werror_flag=yes
2992 ac_cv_prog_cc_g=no
2993 CFLAGS="-g"
2994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002995/* confdefs.h. */
2996_ACEOF
2997cat confdefs.h >>conftest.$ac_ext
2998cat >>conftest.$ac_ext <<_ACEOF
2999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003000
Martin v. Löwis11437992002-04-12 09:54:03 +00003001int
3002main ()
3003{
3004
3005 ;
3006 return 0;
3007}
3008_ACEOF
3009rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003010if { (ac_try="$ac_compile"
3011case "(($ac_try" in
3012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3013 *) ac_try_echo=$ac_try;;
3014esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003016 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003018 grep -v '^ *+' conftest.er1 >conftest.err
3019 rm -f conftest.er1
3020 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003022 (exit $ac_status); } && {
3023 test -z "$ac_c_werror_flag" ||
3024 test ! -s conftest.err
3025 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003026 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003027else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003029sed 's/^/| /' conftest.$ac_ext >&5
3030
Martin v. Löwiseba40652007-08-30 20:10:57 +00003031 CFLAGS=""
3032 cat >conftest.$ac_ext <<_ACEOF
3033/* confdefs.h. */
3034_ACEOF
3035cat confdefs.h >>conftest.$ac_ext
3036cat >>conftest.$ac_ext <<_ACEOF
3037/* end confdefs.h. */
3038
3039int
3040main ()
3041{
3042
3043 ;
3044 return 0;
3045}
3046_ACEOF
3047rm -f conftest.$ac_objext
3048if { (ac_try="$ac_compile"
3049case "(($ac_try" in
3050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3051 *) ac_try_echo=$ac_try;;
3052esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003054 (eval "$ac_compile") 2>conftest.er1
3055 ac_status=$?
3056 grep -v '^ *+' conftest.er1 >conftest.err
3057 rm -f conftest.er1
3058 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003060 (exit $ac_status); } && {
3061 test -z "$ac_c_werror_flag" ||
3062 test ! -s conftest.err
3063 } && test -s conftest.$ac_objext; then
3064 :
3065else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003066 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003067sed 's/^/| /' conftest.$ac_ext >&5
3068
3069 ac_c_werror_flag=$ac_save_c_werror_flag
3070 CFLAGS="-g"
3071 cat >conftest.$ac_ext <<_ACEOF
3072/* confdefs.h. */
3073_ACEOF
3074cat confdefs.h >>conftest.$ac_ext
3075cat >>conftest.$ac_ext <<_ACEOF
3076/* end confdefs.h. */
3077
3078int
3079main ()
3080{
3081
3082 ;
3083 return 0;
3084}
3085_ACEOF
3086rm -f conftest.$ac_objext
3087if { (ac_try="$ac_compile"
3088case "(($ac_try" in
3089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3090 *) ac_try_echo=$ac_try;;
3091esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003093 (eval "$ac_compile") 2>conftest.er1
3094 ac_status=$?
3095 grep -v '^ *+' conftest.er1 >conftest.err
3096 rm -f conftest.er1
3097 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003099 (exit $ac_status); } && {
3100 test -z "$ac_c_werror_flag" ||
3101 test ! -s conftest.err
3102 } && test -s conftest.$ac_objext; then
3103 ac_cv_prog_cc_g=yes
3104else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003105 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003106sed 's/^/| /' conftest.$ac_ext >&5
3107
3108
Guido van Rossum627b2d71993-12-24 10:39:16 +00003109fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003110
3111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003113
3114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3115fi
3116
3117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3118 ac_c_werror_flag=$ac_save_c_werror_flag
3119fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003120{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3121echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003122if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003123 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003124elif test $ac_cv_prog_cc_g = yes; then
3125 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003126 CFLAGS="-g -O2"
3127 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003128 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003129 fi
3130else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003131 if test "$GCC" = yes; then
3132 CFLAGS="-O2"
3133 else
3134 CFLAGS=
3135 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003136fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003137{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3138echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003139if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003140 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003141else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003142 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003143ac_save_CC=$CC
3144cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003145/* confdefs.h. */
3146_ACEOF
3147cat confdefs.h >>conftest.$ac_ext
3148cat >>conftest.$ac_ext <<_ACEOF
3149/* end confdefs.h. */
3150#include <stdarg.h>
3151#include <stdio.h>
3152#include <sys/types.h>
3153#include <sys/stat.h>
3154/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3155struct buf { int x; };
3156FILE * (*rcsopen) (struct buf *, struct stat *, int);
3157static char *e (p, i)
3158 char **p;
3159 int i;
3160{
3161 return p[i];
3162}
3163static char *f (char * (*g) (char **, int), char **p, ...)
3164{
3165 char *s;
3166 va_list v;
3167 va_start (v,p);
3168 s = g (p, va_arg (v,int));
3169 va_end (v);
3170 return s;
3171}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003172
3173/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3174 function prototypes and stuff, but not '\xHH' hex character constants.
3175 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003176 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003177 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3178 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003179 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003180int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3181
Martin v. Löwiseba40652007-08-30 20:10:57 +00003182/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3183 inside strings and character constants. */
3184#define FOO(x) 'x'
3185int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3186
Skip Montanaro6dead952003-09-25 14:50:04 +00003187int test (int i, double x);
3188struct s1 {int (*f) (int a);};
3189struct s2 {int (*f) (double a);};
3190int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3191int argc;
3192char **argv;
3193int
3194main ()
3195{
3196return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3197 ;
3198 return 0;
3199}
3200_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003201for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3202 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003203do
3204 CC="$ac_save_CC $ac_arg"
3205 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003206if { (ac_try="$ac_compile"
3207case "(($ac_try" in
3208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3209 *) ac_try_echo=$ac_try;;
3210esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003212 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003213 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003214 grep -v '^ *+' conftest.er1 >conftest.err
3215 rm -f conftest.er1
3216 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003218 (exit $ac_status); } && {
3219 test -z "$ac_c_werror_flag" ||
3220 test ! -s conftest.err
3221 } && test -s conftest.$ac_objext; then
3222 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003223else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003225sed 's/^/| /' conftest.$ac_ext >&5
3226
Martin v. Löwiseba40652007-08-30 20:10:57 +00003227
Skip Montanaro6dead952003-09-25 14:50:04 +00003228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003229
3230rm -f core conftest.err conftest.$ac_objext
3231 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003232done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003233rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003234CC=$ac_save_CC
3235
3236fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003237# AC_CACHE_VAL
3238case "x$ac_cv_prog_cc_c89" in
3239 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003240 { echo "$as_me:$LINENO: result: none needed" >&5
3241echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003242 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003243 { echo "$as_me:$LINENO: result: unsupported" >&5
3244echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003245 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003246 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003247 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3248echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003249esac
3250
Skip Montanaro6dead952003-09-25 14:50:04 +00003251
Martin v. Löwis11437992002-04-12 09:54:03 +00003252ac_ext=c
3253ac_cpp='$CPP $CPPFLAGS'
3254ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3255ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3256ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003257
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003258
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003259
3260
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003261{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3262echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003263
Martin v. Löwiseba40652007-08-30 20:10:57 +00003264# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003265if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003266 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003267
3268 case $withval in
3269 no) with_cxx_main=no
3270 MAINCC='$(CC)';;
3271 yes) with_cxx_main=yes
3272 MAINCC='$(CXX)';;
3273 *) with_cxx_main=yes
3274 MAINCC=$withval
3275 if test -z "$CXX"
3276 then
3277 CXX=$withval
3278 fi;;
3279 esac
3280else
3281
3282 with_cxx_main=no
3283 MAINCC='$(CC)'
3284
Martin v. Löwiseba40652007-08-30 20:10:57 +00003285fi
3286
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003287{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3288echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003289
3290preset_cxx="$CXX"
3291if test -z "$CXX"
3292then
3293 case "$CC" in
3294 gcc) # Extract the first word of "g++", so it can be a program name with args.
3295set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003296{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3297echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003298if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003299 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003300else
3301 case $CXX in
3302 [\\/]* | ?:[\\/]*)
3303 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3304 ;;
3305 *)
3306 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3307for as_dir in notfound
3308do
3309 IFS=$as_save_IFS
3310 test -z "$as_dir" && as_dir=.
3311 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003312 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 +00003313 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003314 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003315 break 2
3316 fi
3317done
3318done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003319IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003320
3321 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3322 ;;
3323esac
3324fi
3325CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003326if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003327 { echo "$as_me:$LINENO: result: $CXX" >&5
3328echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003329else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003330 { echo "$as_me:$LINENO: result: no" >&5
3331echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003333
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003334 ;;
3335 cc) # Extract the first word of "c++", so it can be a program name with args.
3336set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003337{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3338echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003339if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003340 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003341else
3342 case $CXX in
3343 [\\/]* | ?:[\\/]*)
3344 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3345 ;;
3346 *)
3347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3348for as_dir in notfound
3349do
3350 IFS=$as_save_IFS
3351 test -z "$as_dir" && as_dir=.
3352 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003353 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 +00003354 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003355 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003356 break 2
3357 fi
3358done
3359done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003360IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003361
3362 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3363 ;;
3364esac
3365fi
3366CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003367if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003368 { echo "$as_me:$LINENO: result: $CXX" >&5
3369echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003370else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003371 { echo "$as_me:$LINENO: result: no" >&5
3372echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003373fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003374
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003375 ;;
3376 esac
3377 if test "$CXX" = "notfound"
3378 then
3379 CXX=""
3380 fi
3381fi
3382if test -z "$CXX"
3383then
3384 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3385do
3386 # Extract the first word of "$ac_prog", so it can be a program name with args.
3387set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003388{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3389echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003390if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003391 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003392else
3393 if test -n "$CXX"; then
3394 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3395else
3396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3397for as_dir in $PATH
3398do
3399 IFS=$as_save_IFS
3400 test -z "$as_dir" && as_dir=.
3401 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003402 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 +00003403 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003404 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003405 break 2
3406 fi
3407done
3408done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003409IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003410
3411fi
3412fi
3413CXX=$ac_cv_prog_CXX
3414if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003415 { echo "$as_me:$LINENO: result: $CXX" >&5
3416echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003417else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003418 { echo "$as_me:$LINENO: result: no" >&5
3419echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003420fi
3421
Martin v. Löwiseba40652007-08-30 20:10:57 +00003422
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003423 test -n "$CXX" && break
3424done
3425test -n "$CXX" || CXX="notfound"
3426
3427 if test "$CXX" = "notfound"
3428 then
3429 CXX=""
3430 fi
3431fi
3432if test "$preset_cxx" != "$CXX"
3433then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003434 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003435
3436 By default, distutils will build C++ extension modules with \"$CXX\".
3437 If this is not intended, then set CXX on the configure command line.
3438 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003439echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003440
3441 By default, distutils will build C++ extension modules with \"$CXX\".
3442 If this is not intended, then set CXX on the configure command line.
3443 " >&2;}
3444fi
3445
3446
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003447# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003448
3449ac_ext=c
3450ac_cpp='$CPP $CPPFLAGS'
3451ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3452ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3453ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003454{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3455echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003456# On Suns, sometimes $CPP names a directory.
3457if test -n "$CPP" && test -d "$CPP"; then
3458 CPP=
3459fi
3460if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003461 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003462 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003463else
Martin v. Löwis11437992002-04-12 09:54:03 +00003464 # Double quotes because CPP needs to be expanded
3465 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3466 do
3467 ac_preproc_ok=false
3468for ac_c_preproc_warn_flag in '' yes
3469do
3470 # Use a header file that comes with gcc, so configuring glibc
3471 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003472 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3473 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003474 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003475 # not just through cpp. "Syntax error" is here to catch this case.
3476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003477/* confdefs.h. */
3478_ACEOF
3479cat confdefs.h >>conftest.$ac_ext
3480cat >>conftest.$ac_ext <<_ACEOF
3481/* end confdefs.h. */
3482#ifdef __STDC__
3483# include <limits.h>
3484#else
3485# include <assert.h>
3486#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003487 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003488_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003489if { (ac_try="$ac_cpp conftest.$ac_ext"
3490case "(($ac_try" in
3491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3492 *) ac_try_echo=$ac_try;;
3493esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003495 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003496 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003497 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003498 rm -f conftest.er1
3499 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003501 (exit $ac_status); } >/dev/null && {
3502 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3503 test ! -s conftest.err
3504 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003505 :
3506else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003508sed 's/^/| /' conftest.$ac_ext >&5
3509
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 # Broken: fails on valid input.
3511continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003512fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003513
Martin v. Löwis11437992002-04-12 09:54:03 +00003514rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003515
Martin v. Löwiseba40652007-08-30 20:10:57 +00003516 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 # can be detected and how.
3518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003519/* confdefs.h. */
3520_ACEOF
3521cat confdefs.h >>conftest.$ac_ext
3522cat >>conftest.$ac_ext <<_ACEOF
3523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003524#include <ac_nonexistent.h>
3525_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003526if { (ac_try="$ac_cpp conftest.$ac_ext"
3527case "(($ac_try" in
3528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3529 *) ac_try_echo=$ac_try;;
3530esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003532 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003533 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003534 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003535 rm -f conftest.er1
3536 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003538 (exit $ac_status); } >/dev/null && {
3539 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3540 test ! -s conftest.err
3541 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003542 # Broken: success on invalid input.
3543continue
3544else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003546sed 's/^/| /' conftest.$ac_ext >&5
3547
Martin v. Löwis11437992002-04-12 09:54:03 +00003548 # Passes both tests.
3549ac_preproc_ok=:
3550break
3551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003552
Martin v. Löwis11437992002-04-12 09:54:03 +00003553rm -f conftest.err conftest.$ac_ext
3554
3555done
3556# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3557rm -f conftest.err conftest.$ac_ext
3558if $ac_preproc_ok; then
3559 break
3560fi
3561
3562 done
3563 ac_cv_prog_CPP=$CPP
3564
3565fi
3566 CPP=$ac_cv_prog_CPP
3567else
3568 ac_cv_prog_CPP=$CPP
3569fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003570{ echo "$as_me:$LINENO: result: $CPP" >&5
3571echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003572ac_preproc_ok=false
3573for ac_c_preproc_warn_flag in '' yes
3574do
3575 # Use a header file that comes with gcc, so configuring glibc
3576 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003577 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3578 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 # On the NeXT, cc -E runs the code through the compiler's parser,
3580 # not just through cpp. "Syntax error" is here to catch this case.
3581 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003582/* confdefs.h. */
3583_ACEOF
3584cat confdefs.h >>conftest.$ac_ext
3585cat >>conftest.$ac_ext <<_ACEOF
3586/* end confdefs.h. */
3587#ifdef __STDC__
3588# include <limits.h>
3589#else
3590# include <assert.h>
3591#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003592 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003593_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003594if { (ac_try="$ac_cpp conftest.$ac_ext"
3595case "(($ac_try" in
3596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3597 *) ac_try_echo=$ac_try;;
3598esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003600 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003601 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003602 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003603 rm -f conftest.er1
3604 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003606 (exit $ac_status); } >/dev/null && {
3607 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3608 test ! -s conftest.err
3609 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003610 :
3611else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003613sed 's/^/| /' conftest.$ac_ext >&5
3614
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 # Broken: fails on valid input.
3616continue
3617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003618
Martin v. Löwis11437992002-04-12 09:54:03 +00003619rm -f conftest.err conftest.$ac_ext
3620
Martin v. Löwiseba40652007-08-30 20:10:57 +00003621 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 # can be detected and how.
3623 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003624/* confdefs.h. */
3625_ACEOF
3626cat confdefs.h >>conftest.$ac_ext
3627cat >>conftest.$ac_ext <<_ACEOF
3628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003629#include <ac_nonexistent.h>
3630_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003631if { (ac_try="$ac_cpp conftest.$ac_ext"
3632case "(($ac_try" in
3633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3634 *) ac_try_echo=$ac_try;;
3635esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003637 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003638 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003639 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003640 rm -f conftest.er1
3641 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003643 (exit $ac_status); } >/dev/null && {
3644 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3645 test ! -s conftest.err
3646 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003647 # Broken: success on invalid input.
3648continue
3649else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003651sed 's/^/| /' conftest.$ac_ext >&5
3652
Martin v. Löwis11437992002-04-12 09:54:03 +00003653 # Passes both tests.
3654ac_preproc_ok=:
3655break
3656fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003657
Martin v. Löwis11437992002-04-12 09:54:03 +00003658rm -f conftest.err conftest.$ac_ext
3659
3660done
3661# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3662rm -f conftest.err conftest.$ac_ext
3663if $ac_preproc_ok; then
3664 :
3665else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003666 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003667See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003668echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003669See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003670 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003671fi
3672
3673ac_ext=c
3674ac_cpp='$CPP $CPPFLAGS'
3675ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3676ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3677ac_compiler_gnu=$ac_cv_c_compiler_gnu
3678
3679
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003680{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3681echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003682if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003683 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003684else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003685 # Extract the first word of "grep ggrep" to use in msg output
3686if test -z "$GREP"; then
3687set dummy grep ggrep; ac_prog_name=$2
3688if test "${ac_cv_path_GREP+set}" = set; then
3689 echo $ECHO_N "(cached) $ECHO_C" >&6
3690else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003691 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003692# Loop through the user's path and test for each of PROGNAME-LIST
3693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003694for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3695do
3696 IFS=$as_save_IFS
3697 test -z "$as_dir" && as_dir=.
3698 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003699 for ac_exec_ext in '' $ac_executable_extensions; do
3700 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3701 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3702 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003703 # Check for GNU $ac_path_GREP
3704case `"$ac_path_GREP" --version 2>&1` in
3705*GNU*)
3706 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3707*)
3708 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003709 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003710 while :
3711 do
3712 cat "conftest.in" "conftest.in" >"conftest.tmp"
3713 mv "conftest.tmp" "conftest.in"
3714 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003715 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003716 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3717 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3718 ac_count=`expr $ac_count + 1`
3719 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3720 # Best one so far, save it but keep looking for a better one
3721 ac_cv_path_GREP="$ac_path_GREP"
3722 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003723 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003724 # 10*(2^10) chars as input seems more than enough
3725 test $ac_count -gt 10 && break
3726 done
3727 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3728esac
3729
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003730
3731 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003732 done
3733done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003734
3735done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003736IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003737
3738
3739fi
3740
3741GREP="$ac_cv_path_GREP"
3742if test -z "$GREP"; then
3743 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3744echo "$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 +00003745 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003746fi
3747
Martin v. Löwiseba40652007-08-30 20:10:57 +00003748else
3749 ac_cv_path_GREP=$GREP
3750fi
3751
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003752
Martin v. Löwiseba40652007-08-30 20:10:57 +00003753fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003754{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3755echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003756 GREP="$ac_cv_path_GREP"
3757
3758
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003759{ echo "$as_me:$LINENO: checking for egrep" >&5
3760echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003761if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003762 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003763else
3764 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3765 then ac_cv_path_EGREP="$GREP -E"
3766 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003767 # Extract the first word of "egrep" to use in msg output
3768if test -z "$EGREP"; then
3769set dummy egrep; ac_prog_name=$2
3770if test "${ac_cv_path_EGREP+set}" = set; then
3771 echo $ECHO_N "(cached) $ECHO_C" >&6
3772else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003773 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003774# Loop through the user's path and test for each of PROGNAME-LIST
3775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003776for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3777do
3778 IFS=$as_save_IFS
3779 test -z "$as_dir" && as_dir=.
3780 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003781 for ac_exec_ext in '' $ac_executable_extensions; do
3782 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3783 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3784 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003785 # Check for GNU $ac_path_EGREP
3786case `"$ac_path_EGREP" --version 2>&1` in
3787*GNU*)
3788 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3789*)
3790 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003791 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003792 while :
3793 do
3794 cat "conftest.in" "conftest.in" >"conftest.tmp"
3795 mv "conftest.tmp" "conftest.in"
3796 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003797 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003798 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3799 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3800 ac_count=`expr $ac_count + 1`
3801 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3802 # Best one so far, save it but keep looking for a better one
3803 ac_cv_path_EGREP="$ac_path_EGREP"
3804 ac_path_EGREP_max=$ac_count
3805 fi
3806 # 10*(2^10) chars as input seems more than enough
3807 test $ac_count -gt 10 && break
3808 done
3809 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3810esac
3811
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003812
3813 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003814 done
3815done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003816
3817done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003818IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003819
3820
3821fi
3822
3823EGREP="$ac_cv_path_EGREP"
3824if test -z "$EGREP"; then
3825 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3826echo "$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 +00003827 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003828fi
3829
Martin v. Löwiseba40652007-08-30 20:10:57 +00003830else
3831 ac_cv_path_EGREP=$EGREP
3832fi
3833
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003834
Martin v. Löwiseba40652007-08-30 20:10:57 +00003835 fi
3836fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003837{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3838echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003839 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003840
3841
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003842
3843{ echo "$as_me:$LINENO: checking for AIX" >&5
3844echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3845cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003846/* confdefs.h. */
3847_ACEOF
3848cat confdefs.h >>conftest.$ac_ext
3849cat >>conftest.$ac_ext <<_ACEOF
3850/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003851#ifdef _AIX
3852 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003853#endif
3854
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003855_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003856if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3857 $EGREP "yes" >/dev/null 2>&1; then
3858 { echo "$as_me:$LINENO: result: yes" >&5
3859echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003860cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003861#define _ALL_SOURCE 1
3862_ACEOF
3863
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003864else
3865 { echo "$as_me:$LINENO: result: no" >&5
3866echo "${ECHO_T}no" >&6; }
3867fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +00003868rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003869
3870
3871
3872# Check for unsupported systems
3873case $ac_sys_system/$ac_sys_release in
3874atheos*|Linux*/1*)
3875 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3876 echo See README for details.
3877 exit 1;;
3878esac
3879
3880
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003881{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3882echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003883
3884# Check whether --with-suffix was given.
3885if test "${with_suffix+set}" = set; then
3886 withval=$with_suffix;
3887 case $withval in
3888 no) EXEEXT=;;
3889 yes) EXEEXT=.exe;;
3890 *) EXEEXT=$withval;;
3891 esac
3892fi
3893
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003894{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3895echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003896
3897# Test whether we're running on a non-case-sensitive system, in which
3898# case we give a warning if no ext is given
3899
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003900{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3901echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003902if test ! -d CaseSensitiveTestDir; then
3903mkdir CaseSensitiveTestDir
3904fi
3905
3906if test -d casesensitivetestdir
3907then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003908 { echo "$as_me:$LINENO: result: yes" >&5
3909echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003910 BUILDEXEEXT=.exe
3911else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003912 { echo "$as_me:$LINENO: result: no" >&5
3913echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003914 BUILDEXEEXT=$EXEEXT
3915fi
3916rmdir CaseSensitiveTestDir
3917
3918case $MACHDEP in
3919bsdos*)
3920 case $CC in
3921 gcc) CC="$CC -D_HAVE_BSDI";;
3922 esac;;
3923esac
3924
3925case $ac_sys_system in
3926hp*|HP*)
3927 case $CC in
3928 cc|*/cc) CC="$CC -Ae";;
3929 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003930SunOS*)
3931 # Some functions have a prototype only with that define, e.g. confstr
3932
3933cat >>confdefs.h <<\_ACEOF
3934#define __EXTENSIONS__ 1
3935_ACEOF
3936
3937 ;;
3938esac
3939
3940
3941
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003942{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3943echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003944if test -z "$LIBRARY"
3945then
3946 LIBRARY='libpython$(VERSION).a'
3947fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003948{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3949echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003950
3951# LDLIBRARY is the name of the library to link against (as opposed to the
3952# name of the library into which to insert object files). BLDLIBRARY is also
3953# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3954# is blank as the main program is not linked directly against LDLIBRARY.
3955# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3956# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3957# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3958# DLLLIBRARY is the shared (i.e., DLL) library.
3959#
3960# RUNSHARED is used to run shared python without installed libraries
3961#
3962# INSTSONAME is the name of the shared library that will be use to install
3963# on the system - some systems like version suffix, others don't
3964
3965
3966
3967
3968
3969
3970LDLIBRARY="$LIBRARY"
3971BLDLIBRARY='$(LDLIBRARY)'
3972INSTSONAME='$(LDLIBRARY)'
3973DLLLIBRARY=''
3974LDLIBRARYDIR=''
3975RUNSHARED=''
3976
3977# LINKCC is the command that links the python executable -- default is $(CC).
3978# If CXX is set, and if it is needed to link a main function that was
3979# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3980# python might then depend on the C++ runtime
3981# This is altered for AIX in order to build the export list before
3982# linking.
3983
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003984{ echo "$as_me:$LINENO: checking LINKCC" >&5
3985echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003986if test -z "$LINKCC"
3987then
3988 LINKCC='$(PURIFY) $(MAINCC)'
3989 case $ac_sys_system in
3990 AIX*)
3991 exp_extra="\"\""
3992 if test $ac_sys_release -ge 5 -o \
3993 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3994 exp_extra="."
3995 fi
3996 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003997 QNX*)
3998 # qcc must be used because the other compilers do not
3999 # support -N.
4000 LINKCC=qcc;;
4001 esac
4002fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004003{ echo "$as_me:$LINENO: result: $LINKCC" >&5
4004echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004005
4006# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4007# make sure we default having it set to "no": this is used by
4008# distutils.unixccompiler to know if it should add --enable-new-dtags
4009# to linker command lines, and failing to detect GNU ld simply results
4010# in the same bahaviour as before.
4011
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004012{ echo "$as_me:$LINENO: checking for GNU ld" >&5
4013echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004014ac_prog=ld
4015if test "$GCC" = yes; then
4016 ac_prog=`$CC -print-prog-name=ld`
4017fi
4018case `"$ac_prog" -V 2>&1 < /dev/null` in
4019 *GNU*)
4020 GNULD=yes;;
4021 *)
4022 GNULD=no;;
4023esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004024{ echo "$as_me:$LINENO: result: $GNULD" >&5
4025echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004026
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004027{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4028echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004029# Check whether --enable-shared was given.
4030if test "${enable_shared+set}" = set; then
4031 enableval=$enable_shared;
4032fi
4033
4034
4035if test -z "$enable_shared"
4036then
4037 case $ac_sys_system in
4038 CYGWIN* | atheos*)
4039 enable_shared="yes";;
4040 *)
4041 enable_shared="no";;
4042 esac
4043fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004044{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4045echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004046
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004047{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4048echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004049# Check whether --enable-profiling was given.
4050if test "${enable_profiling+set}" = set; then
4051 enableval=$enable_profiling; ac_save_cc="$CC"
4052 CC="$CC -pg"
4053 if test "$cross_compiling" = yes; then
4054 ac_enable_profiling="no"
4055else
4056 cat >conftest.$ac_ext <<_ACEOF
4057/* confdefs.h. */
4058_ACEOF
4059cat confdefs.h >>conftest.$ac_ext
4060cat >>conftest.$ac_ext <<_ACEOF
4061/* end confdefs.h. */
4062int main() { return 0; }
4063_ACEOF
4064rm -f conftest$ac_exeext
4065if { (ac_try="$ac_link"
4066case "(($ac_try" in
4067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4068 *) ac_try_echo=$ac_try;;
4069esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004071 (eval "$ac_link") 2>&5
4072 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004074 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4075 { (case "(($ac_try" in
4076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4077 *) ac_try_echo=$ac_try;;
4078esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004080 (eval "$ac_try") 2>&5
4081 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004083 (exit $ac_status); }; }; then
4084 ac_enable_profiling="yes"
4085else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004086 echo "$as_me: program exited with status $ac_status" >&5
4087echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004088sed 's/^/| /' conftest.$ac_ext >&5
4089
4090( exit $ac_status )
4091ac_enable_profiling="no"
4092fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4094fi
4095
4096
4097 CC="$ac_save_cc"
4098fi
4099
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004100{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4101echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004102
4103case "$ac_enable_profiling" in
4104 "yes")
4105 BASECFLAGS="-pg $BASECFLAGS"
4106 LDFLAGS="-pg $LDFLAGS"
4107 ;;
4108esac
4109
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004110{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4111echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004112
4113# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4114# library that we build, but we do not want to link against it (we
4115# will find it with a -framework option). For this reason there is an
4116# extra variable BLDLIBRARY against which Python and the extension
4117# modules are linked, BLDLIBRARY. This is normally the same as
4118# LDLIBRARY, but empty for MacOSX framework builds.
4119if test "$enable_framework"
4120then
4121 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4122 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4123 BLDLIBRARY=''
4124else
4125 BLDLIBRARY='$(LDLIBRARY)'
4126fi
4127
4128# Other platforms follow
4129if test $enable_shared = "yes"; then
4130
4131cat >>confdefs.h <<\_ACEOF
4132#define Py_ENABLE_SHARED 1
4133_ACEOF
4134
4135 case $ac_sys_system in
4136 BeOS*)
4137 LDLIBRARY='libpython$(VERSION).so'
4138 ;;
4139 CYGWIN*)
4140 LDLIBRARY='libpython$(VERSION).dll.a'
4141 DLLLIBRARY='libpython$(VERSION).dll'
4142 ;;
4143 SunOS*)
4144 LDLIBRARY='libpython$(VERSION).so'
4145 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4146 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4147 INSTSONAME="$LDLIBRARY".$SOVERSION
4148 ;;
4149 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4150 LDLIBRARY='libpython$(VERSION).so'
4151 BLDLIBRARY='-L. -lpython$(VERSION)'
4152 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4153 case $ac_sys_system in
4154 FreeBSD*)
4155 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4156 ;;
4157 esac
4158 INSTSONAME="$LDLIBRARY".$SOVERSION
4159 ;;
4160 hp*|HP*)
4161 case `uname -m` in
4162 ia64)
4163 LDLIBRARY='libpython$(VERSION).so'
4164 ;;
4165 *)
4166 LDLIBRARY='libpython$(VERSION).sl'
4167 ;;
4168 esac
4169 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4170 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4171 ;;
4172 OSF*)
4173 LDLIBRARY='libpython$(VERSION).so'
4174 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4175 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4176 ;;
4177 atheos*)
4178 LDLIBRARY='libpython$(VERSION).so'
4179 BLDLIBRARY='-L. -lpython$(VERSION)'
4180 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4181 ;;
4182 Darwin*)
4183 LDLIBRARY='libpython$(VERSION).dylib'
4184 BLDLIBRARY='-L. -lpython$(VERSION)'
4185 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4186 ;;
4187
4188 esac
4189else # shared is disabled
4190 case $ac_sys_system in
4191 CYGWIN*)
4192 BLDLIBRARY='$(LIBRARY)'
4193 LDLIBRARY='libpython$(VERSION).dll.a'
4194 ;;
4195 esac
4196fi
4197
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004198{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4199echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004200
4201if test -n "$ac_tool_prefix"; then
4202 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4203set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004204{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4205echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004206if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004207 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004208else
4209 if test -n "$RANLIB"; then
4210 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4211else
4212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4213for as_dir in $PATH
4214do
4215 IFS=$as_save_IFS
4216 test -z "$as_dir" && as_dir=.
4217 for ac_exec_ext in '' $ac_executable_extensions; do
4218 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4219 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004220 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004221 break 2
4222 fi
4223done
4224done
4225IFS=$as_save_IFS
4226
4227fi
4228fi
4229RANLIB=$ac_cv_prog_RANLIB
4230if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004231 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4232echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004233else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004234 { echo "$as_me:$LINENO: result: no" >&5
4235echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004236fi
4237
4238
4239fi
4240if test -z "$ac_cv_prog_RANLIB"; then
4241 ac_ct_RANLIB=$RANLIB
4242 # Extract the first word of "ranlib", so it can be a program name with args.
4243set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004244{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4245echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004246if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004247 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004248else
4249 if test -n "$ac_ct_RANLIB"; then
4250 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4251else
4252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4253for as_dir in $PATH
4254do
4255 IFS=$as_save_IFS
4256 test -z "$as_dir" && as_dir=.
4257 for ac_exec_ext in '' $ac_executable_extensions; do
4258 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4259 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004260 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004261 break 2
4262 fi
4263done
4264done
4265IFS=$as_save_IFS
4266
4267fi
4268fi
4269ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4270if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004271 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4272echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004273else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004274 { echo "$as_me:$LINENO: result: no" >&5
4275echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004276fi
4277
4278 if test "x$ac_ct_RANLIB" = x; then
4279 RANLIB=":"
4280 else
4281 case $cross_compiling:$ac_tool_warned in
4282yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004283{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4284whose name does not start with the host triplet. If you think this
4285configuration is useful to you, please write to autoconf@gnu.org." >&5
4286echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4287whose name does not start with the host triplet. If you think this
4288configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004289ac_tool_warned=yes ;;
4290esac
4291 RANLIB=$ac_ct_RANLIB
4292 fi
4293else
4294 RANLIB="$ac_cv_prog_RANLIB"
4295fi
4296
4297
4298for ac_prog in ar aal
4299do
4300 # Extract the first word of "$ac_prog", so it can be a program name with args.
4301set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004302{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4303echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004304if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004305 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004306else
4307 if test -n "$AR"; then
4308 ac_cv_prog_AR="$AR" # Let the user override the test.
4309else
4310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4311for as_dir in $PATH
4312do
4313 IFS=$as_save_IFS
4314 test -z "$as_dir" && as_dir=.
4315 for ac_exec_ext in '' $ac_executable_extensions; do
4316 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4317 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004318 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004319 break 2
4320 fi
4321done
4322done
4323IFS=$as_save_IFS
4324
4325fi
4326fi
4327AR=$ac_cv_prog_AR
4328if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004329 { echo "$as_me:$LINENO: result: $AR" >&5
4330echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004331else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004332 { echo "$as_me:$LINENO: result: no" >&5
4333echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004334fi
4335
4336
4337 test -n "$AR" && break
4338done
4339test -n "$AR" || AR="ar"
4340
4341
4342# tweak ARFLAGS only if the user didn't set it on the command line
4343
4344if test -z "$ARFLAGS"
4345then
4346 ARFLAGS="rc"
4347fi
4348
4349
4350# Extract the first word of "svnversion", so it can be a program name with args.
4351set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004352{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4353echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004354if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004355 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004356else
4357 if test -n "$SVNVERSION"; then
4358 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4359else
4360as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4361for as_dir in $PATH
4362do
4363 IFS=$as_save_IFS
4364 test -z "$as_dir" && as_dir=.
4365 for ac_exec_ext in '' $ac_executable_extensions; do
4366 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4367 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004368 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004369 break 2
4370 fi
4371done
4372done
4373IFS=$as_save_IFS
4374
4375 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4376fi
4377fi
4378SVNVERSION=$ac_cv_prog_SVNVERSION
4379if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004380 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4381echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004382else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004383 { echo "$as_me:$LINENO: result: no" >&5
4384echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004385fi
4386
4387
4388if test $SVNVERSION = found
4389then
4390 SVNVERSION="svnversion \$(srcdir)"
4391else
4392 SVNVERSION="echo Unversioned directory"
4393fi
4394
4395case $MACHDEP in
4396bsdos*|hp*|HP*)
4397 # install -d does not work on BSDI or HP-UX
4398 if test -z "$INSTALL"
4399 then
4400 INSTALL="${srcdir}/install-sh -c"
4401 fi
4402esac
4403ac_aux_dir=
4404for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4405 if test -f "$ac_dir/install-sh"; then
4406 ac_aux_dir=$ac_dir
4407 ac_install_sh="$ac_aux_dir/install-sh -c"
4408 break
4409 elif test -f "$ac_dir/install.sh"; then
4410 ac_aux_dir=$ac_dir
4411 ac_install_sh="$ac_aux_dir/install.sh -c"
4412 break
4413 elif test -f "$ac_dir/shtool"; then
4414 ac_aux_dir=$ac_dir
4415 ac_install_sh="$ac_aux_dir/shtool install -c"
4416 break
4417 fi
4418done
4419if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004420 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4421echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004422 { (exit 1); exit 1; }; }
4423fi
4424
4425# These three variables are undocumented and unsupported,
4426# and are intended to be withdrawn in a future Autoconf release.
4427# They can cause serious problems if a builder's source tree is in a directory
4428# whose full name contains unusual characters.
4429ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4430ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4431ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4432
4433
4434# Find a good install program. We prefer a C program (faster),
4435# so one script is as good as another. But avoid the broken or
4436# incompatible versions:
4437# SysV /etc/install, /usr/sbin/install
4438# SunOS /usr/etc/install
4439# IRIX /sbin/install
4440# AIX /bin/install
4441# AmigaOS /C/install, which installs bootblocks on floppy discs
4442# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4443# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4444# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4445# OS/2's system install, which has a completely different semantic
4446# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004447{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4448echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004449if test -z "$INSTALL"; then
4450if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004451 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004452else
4453 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4454for as_dir in $PATH
4455do
4456 IFS=$as_save_IFS
4457 test -z "$as_dir" && as_dir=.
4458 # Account for people who put trailing slashes in PATH elements.
4459case $as_dir/ in
4460 ./ | .// | /cC/* | \
4461 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4462 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4463 /usr/ucb/* ) ;;
4464 *)
4465 # OSF1 and SCO ODT 3.0 have their own names for install.
4466 # Don't use installbsd from OSF since it installs stuff as root
4467 # by default.
4468 for ac_prog in ginstall scoinst install; do
4469 for ac_exec_ext in '' $ac_executable_extensions; do
4470 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4471 if test $ac_prog = install &&
4472 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4473 # AIX install. It has an incompatible calling convention.
4474 :
4475 elif test $ac_prog = install &&
4476 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4477 # program-specific install script used by HP pwplus--don't use.
4478 :
4479 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004480 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4481 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004482 fi
4483 fi
4484 done
4485 done
4486 ;;
4487esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004488done
4489IFS=$as_save_IFS
4490
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004491
4492fi
4493 if test "${ac_cv_path_install+set}" = set; then
4494 INSTALL=$ac_cv_path_install
4495 else
4496 # As a last resort, use the slow shell script. Don't cache a
4497 # value for INSTALL within a source directory, because that will
4498 # break other packages using the cache if that directory is
4499 # removed, or if the value is a relative name.
4500 INSTALL=$ac_install_sh
4501 fi
4502fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004503{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4504echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004505
4506# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4507# It thinks the first close brace ends the variable substitution.
4508test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4509
4510test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4511
4512test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4513
4514
4515# Not every filesystem supports hard links
4516
4517if test -z "$LN" ; then
4518 case $ac_sys_system in
4519 BeOS*) LN="ln -s";;
4520 CYGWIN*) LN="ln -s";;
4521 atheos*) LN="ln -s";;
4522 *) LN=ln;;
4523 esac
4524fi
4525
4526# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004527{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4528echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004529
4530# Check whether --with-pydebug was given.
4531if test "${with_pydebug+set}" = set; then
4532 withval=$with_pydebug;
4533if test "$withval" != no
4534then
4535
4536cat >>confdefs.h <<\_ACEOF
4537#define Py_DEBUG 1
4538_ACEOF
4539
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004540 { echo "$as_me:$LINENO: result: yes" >&5
4541echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004542 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004543else { echo "$as_me:$LINENO: result: no" >&5
4544echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004545fi
4546else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004547 { echo "$as_me:$LINENO: result: no" >&5
4548echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004549fi
4550
4551
4552# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4553# merged with this chunk of code?
4554
4555# Optimizer/debugger flags
4556# ------------------------
4557# (The following bit of code is complicated enough - please keep things
4558# indented properly. Just pretend you're editing Python code. ;-)
4559
4560# There are two parallel sets of case statements below, one that checks to
4561# see if OPT was set and one that does BASECFLAGS setting based upon
4562# compiler and platform. BASECFLAGS tweaks need to be made even if the
4563# user set OPT.
4564
4565# tweak OPT based on compiler and platform, only if the user didn't set
4566# it on the command line
4567
4568if test -z "$OPT"
4569then
4570 case $GCC in
4571 yes)
4572 if test "$CC" != 'g++' ; then
4573 STRICT_PROTO="-Wstrict-prototypes"
4574 fi
4575 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4576 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4577 WRAP="-fwrapv"
4578 fi
4579 case $ac_cv_prog_cc_g in
4580 yes)
4581 if test "$Py_DEBUG" = 'true' ; then
4582 # Optimization messes up debuggers, so turn it off for
4583 # debug builds.
4584 OPT="-g -Wall $STRICT_PROTO"
4585 else
4586 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4587 fi
4588 ;;
4589 *)
4590 OPT="-O3 -Wall $STRICT_PROTO"
4591 ;;
4592 esac
4593 case $ac_sys_system in
4594 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4595 ;;
4596 esac
4597 ;;
4598
4599 *)
4600 OPT="-O"
4601 ;;
4602 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004603fi
4604
4605
4606
4607# The -arch flags for universal builds on OSX
4608UNIVERSAL_ARCH_FLAGS=
4609
4610
4611# tweak BASECFLAGS based on compiler and platform
4612case $GCC in
4613yes)
4614 # Python violates C99 rules, by casting between incompatible
4615 # pointer types. GCC may generate bad code as a result of that,
4616 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004617 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4618echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004619 ac_save_cc="$CC"
4620 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004621 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4622 echo $ECHO_N "(cached) $ECHO_C" >&6
4623else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004624 cat >conftest.$ac_ext <<_ACEOF
4625/* confdefs.h. */
4626_ACEOF
4627cat confdefs.h >>conftest.$ac_ext
4628cat >>conftest.$ac_ext <<_ACEOF
4629/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004630
4631int
4632main ()
4633{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004634int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004635 ;
4636 return 0;
4637}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004638_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004639rm -f conftest.$ac_objext
4640if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004641case "(($ac_try" in
4642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4643 *) ac_try_echo=$ac_try;;
4644esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004646 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004647 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004648 grep -v '^ *+' conftest.er1 >conftest.err
4649 rm -f conftest.er1
4650 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004652 (exit $ac_status); } && {
4653 test -z "$ac_c_werror_flag" ||
4654 test ! -s conftest.err
4655 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004656 ac_cv_no_strict_aliasing_ok=yes
4657else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004658 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004659sed 's/^/| /' conftest.$ac_ext >&5
4660
Gregory P. Smith373469a2009-11-01 21:03:38 +00004661 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004662fi
4663
Gregory P. Smith373469a2009-11-01 21:03:38 +00004664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004665fi
4666
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004667 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004668 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4669echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004670 if test $ac_cv_no_strict_aliasing_ok = yes
4671 then
4672 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4673 fi
4674
4675 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4676 # support. Without this, treatment of subnormals doesn't follow
4677 # the standard.
4678 case $ac_sys_machine in
4679 alpha*)
4680 BASECFLAGS="$BASECFLAGS -mieee"
4681 ;;
4682 esac
4683
4684 case $ac_sys_system in
4685 SCO_SV*)
4686 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4687 ;;
4688 # is there any other compiler on Darwin besides gcc?
4689 Darwin*)
4690 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4691 # used to be here, but non-Apple gcc doesn't accept them.
4692
4693
4694 if test "${enable_universalsdk}"; then
4695 UNIVERSAL_ARCH_FLAGS=""
4696 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4697 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4698 ARCH_RUN_32BIT=""
4699
4700 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4701 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren25967582009-09-06 10:00:26 +00004702 ARCH_RUN_32BIT="true"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004703
4704 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4705 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4706 ARCH_RUN_32BIT="arch -i386 -ppc"
4707
Ronald Oussoren23d92532009-09-07 06:12:00 +00004708 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4709 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4710 ARCH_RUN_32BIT="arch -i386"
4711
4712 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4713 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4714 ARCH_RUN_32BIT="arch -i386 -ppc"
4715
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004716 else
Ronald Oussorena9cfbde2009-09-20 20:05:44 +00004717 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4718echo "$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 +00004719 { (exit 1); exit 1; }; }
4720
4721 fi
4722
4723
4724 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4725 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4726 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4727 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4728 fi
4729 fi
4730
4731 # Calculate the right deployment target for this build.
4732 #
4733 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4734 if test ${cur_target} '>' 10.2; then
4735 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004736 if test ${enable_universalsdk}; then
4737 if test "${UNIVERSAL_ARCHS}" = "all"; then
4738 # Ensure that the default platform for a
4739 # 4-way universal build is OSX 10.5,
4740 # that's the first OS release where
4741 # 4-way builds make sense.
4742 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00004743
4744 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4745 cur_target='10.5'
4746
4747 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4748 cur_target='10.5'
4749
4750 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4751 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00004752 fi
4753 else
4754 if test `arch` = "i386"; then
4755 # On Intel macs default to a deployment
4756 # target of 10.4, that's the first OSX
4757 # release with Intel support.
4758 cur_target="10.4"
4759 fi
4760 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004761 fi
4762 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4763
4764 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4765 # environment with a value that is the same as what we'll use
4766 # in the Makefile to ensure that we'll get the same compiler
4767 # environment during configure and build time.
4768 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4769 export MACOSX_DEPLOYMENT_TARGET
4770 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4771
4772 ;;
4773 OSF*)
4774 BASECFLAGS="$BASECFLAGS -mieee"
4775 ;;
4776 esac
4777 ;;
4778
4779*)
4780 case $ac_sys_system in
4781 OpenUNIX*|UnixWare*)
4782 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4783 ;;
4784 OSF*)
4785 BASECFLAGS="$BASECFLAGS -ieee -std"
4786 ;;
4787 SCO_SV*)
4788 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4789 ;;
4790 esac
4791 ;;
4792esac
4793
4794if test "$Py_DEBUG" = 'true'; then
4795 :
4796else
4797 OPT="-DNDEBUG $OPT"
4798fi
4799
4800if test "$ac_arch_flags"
4801then
4802 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4803fi
4804
4805# disable check for icc since it seems to pass, but generates a warning
4806if test "$CC" = icc
4807then
4808 ac_cv_opt_olimit_ok=no
4809fi
4810
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004811{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4812echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004813if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004814 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004815else
4816 ac_save_cc="$CC"
4817CC="$CC -OPT:Olimit=0"
Gregory P. Smith373469a2009-11-01 21:03:38 +00004818cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004819/* confdefs.h. */
4820_ACEOF
4821cat confdefs.h >>conftest.$ac_ext
4822cat >>conftest.$ac_ext <<_ACEOF
4823/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004824
4825int
4826main ()
4827{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004828int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004829 ;
4830 return 0;
4831}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004832_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004833rm -f conftest.$ac_objext
4834if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004835case "(($ac_try" in
4836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4837 *) ac_try_echo=$ac_try;;
4838esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004840 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004841 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004842 grep -v '^ *+' conftest.er1 >conftest.err
4843 rm -f conftest.er1
4844 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004846 (exit $ac_status); } && {
4847 test -z "$ac_c_werror_flag" ||
4848 test ! -s conftest.err
4849 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004850 ac_cv_opt_olimit_ok=yes
4851else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004852 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004853sed 's/^/| /' conftest.$ac_ext >&5
4854
Gregory P. Smith373469a2009-11-01 21:03:38 +00004855 ac_cv_opt_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004856fi
4857
Gregory P. Smith373469a2009-11-01 21:03:38 +00004858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004859CC="$ac_save_cc"
4860fi
4861
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004862{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4863echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004864if test $ac_cv_opt_olimit_ok = yes; then
4865 case $ac_sys_system in
4866 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4867 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4868 # environment?
4869 Darwin*)
4870 ;;
4871 *)
4872 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4873 ;;
4874 esac
4875else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004876 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4877echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004878 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004879 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004880else
4881 ac_save_cc="$CC"
4882 CC="$CC -Olimit 1500"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004883 cat >conftest.$ac_ext <<_ACEOF
4884/* confdefs.h. */
4885_ACEOF
4886cat confdefs.h >>conftest.$ac_ext
4887cat >>conftest.$ac_ext <<_ACEOF
4888/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004889
4890int
4891main ()
4892{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004893int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004894 ;
4895 return 0;
4896}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004897_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004898rm -f conftest.$ac_objext
4899if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004900case "(($ac_try" in
4901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4902 *) ac_try_echo=$ac_try;;
4903esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004905 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004906 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004907 grep -v '^ *+' conftest.er1 >conftest.err
4908 rm -f conftest.er1
4909 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004911 (exit $ac_status); } && {
4912 test -z "$ac_c_werror_flag" ||
4913 test ! -s conftest.err
4914 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004915 ac_cv_olimit_ok=yes
4916else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004917 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004918sed 's/^/| /' conftest.$ac_ext >&5
4919
Gregory P. Smith373469a2009-11-01 21:03:38 +00004920 ac_cv_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004921fi
4922
Gregory P. Smith373469a2009-11-01 21:03:38 +00004923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004924 CC="$ac_save_cc"
4925fi
4926
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004927 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4928echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004929 if test $ac_cv_olimit_ok = yes; then
4930 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4931 fi
4932fi
4933
4934# Check whether GCC supports PyArg_ParseTuple format
4935if test "$GCC" = "yes"
4936then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004937 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4938echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004939 save_CFLAGS=$CFLAGS
4940 CFLAGS="$CFLAGS -Werror"
4941 cat >conftest.$ac_ext <<_ACEOF
4942/* confdefs.h. */
4943_ACEOF
4944cat confdefs.h >>conftest.$ac_ext
4945cat >>conftest.$ac_ext <<_ACEOF
4946/* end confdefs.h. */
4947
4948 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4949
4950int
4951main ()
4952{
4953
4954 ;
4955 return 0;
4956}
4957_ACEOF
4958rm -f conftest.$ac_objext
4959if { (ac_try="$ac_compile"
4960case "(($ac_try" in
4961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4962 *) ac_try_echo=$ac_try;;
4963esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004965 (eval "$ac_compile") 2>conftest.er1
4966 ac_status=$?
4967 grep -v '^ *+' conftest.er1 >conftest.err
4968 rm -f conftest.er1
4969 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004971 (exit $ac_status); } && {
4972 test -z "$ac_c_werror_flag" ||
4973 test ! -s conftest.err
4974 } && test -s conftest.$ac_objext; then
4975
4976cat >>confdefs.h <<\_ACEOF
4977#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4978_ACEOF
4979
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004980 { echo "$as_me:$LINENO: result: yes" >&5
4981echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004982else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004983 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004984sed 's/^/| /' conftest.$ac_ext >&5
4985
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004986 { echo "$as_me:$LINENO: result: no" >&5
4987echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004988
4989fi
4990
4991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4992 CFLAGS=$save_CFLAGS
4993fi
4994
4995# On some compilers, pthreads are available without further options
4996# (e.g. MacOS X). On some of these systems, the compiler will not
4997# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4998# So we have to see first whether pthreads are available without
4999# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005000{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5001echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005002if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005003 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005004else
5005 if test "$cross_compiling" = yes; then
5006 ac_cv_pthread_is_default=no
5007else
5008 cat >conftest.$ac_ext <<_ACEOF
5009/* confdefs.h. */
5010_ACEOF
5011cat confdefs.h >>conftest.$ac_ext
5012cat >>conftest.$ac_ext <<_ACEOF
5013/* end confdefs.h. */
5014
5015#include <pthread.h>
5016
5017void* routine(void* p){return NULL;}
5018
5019int main(){
5020 pthread_t p;
5021 if(pthread_create(&p,NULL,routine,NULL)!=0)
5022 return 1;
5023 (void)pthread_detach(p);
5024 return 0;
5025}
5026
5027_ACEOF
5028rm -f conftest$ac_exeext
5029if { (ac_try="$ac_link"
5030case "(($ac_try" in
5031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5032 *) ac_try_echo=$ac_try;;
5033esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005035 (eval "$ac_link") 2>&5
5036 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005038 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5039 { (case "(($ac_try" in
5040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5041 *) ac_try_echo=$ac_try;;
5042esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005044 (eval "$ac_try") 2>&5
5045 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005047 (exit $ac_status); }; }; then
5048
5049 ac_cv_pthread_is_default=yes
5050 ac_cv_kthread=no
5051 ac_cv_pthread=no
5052
5053else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005054 echo "$as_me: program exited with status $ac_status" >&5
5055echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005056sed 's/^/| /' conftest.$ac_ext >&5
5057
5058( exit $ac_status )
5059ac_cv_pthread_is_default=no
5060fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5062fi
5063
5064
5065
5066fi
5067
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005068{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5069echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005070
5071
5072if test $ac_cv_pthread_is_default = yes
5073then
5074 ac_cv_kpthread=no
5075else
5076# -Kpthread, if available, provides the right #defines
5077# and linker options to make pthread_create available
5078# Some compilers won't report that they do not support -Kpthread,
5079# so we need to run a program to see whether it really made the
5080# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005081{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5082echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005083if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005084 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005085else
5086 ac_save_cc="$CC"
5087CC="$CC -Kpthread"
5088if test "$cross_compiling" = yes; then
5089 ac_cv_kpthread=no
5090else
5091 cat >conftest.$ac_ext <<_ACEOF
5092/* confdefs.h. */
5093_ACEOF
5094cat confdefs.h >>conftest.$ac_ext
5095cat >>conftest.$ac_ext <<_ACEOF
5096/* end confdefs.h. */
5097
5098#include <pthread.h>
5099
5100void* routine(void* p){return NULL;}
5101
5102int main(){
5103 pthread_t p;
5104 if(pthread_create(&p,NULL,routine,NULL)!=0)
5105 return 1;
5106 (void)pthread_detach(p);
5107 return 0;
5108}
5109
5110_ACEOF
5111rm -f conftest$ac_exeext
5112if { (ac_try="$ac_link"
5113case "(($ac_try" in
5114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5115 *) ac_try_echo=$ac_try;;
5116esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005118 (eval "$ac_link") 2>&5
5119 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005121 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5122 { (case "(($ac_try" in
5123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5124 *) ac_try_echo=$ac_try;;
5125esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005127 (eval "$ac_try") 2>&5
5128 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005130 (exit $ac_status); }; }; then
5131 ac_cv_kpthread=yes
5132else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005133 echo "$as_me: program exited with status $ac_status" >&5
5134echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005135sed 's/^/| /' conftest.$ac_ext >&5
5136
5137( exit $ac_status )
5138ac_cv_kpthread=no
5139fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005140rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5141fi
5142
5143
5144CC="$ac_save_cc"
5145fi
5146
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005147{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5148echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005149fi
5150
5151if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5152then
5153# -Kthread, if available, provides the right #defines
5154# and linker options to make pthread_create available
5155# Some compilers won't report that they do not support -Kthread,
5156# so we need to run a program to see whether it really made the
5157# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005158{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5159echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005160if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005161 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005162else
5163 ac_save_cc="$CC"
5164CC="$CC -Kthread"
5165if test "$cross_compiling" = yes; then
5166 ac_cv_kthread=no
5167else
5168 cat >conftest.$ac_ext <<_ACEOF
5169/* confdefs.h. */
5170_ACEOF
5171cat confdefs.h >>conftest.$ac_ext
5172cat >>conftest.$ac_ext <<_ACEOF
5173/* end confdefs.h. */
5174
5175#include <pthread.h>
5176
5177void* routine(void* p){return NULL;}
5178
5179int main(){
5180 pthread_t p;
5181 if(pthread_create(&p,NULL,routine,NULL)!=0)
5182 return 1;
5183 (void)pthread_detach(p);
5184 return 0;
5185}
5186
5187_ACEOF
5188rm -f conftest$ac_exeext
5189if { (ac_try="$ac_link"
5190case "(($ac_try" in
5191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5192 *) ac_try_echo=$ac_try;;
5193esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005195 (eval "$ac_link") 2>&5
5196 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005198 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5199 { (case "(($ac_try" in
5200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5201 *) ac_try_echo=$ac_try;;
5202esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005204 (eval "$ac_try") 2>&5
5205 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005207 (exit $ac_status); }; }; then
5208 ac_cv_kthread=yes
5209else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005210 echo "$as_me: program exited with status $ac_status" >&5
5211echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005212sed 's/^/| /' conftest.$ac_ext >&5
5213
5214( exit $ac_status )
5215ac_cv_kthread=no
5216fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5218fi
5219
5220
5221CC="$ac_save_cc"
5222fi
5223
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005224{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5225echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005226fi
5227
5228if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5229then
5230# -pthread, if available, provides the right #defines
5231# and linker options to make pthread_create available
5232# Some compilers won't report that they do not support -pthread,
5233# so we need to run a program to see whether it really made the
5234# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005235{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5236echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005237if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005238 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005239else
5240 ac_save_cc="$CC"
5241CC="$CC -pthread"
5242if test "$cross_compiling" = yes; then
5243 ac_cv_pthread=no
5244else
5245 cat >conftest.$ac_ext <<_ACEOF
5246/* confdefs.h. */
5247_ACEOF
5248cat confdefs.h >>conftest.$ac_ext
5249cat >>conftest.$ac_ext <<_ACEOF
5250/* end confdefs.h. */
5251
5252#include <pthread.h>
5253
5254void* routine(void* p){return NULL;}
5255
5256int main(){
5257 pthread_t p;
5258 if(pthread_create(&p,NULL,routine,NULL)!=0)
5259 return 1;
5260 (void)pthread_detach(p);
5261 return 0;
5262}
5263
5264_ACEOF
5265rm -f conftest$ac_exeext
5266if { (ac_try="$ac_link"
5267case "(($ac_try" in
5268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5269 *) ac_try_echo=$ac_try;;
5270esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005272 (eval "$ac_link") 2>&5
5273 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005275 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5276 { (case "(($ac_try" in
5277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5278 *) ac_try_echo=$ac_try;;
5279esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005281 (eval "$ac_try") 2>&5
5282 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005284 (exit $ac_status); }; }; then
5285 ac_cv_pthread=yes
5286else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005287 echo "$as_me: program exited with status $ac_status" >&5
5288echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005289sed 's/^/| /' conftest.$ac_ext >&5
5290
5291( exit $ac_status )
5292ac_cv_pthread=no
5293fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005294rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5295fi
5296
5297
5298CC="$ac_save_cc"
5299fi
5300
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005301{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5302echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005303fi
5304
5305# If we have set a CC compiler flag for thread support then
5306# check if it works for CXX, too.
5307ac_cv_cxx_thread=no
5308if test ! -z "$CXX"
5309then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005310{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5311echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005312ac_save_cxx="$CXX"
5313
5314if test "$ac_cv_kpthread" = "yes"
5315then
5316 CXX="$CXX -Kpthread"
5317 ac_cv_cxx_thread=yes
5318elif test "$ac_cv_kthread" = "yes"
5319then
5320 CXX="$CXX -Kthread"
5321 ac_cv_cxx_thread=yes
5322elif test "$ac_cv_pthread" = "yes"
5323then
5324 CXX="$CXX -pthread"
5325 ac_cv_cxx_thread=yes
5326fi
5327
5328if test $ac_cv_cxx_thread = yes
5329then
5330 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5331 $CXX -c conftest.$ac_ext 2>&5
5332 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5333 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5334 then
5335 ac_cv_cxx_thread=yes
5336 else
5337 ac_cv_cxx_thread=no
5338 fi
5339 rm -fr conftest*
5340fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005341{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5342echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005343fi
5344CXX="$ac_save_cxx"
5345
5346
5347# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005348{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5349echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005350if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005351 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005352else
5353 cat >conftest.$ac_ext <<_ACEOF
5354/* confdefs.h. */
5355_ACEOF
5356cat confdefs.h >>conftest.$ac_ext
5357cat >>conftest.$ac_ext <<_ACEOF
5358/* end confdefs.h. */
5359#include <stdlib.h>
5360#include <stdarg.h>
5361#include <string.h>
5362#include <float.h>
5363
5364int
5365main ()
5366{
5367
5368 ;
5369 return 0;
5370}
5371_ACEOF
5372rm -f conftest.$ac_objext
5373if { (ac_try="$ac_compile"
5374case "(($ac_try" in
5375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5376 *) ac_try_echo=$ac_try;;
5377esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005379 (eval "$ac_compile") 2>conftest.er1
5380 ac_status=$?
5381 grep -v '^ *+' conftest.er1 >conftest.err
5382 rm -f conftest.er1
5383 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005385 (exit $ac_status); } && {
5386 test -z "$ac_c_werror_flag" ||
5387 test ! -s conftest.err
5388 } && test -s conftest.$ac_objext; then
5389 ac_cv_header_stdc=yes
5390else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005391 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005392sed 's/^/| /' conftest.$ac_ext >&5
5393
5394 ac_cv_header_stdc=no
5395fi
5396
5397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5398
5399if test $ac_cv_header_stdc = yes; then
5400 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5401 cat >conftest.$ac_ext <<_ACEOF
5402/* confdefs.h. */
5403_ACEOF
5404cat confdefs.h >>conftest.$ac_ext
5405cat >>conftest.$ac_ext <<_ACEOF
5406/* end confdefs.h. */
5407#include <string.h>
5408
5409_ACEOF
5410if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5411 $EGREP "memchr" >/dev/null 2>&1; then
5412 :
5413else
5414 ac_cv_header_stdc=no
5415fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +00005416rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005417
5418fi
5419
5420if test $ac_cv_header_stdc = yes; then
5421 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5422 cat >conftest.$ac_ext <<_ACEOF
5423/* confdefs.h. */
5424_ACEOF
5425cat confdefs.h >>conftest.$ac_ext
5426cat >>conftest.$ac_ext <<_ACEOF
5427/* end confdefs.h. */
5428#include <stdlib.h>
5429
5430_ACEOF
5431if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5432 $EGREP "free" >/dev/null 2>&1; then
5433 :
5434else
5435 ac_cv_header_stdc=no
5436fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +00005437rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005438
5439fi
5440
5441if test $ac_cv_header_stdc = yes; then
5442 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5443 if test "$cross_compiling" = yes; then
5444 :
5445else
5446 cat >conftest.$ac_ext <<_ACEOF
5447/* confdefs.h. */
5448_ACEOF
5449cat confdefs.h >>conftest.$ac_ext
5450cat >>conftest.$ac_ext <<_ACEOF
5451/* end confdefs.h. */
5452#include <ctype.h>
5453#include <stdlib.h>
5454#if ((' ' & 0x0FF) == 0x020)
5455# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5456# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5457#else
5458# define ISLOWER(c) \
5459 (('a' <= (c) && (c) <= 'i') \
5460 || ('j' <= (c) && (c) <= 'r') \
5461 || ('s' <= (c) && (c) <= 'z'))
5462# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5463#endif
5464
5465#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5466int
5467main ()
5468{
5469 int i;
5470 for (i = 0; i < 256; i++)
5471 if (XOR (islower (i), ISLOWER (i))
5472 || toupper (i) != TOUPPER (i))
5473 return 2;
5474 return 0;
5475}
5476_ACEOF
5477rm -f conftest$ac_exeext
5478if { (ac_try="$ac_link"
5479case "(($ac_try" in
5480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5481 *) ac_try_echo=$ac_try;;
5482esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005484 (eval "$ac_link") 2>&5
5485 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005487 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5488 { (case "(($ac_try" in
5489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5490 *) ac_try_echo=$ac_try;;
5491esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005493 (eval "$ac_try") 2>&5
5494 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005496 (exit $ac_status); }; }; then
5497 :
5498else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005499 echo "$as_me: program exited with status $ac_status" >&5
5500echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005501sed 's/^/| /' conftest.$ac_ext >&5
5502
5503( exit $ac_status )
5504ac_cv_header_stdc=no
5505fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5507fi
5508
5509
5510fi
5511fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005512{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5513echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005514if test $ac_cv_header_stdc = yes; then
5515
5516cat >>confdefs.h <<\_ACEOF
5517#define STDC_HEADERS 1
5518_ACEOF
5519
5520fi
5521
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005522# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5533 inttypes.h stdint.h unistd.h
5534do
5535as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5536{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5537echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5538if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5539 echo $ECHO_N "(cached) $ECHO_C" >&6
5540else
5541 cat >conftest.$ac_ext <<_ACEOF
5542/* confdefs.h. */
5543_ACEOF
5544cat confdefs.h >>conftest.$ac_ext
5545cat >>conftest.$ac_ext <<_ACEOF
5546/* end confdefs.h. */
5547$ac_includes_default
5548
5549#include <$ac_header>
5550_ACEOF
5551rm -f conftest.$ac_objext
5552if { (ac_try="$ac_compile"
5553case "(($ac_try" in
5554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5555 *) ac_try_echo=$ac_try;;
5556esac
5557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5558 (eval "$ac_compile") 2>conftest.er1
5559 ac_status=$?
5560 grep -v '^ *+' conftest.er1 >conftest.err
5561 rm -f conftest.er1
5562 cat conftest.err >&5
5563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5564 (exit $ac_status); } && {
5565 test -z "$ac_c_werror_flag" ||
5566 test ! -s conftest.err
5567 } && test -s conftest.$ac_objext; then
5568 eval "$as_ac_Header=yes"
5569else
5570 echo "$as_me: failed program was:" >&5
5571sed 's/^/| /' conftest.$ac_ext >&5
5572
5573 eval "$as_ac_Header=no"
5574fi
5575
5576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5577fi
5578ac_res=`eval echo '${'$as_ac_Header'}'`
5579 { echo "$as_me:$LINENO: result: $ac_res" >&5
5580echo "${ECHO_T}$ac_res" >&6; }
5581if test `eval echo '${'$as_ac_Header'}'` = yes; then
5582 cat >>confdefs.h <<_ACEOF
5583#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5584_ACEOF
5585
5586fi
5587
5588done
5589
5590
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005591
Martin v. Löwis11437992002-04-12 09:54:03 +00005592
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
5626
Anthony Baxter8a560de2004-10-13 15:30:56 +00005627
Martin v. Löwisc3001752005-01-23 09:27:24 +00005628
Martin v. Löwis11017b12006-01-14 18:12:57 +00005629
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005630
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005631
5632
5633
5634
5635
5636
5637
5638
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005639
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005640
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005641
5642
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005643
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005644
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005645for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5646fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005647ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005648shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005649unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005650sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5651sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005652sys/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 +00005653sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005654sys/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 +00005655sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005656bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005657do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005658as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005659if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005660 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5661echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005662if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005663 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005664fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005665ac_res=`eval echo '${'$as_ac_Header'}'`
5666 { echo "$as_me:$LINENO: result: $ac_res" >&5
5667echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005668else
Martin v. Löwis11437992002-04-12 09:54:03 +00005669 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005670{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5671echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005672cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005673/* confdefs.h. */
5674_ACEOF
5675cat confdefs.h >>conftest.$ac_ext
5676cat >>conftest.$ac_ext <<_ACEOF
5677/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005678$ac_includes_default
5679#include <$ac_header>
5680_ACEOF
5681rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005682if { (ac_try="$ac_compile"
5683case "(($ac_try" in
5684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5685 *) ac_try_echo=$ac_try;;
5686esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005688 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005690 grep -v '^ *+' conftest.er1 >conftest.err
5691 rm -f conftest.er1
5692 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005694 (exit $ac_status); } && {
5695 test -z "$ac_c_werror_flag" ||
5696 test ! -s conftest.err
5697 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005698 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005701sed 's/^/| /' conftest.$ac_ext >&5
5702
Martin v. Löwiseba40652007-08-30 20:10:57 +00005703 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005704fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005705
5706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005707{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5708echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005709
5710# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005711{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5712echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005713cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005714/* confdefs.h. */
5715_ACEOF
5716cat confdefs.h >>conftest.$ac_ext
5717cat >>conftest.$ac_ext <<_ACEOF
5718/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005719#include <$ac_header>
5720_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005721if { (ac_try="$ac_cpp conftest.$ac_ext"
5722case "(($ac_try" in
5723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5724 *) ac_try_echo=$ac_try;;
5725esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005727 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005728 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005729 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005730 rm -f conftest.er1
5731 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005733 (exit $ac_status); } >/dev/null && {
5734 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5735 test ! -s conftest.err
5736 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005737 ac_header_preproc=yes
5738else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005740sed 's/^/| /' conftest.$ac_ext >&5
5741
Martin v. Löwis11437992002-04-12 09:54:03 +00005742 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005743fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005744
Martin v. Löwis11437992002-04-12 09:54:03 +00005745rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005746{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5747echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005748
5749# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005750case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5751 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005752 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5753echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5754 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5755echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005756 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005757 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005758 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005759 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5760echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5761 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5762echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5763 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5764echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5765 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5766echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5767 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5768echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5769 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5770echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005771 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005772## -------------------------------------- ##
5773## Report this to http://bugs.python.org/ ##
5774## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005775_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005776 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005777 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005778esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005779{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5780echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005781if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005782 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005783else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005784 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005785fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005786ac_res=`eval echo '${'$as_ac_Header'}'`
5787 { echo "$as_me:$LINENO: result: $ac_res" >&5
5788echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005789
5790fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005791if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005792 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005793#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005794_ACEOF
5795
5796fi
5797
Guido van Rossum627b2d71993-12-24 10:39:16 +00005798done
5799
Martin v. Löwis11437992002-04-12 09:54:03 +00005800
5801
5802
5803
5804
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005805ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005806for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005807 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5808{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5809echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005810if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005811 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005812else
Martin v. Löwis11437992002-04-12 09:54:03 +00005813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005814/* confdefs.h. */
5815_ACEOF
5816cat confdefs.h >>conftest.$ac_ext
5817cat >>conftest.$ac_ext <<_ACEOF
5818/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005819#include <sys/types.h>
5820#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005821
Martin v. Löwis11437992002-04-12 09:54:03 +00005822int
5823main ()
5824{
5825if ((DIR *) 0)
5826return 0;
5827 ;
5828 return 0;
5829}
5830_ACEOF
5831rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005832if { (ac_try="$ac_compile"
5833case "(($ac_try" in
5834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5835 *) ac_try_echo=$ac_try;;
5836esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005838 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005840 grep -v '^ *+' conftest.er1 >conftest.err
5841 rm -f conftest.er1
5842 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005844 (exit $ac_status); } && {
5845 test -z "$ac_c_werror_flag" ||
5846 test ! -s conftest.err
5847 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005848 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005849else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005851sed 's/^/| /' conftest.$ac_ext >&5
5852
Martin v. Löwiseba40652007-08-30 20:10:57 +00005853 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005855
5856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005857fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005858ac_res=`eval echo '${'$as_ac_Header'}'`
5859 { echo "$as_me:$LINENO: result: $ac_res" >&5
5860echo "${ECHO_T}$ac_res" >&6; }
5861if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005862 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005863#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005864_ACEOF
5865
5866ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005867fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005868
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005869done
5870# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5871if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005872 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5873echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005874if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005875 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005876else
Martin v. Löwis11437992002-04-12 09:54:03 +00005877 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005878cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005879/* confdefs.h. */
5880_ACEOF
5881cat confdefs.h >>conftest.$ac_ext
5882cat >>conftest.$ac_ext <<_ACEOF
5883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005884
Martin v. Löwiseba40652007-08-30 20:10:57 +00005885/* Override any GCC internal prototype to avoid an error.
5886 Use char because int might match the return type of a GCC
5887 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005888#ifdef __cplusplus
5889extern "C"
5890#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005891char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005892int
5893main ()
5894{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005895return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005896 ;
5897 return 0;
5898}
5899_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005900for ac_lib in '' dir; do
5901 if test -z "$ac_lib"; then
5902 ac_res="none required"
5903 else
5904 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005905 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005906 fi
5907 rm -f conftest.$ac_objext conftest$ac_exeext
5908if { (ac_try="$ac_link"
5909case "(($ac_try" in
5910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5911 *) ac_try_echo=$ac_try;;
5912esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005914 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005915 ac_status=$?
5916 grep -v '^ *+' conftest.er1 >conftest.err
5917 rm -f conftest.er1
5918 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005920 (exit $ac_status); } && {
5921 test -z "$ac_c_werror_flag" ||
5922 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005923 } && test -s conftest$ac_exeext &&
5924 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005925 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005926else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005927 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005928sed 's/^/| /' conftest.$ac_ext >&5
5929
Martin v. Löwiseba40652007-08-30 20:10:57 +00005930
Brett Cannon19fab762007-06-02 03:02:29 +00005931fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005932
5933rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5934 conftest$ac_exeext
5935 if test "${ac_cv_search_opendir+set}" = set; then
5936 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005938done
5939if test "${ac_cv_search_opendir+set}" = set; then
5940 :
5941else
5942 ac_cv_search_opendir=no
5943fi
5944rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005945LIBS=$ac_func_search_save_LIBS
5946fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005947{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5948echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005949ac_res=$ac_cv_search_opendir
5950if test "$ac_res" != no; then
5951 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005952
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005953fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005954
Michael W. Hudson54241132001-12-07 15:38:26 +00005955else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005956 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5957echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005958if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005959 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005960else
5961 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005962cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005963/* confdefs.h. */
5964_ACEOF
5965cat confdefs.h >>conftest.$ac_ext
5966cat >>conftest.$ac_ext <<_ACEOF
5967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005968
Martin v. Löwiseba40652007-08-30 20:10:57 +00005969/* Override any GCC internal prototype to avoid an error.
5970 Use char because int might match the return type of a GCC
5971 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005972#ifdef __cplusplus
5973extern "C"
5974#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005975char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005976int
5977main ()
5978{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005979return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005980 ;
5981 return 0;
5982}
5983_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005984for ac_lib in '' x; do
5985 if test -z "$ac_lib"; then
5986 ac_res="none required"
5987 else
5988 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005989 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005990 fi
5991 rm -f conftest.$ac_objext conftest$ac_exeext
5992if { (ac_try="$ac_link"
5993case "(($ac_try" in
5994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5995 *) ac_try_echo=$ac_try;;
5996esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005998 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005999 ac_status=$?
6000 grep -v '^ *+' conftest.er1 >conftest.err
6001 rm -f conftest.er1
6002 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006004 (exit $ac_status); } && {
6005 test -z "$ac_c_werror_flag" ||
6006 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006007 } && test -s conftest$ac_exeext &&
6008 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006009 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006010else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006011 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006012sed 's/^/| /' conftest.$ac_ext >&5
6013
Martin v. Löwiseba40652007-08-30 20:10:57 +00006014
Brett Cannon19fab762007-06-02 03:02:29 +00006015fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006016
6017rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6018 conftest$ac_exeext
6019 if test "${ac_cv_search_opendir+set}" = set; then
6020 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006021fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006022done
6023if test "${ac_cv_search_opendir+set}" = set; then
6024 :
6025else
6026 ac_cv_search_opendir=no
6027fi
6028rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006029LIBS=$ac_func_search_save_LIBS
6030fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006031{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6032echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006033ac_res=$ac_cv_search_opendir
6034if test "$ac_res" != no; then
6035 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006037fi
6038
6039fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006040
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006041{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6042echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006043if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006044 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006045else
6046 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006047/* confdefs.h. */
6048_ACEOF
6049cat confdefs.h >>conftest.$ac_ext
6050cat >>conftest.$ac_ext <<_ACEOF
6051/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006052#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006053int
6054main ()
6055{
6056return makedev(0, 0);
6057 ;
6058 return 0;
6059}
6060_ACEOF
6061rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006062if { (ac_try="$ac_link"
6063case "(($ac_try" in
6064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6065 *) ac_try_echo=$ac_try;;
6066esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006068 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006069 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006070 grep -v '^ *+' conftest.er1 >conftest.err
6071 rm -f conftest.er1
6072 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006074 (exit $ac_status); } && {
6075 test -z "$ac_c_werror_flag" ||
6076 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006077 } && test -s conftest$ac_exeext &&
6078 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006079 ac_cv_header_sys_types_h_makedev=yes
6080else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006082sed 's/^/| /' conftest.$ac_ext >&5
6083
Martin v. Löwiseba40652007-08-30 20:10:57 +00006084 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006085fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006086
6087rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006088 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006089
6090fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006091{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6092echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006093
6094if test $ac_cv_header_sys_types_h_makedev = no; then
6095if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006096 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6097echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006098if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006099 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006100fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006101{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6102echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006103else
6104 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006105{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6106echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006107cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006108/* confdefs.h. */
6109_ACEOF
6110cat confdefs.h >>conftest.$ac_ext
6111cat >>conftest.$ac_ext <<_ACEOF
6112/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006113$ac_includes_default
6114#include <sys/mkdev.h>
6115_ACEOF
6116rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006117if { (ac_try="$ac_compile"
6118case "(($ac_try" in
6119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6120 *) ac_try_echo=$ac_try;;
6121esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006123 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006125 grep -v '^ *+' conftest.er1 >conftest.err
6126 rm -f conftest.er1
6127 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006129 (exit $ac_status); } && {
6130 test -z "$ac_c_werror_flag" ||
6131 test ! -s conftest.err
6132 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006133 ac_header_compiler=yes
6134else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006136sed 's/^/| /' conftest.$ac_ext >&5
6137
Martin v. Löwiseba40652007-08-30 20:10:57 +00006138 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006140
6141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006142{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6143echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006144
6145# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006146{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6147echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006148cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006149/* confdefs.h. */
6150_ACEOF
6151cat confdefs.h >>conftest.$ac_ext
6152cat >>conftest.$ac_ext <<_ACEOF
6153/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006154#include <sys/mkdev.h>
6155_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006156if { (ac_try="$ac_cpp conftest.$ac_ext"
6157case "(($ac_try" in
6158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6159 *) ac_try_echo=$ac_try;;
6160esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006162 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006164 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006165 rm -f conftest.er1
6166 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006168 (exit $ac_status); } >/dev/null && {
6169 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6170 test ! -s conftest.err
6171 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172 ac_header_preproc=yes
6173else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006174 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006175sed 's/^/| /' conftest.$ac_ext >&5
6176
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006177 ac_header_preproc=no
6178fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006179
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006180rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006181{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6182echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006183
6184# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006185case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6186 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006187 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6188echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6189 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6190echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006191 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006192 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006193 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006194 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6195echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6196 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6197echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6198 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6199echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6200 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6201echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6202 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6203echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6204 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6205echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006206 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006207## -------------------------------------- ##
6208## Report this to http://bugs.python.org/ ##
6209## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006210_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006211 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006212 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006214{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6215echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006216if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006217 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006218else
6219 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6220fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006221{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6222echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006223
6224fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006225if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006226
6227cat >>confdefs.h <<\_ACEOF
6228#define MAJOR_IN_MKDEV 1
6229_ACEOF
6230
6231fi
6232
6233
6234
6235 if test $ac_cv_header_sys_mkdev_h = no; then
6236 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006237 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6238echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006239if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006240 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006241fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006242{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6243echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006244else
6245 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006246{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6247echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006248cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006249/* confdefs.h. */
6250_ACEOF
6251cat confdefs.h >>conftest.$ac_ext
6252cat >>conftest.$ac_ext <<_ACEOF
6253/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006254$ac_includes_default
6255#include <sys/sysmacros.h>
6256_ACEOF
6257rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006258if { (ac_try="$ac_compile"
6259case "(($ac_try" in
6260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6261 *) ac_try_echo=$ac_try;;
6262esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006264 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006266 grep -v '^ *+' conftest.er1 >conftest.err
6267 rm -f conftest.er1
6268 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006270 (exit $ac_status); } && {
6271 test -z "$ac_c_werror_flag" ||
6272 test ! -s conftest.err
6273 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006274 ac_header_compiler=yes
6275else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006277sed 's/^/| /' conftest.$ac_ext >&5
6278
Martin v. Löwiseba40652007-08-30 20:10:57 +00006279 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006281
6282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006283{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6284echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006285
6286# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006287{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6288echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006289cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006290/* confdefs.h. */
6291_ACEOF
6292cat confdefs.h >>conftest.$ac_ext
6293cat >>conftest.$ac_ext <<_ACEOF
6294/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006295#include <sys/sysmacros.h>
6296_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006297if { (ac_try="$ac_cpp conftest.$ac_ext"
6298case "(($ac_try" in
6299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6300 *) ac_try_echo=$ac_try;;
6301esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006303 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006305 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006306 rm -f conftest.er1
6307 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006309 (exit $ac_status); } >/dev/null && {
6310 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6311 test ! -s conftest.err
6312 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006313 ac_header_preproc=yes
6314else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006315 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006316sed 's/^/| /' conftest.$ac_ext >&5
6317
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006318 ac_header_preproc=no
6319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006320
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006321rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006322{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6323echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006324
6325# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006326case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6327 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006328 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6329echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6330 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6331echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006332 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006333 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006334 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006335 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6336echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6337 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6338echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6339 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6340echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6341 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6342echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6343 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6344echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6345 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6346echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006347 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006348## -------------------------------------- ##
6349## Report this to http://bugs.python.org/ ##
6350## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006351_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006352 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006353 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006354esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006355{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6356echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006357if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006358 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006359else
6360 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6361fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006362{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6363echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006364
6365fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006366if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006367
6368cat >>confdefs.h <<\_ACEOF
6369#define MAJOR_IN_SYSMACROS 1
6370_ACEOF
6371
6372fi
6373
6374
6375 fi
6376fi
6377
Michael W. Hudson54241132001-12-07 15:38:26 +00006378
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006379# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006380
6381for ac_header in term.h
6382do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006383as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6384{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6385echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006386if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006387 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006388else
6389 cat >conftest.$ac_ext <<_ACEOF
6390/* confdefs.h. */
6391_ACEOF
6392cat confdefs.h >>conftest.$ac_ext
6393cat >>conftest.$ac_ext <<_ACEOF
6394/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006395
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006396#ifdef HAVE_CURSES_H
6397#include <curses.h>
6398#endif
6399
6400
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006401#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006402_ACEOF
6403rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006404if { (ac_try="$ac_compile"
6405case "(($ac_try" in
6406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6407 *) ac_try_echo=$ac_try;;
6408esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006410 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006411 ac_status=$?
6412 grep -v '^ *+' conftest.er1 >conftest.err
6413 rm -f conftest.er1
6414 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006416 (exit $ac_status); } && {
6417 test -z "$ac_c_werror_flag" ||
6418 test ! -s conftest.err
6419 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006420 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006421else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006422 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006423sed 's/^/| /' conftest.$ac_ext >&5
6424
Martin v. Löwiseba40652007-08-30 20:10:57 +00006425 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006427
6428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006429fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006430ac_res=`eval echo '${'$as_ac_Header'}'`
6431 { echo "$as_me:$LINENO: result: $ac_res" >&5
6432echo "${ECHO_T}$ac_res" >&6; }
6433if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006434 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006435#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006436_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006437
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006438fi
6439
6440done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006441
6442
Martin v. Löwis11017b12006-01-14 18:12:57 +00006443# On Linux, netlink.h requires asm/types.h
6444
6445for ac_header in linux/netlink.h
6446do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006447as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6448{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6449echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006450if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006451 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006452else
6453 cat >conftest.$ac_ext <<_ACEOF
6454/* confdefs.h. */
6455_ACEOF
6456cat confdefs.h >>conftest.$ac_ext
6457cat >>conftest.$ac_ext <<_ACEOF
6458/* end confdefs.h. */
6459
6460#ifdef HAVE_ASM_TYPES_H
6461#include <asm/types.h>
6462#endif
6463#ifdef HAVE_SYS_SOCKET_H
6464#include <sys/socket.h>
6465#endif
6466
6467
6468#include <$ac_header>
6469_ACEOF
6470rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006471if { (ac_try="$ac_compile"
6472case "(($ac_try" in
6473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6474 *) ac_try_echo=$ac_try;;
6475esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006477 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006478 ac_status=$?
6479 grep -v '^ *+' conftest.er1 >conftest.err
6480 rm -f conftest.er1
6481 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006483 (exit $ac_status); } && {
6484 test -z "$ac_c_werror_flag" ||
6485 test ! -s conftest.err
6486 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006487 eval "$as_ac_Header=yes"
6488else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006489 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006490sed 's/^/| /' conftest.$ac_ext >&5
6491
Martin v. Löwiseba40652007-08-30 20:10:57 +00006492 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006493fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006494
6495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006496fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006497ac_res=`eval echo '${'$as_ac_Header'}'`
6498 { echo "$as_me:$LINENO: result: $ac_res" >&5
6499echo "${ECHO_T}$ac_res" >&6; }
6500if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006501 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006502#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006503_ACEOF
6504
6505fi
6506
6507done
6508
6509
Guido van Rossum627b2d71993-12-24 10:39:16 +00006510# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006511was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006512{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6513echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006514cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006515/* confdefs.h. */
6516_ACEOF
6517cat confdefs.h >>conftest.$ac_ext
6518cat >>conftest.$ac_ext <<_ACEOF
6519/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006520#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006521
6522_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006523if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006524 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006525 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006526else
Martin v. Löwis11437992002-04-12 09:54:03 +00006527
6528
6529cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006530#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006531_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006532
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006533
Guido van Rossum627b2d71993-12-24 10:39:16 +00006534fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +00006535rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006536
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006537{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6538echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006539
Neal Norwitz11690112002-07-30 01:08:28 +00006540# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006541{ echo "$as_me:$LINENO: checking for makedev" >&5
6542echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006543cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006544/* confdefs.h. */
6545_ACEOF
6546cat confdefs.h >>conftest.$ac_ext
6547cat >>conftest.$ac_ext <<_ACEOF
6548/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006549#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006550int
6551main ()
6552{
6553 makedev(0, 0)
6554 ;
6555 return 0;
6556}
6557_ACEOF
6558rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006559if { (ac_try="$ac_link"
6560case "(($ac_try" in
6561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6562 *) ac_try_echo=$ac_try;;
6563esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006565 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006567 grep -v '^ *+' conftest.er1 >conftest.err
6568 rm -f conftest.er1
6569 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006571 (exit $ac_status); } && {
6572 test -z "$ac_c_werror_flag" ||
6573 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006574 } && test -s conftest$ac_exeext &&
6575 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006576 ac_cv_has_makedev=yes
6577else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006579sed 's/^/| /' conftest.$ac_ext >&5
6580
Martin v. Löwiseba40652007-08-30 20:10:57 +00006581 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006583
6584rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006585 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006586if test "$ac_cv_has_makedev" = "no"; then
6587 # we didn't link, try if _OSF_SOURCE will allow us to link
6588 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006589/* confdefs.h. */
6590_ACEOF
6591cat confdefs.h >>conftest.$ac_ext
6592cat >>conftest.$ac_ext <<_ACEOF
6593/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006594
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006595#define _OSF_SOURCE 1
6596#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006597
Neal Norwitz11690112002-07-30 01:08:28 +00006598int
6599main ()
6600{
6601 makedev(0, 0)
6602 ;
6603 return 0;
6604}
6605_ACEOF
6606rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006607if { (ac_try="$ac_link"
6608case "(($ac_try" in
6609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6610 *) ac_try_echo=$ac_try;;
6611esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006613 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006615 grep -v '^ *+' conftest.er1 >conftest.err
6616 rm -f conftest.er1
6617 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006619 (exit $ac_status); } && {
6620 test -z "$ac_c_werror_flag" ||
6621 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006622 } && test -s conftest$ac_exeext &&
6623 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006624 ac_cv_has_makedev=yes
6625else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006627sed 's/^/| /' conftest.$ac_ext >&5
6628
Martin v. Löwiseba40652007-08-30 20:10:57 +00006629 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006631
6632rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006633 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006634 if test "$ac_cv_has_makedev" = "yes"; then
6635
6636cat >>confdefs.h <<\_ACEOF
6637#define _OSF_SOURCE 1
6638_ACEOF
6639
6640 fi
6641fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006642{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6643echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006644if test "$ac_cv_has_makedev" = "yes"; then
6645
6646cat >>confdefs.h <<\_ACEOF
6647#define HAVE_MAKEDEV 1
6648_ACEOF
6649
6650fi
6651
Martin v. Löwis399a6892002-10-04 10:22:02 +00006652# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6653# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6654# defined, but the compiler does not support pragma redefine_extname,
6655# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6656# structures (such as rlimit64) without declaring them. As a
6657# work-around, disable LFS on such configurations
6658
6659use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006660{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6661echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006662cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006663/* confdefs.h. */
6664_ACEOF
6665cat confdefs.h >>conftest.$ac_ext
6666cat >>conftest.$ac_ext <<_ACEOF
6667/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006668
6669#define _LARGEFILE_SOURCE 1
6670#define _FILE_OFFSET_BITS 64
6671#include <sys/resource.h>
6672
Martin v. Löwis399a6892002-10-04 10:22:02 +00006673int
6674main ()
6675{
6676struct rlimit foo;
6677 ;
6678 return 0;
6679}
6680_ACEOF
6681rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006682if { (ac_try="$ac_compile"
6683case "(($ac_try" in
6684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6685 *) ac_try_echo=$ac_try;;
6686esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006688 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006690 grep -v '^ *+' conftest.er1 >conftest.err
6691 rm -f conftest.er1
6692 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006694 (exit $ac_status); } && {
6695 test -z "$ac_c_werror_flag" ||
6696 test ! -s conftest.err
6697 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006698 sol_lfs_bug=no
6699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006701sed 's/^/| /' conftest.$ac_ext >&5
6702
Martin v. Löwiseba40652007-08-30 20:10:57 +00006703 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006704fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006705
6706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006707{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6708echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006709if test "$sol_lfs_bug" = "yes"; then
6710 use_lfs=no
6711fi
6712
6713if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006714# Two defines needed to enable largefile support on various platforms
6715# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006716
Martin v. Löwis11437992002-04-12 09:54:03 +00006717cat >>confdefs.h <<\_ACEOF
6718#define _LARGEFILE_SOURCE 1
6719_ACEOF
6720
6721
6722cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006723#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006724_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006725
Martin v. Löwis399a6892002-10-04 10:22:02 +00006726fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006727
Guido van Rossum84e7b241996-08-19 21:59:00 +00006728# Add some code to confdefs.h so that the test for off_t works on SCO
6729cat >> confdefs.h <<\EOF
6730#if defined(SCO_DS)
6731#undef _OFF_T
6732#endif
6733EOF
6734
Guido van Rossumef2255b2000-03-10 22:30:29 +00006735# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006736{ echo "$as_me:$LINENO: checking for mode_t" >&5
6737echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006738if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006739 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006740else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006741 cat >conftest.$ac_ext <<_ACEOF
6742/* confdefs.h. */
6743_ACEOF
6744cat confdefs.h >>conftest.$ac_ext
6745cat >>conftest.$ac_ext <<_ACEOF
6746/* end confdefs.h. */
6747$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006748typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006749int
6750main ()
6751{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006752if ((ac__type_new_ *) 0)
6753 return 0;
6754if (sizeof (ac__type_new_))
6755 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006756 ;
6757 return 0;
6758}
6759_ACEOF
6760rm -f conftest.$ac_objext
6761if { (ac_try="$ac_compile"
6762case "(($ac_try" in
6763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6764 *) ac_try_echo=$ac_try;;
6765esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006767 (eval "$ac_compile") 2>conftest.er1
6768 ac_status=$?
6769 grep -v '^ *+' conftest.er1 >conftest.err
6770 rm -f conftest.er1
6771 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006773 (exit $ac_status); } && {
6774 test -z "$ac_c_werror_flag" ||
6775 test ! -s conftest.err
6776 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006777 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006778else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006780sed 's/^/| /' conftest.$ac_ext >&5
6781
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006782 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006784
6785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006786fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006787{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6788echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6789if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006790 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006791else
Martin v. Löwis11437992002-04-12 09:54:03 +00006792
6793cat >>confdefs.h <<_ACEOF
6794#define mode_t int
6795_ACEOF
6796
6797fi
6798
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006799{ echo "$as_me:$LINENO: checking for off_t" >&5
6800echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006801if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006802 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006803else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006804 cat >conftest.$ac_ext <<_ACEOF
6805/* confdefs.h. */
6806_ACEOF
6807cat confdefs.h >>conftest.$ac_ext
6808cat >>conftest.$ac_ext <<_ACEOF
6809/* end confdefs.h. */
6810$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006811typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006812int
6813main ()
6814{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006815if ((ac__type_new_ *) 0)
6816 return 0;
6817if (sizeof (ac__type_new_))
6818 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006819 ;
6820 return 0;
6821}
6822_ACEOF
6823rm -f conftest.$ac_objext
6824if { (ac_try="$ac_compile"
6825case "(($ac_try" in
6826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6827 *) ac_try_echo=$ac_try;;
6828esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006830 (eval "$ac_compile") 2>conftest.er1
6831 ac_status=$?
6832 grep -v '^ *+' conftest.er1 >conftest.err
6833 rm -f conftest.er1
6834 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006836 (exit $ac_status); } && {
6837 test -z "$ac_c_werror_flag" ||
6838 test ! -s conftest.err
6839 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006840 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006841else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006843sed 's/^/| /' conftest.$ac_ext >&5
6844
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006845 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006847
6848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006849fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006850{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6851echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6852if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006853 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006854else
Martin v. Löwis11437992002-04-12 09:54:03 +00006855
6856cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006857#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006858_ACEOF
6859
6860fi
6861
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006862{ echo "$as_me:$LINENO: checking for pid_t" >&5
6863echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006864if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006865 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006866else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006867 cat >conftest.$ac_ext <<_ACEOF
6868/* confdefs.h. */
6869_ACEOF
6870cat confdefs.h >>conftest.$ac_ext
6871cat >>conftest.$ac_ext <<_ACEOF
6872/* end confdefs.h. */
6873$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006874typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006875int
6876main ()
6877{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006878if ((ac__type_new_ *) 0)
6879 return 0;
6880if (sizeof (ac__type_new_))
6881 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006882 ;
6883 return 0;
6884}
6885_ACEOF
6886rm -f conftest.$ac_objext
6887if { (ac_try="$ac_compile"
6888case "(($ac_try" in
6889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6890 *) ac_try_echo=$ac_try;;
6891esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006893 (eval "$ac_compile") 2>conftest.er1
6894 ac_status=$?
6895 grep -v '^ *+' conftest.er1 >conftest.err
6896 rm -f conftest.er1
6897 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006899 (exit $ac_status); } && {
6900 test -z "$ac_c_werror_flag" ||
6901 test ! -s conftest.err
6902 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006903 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006904else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006906sed 's/^/| /' conftest.$ac_ext >&5
6907
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006908 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006910
6911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006912fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006913{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6914echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6915if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006916 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006917else
Martin v. Löwis11437992002-04-12 09:54:03 +00006918
6919cat >>confdefs.h <<_ACEOF
6920#define pid_t int
6921_ACEOF
6922
6923fi
6924
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006925{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6926echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006927if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006928 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006929else
6930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006931/* confdefs.h. */
6932_ACEOF
6933cat confdefs.h >>conftest.$ac_ext
6934cat >>conftest.$ac_ext <<_ACEOF
6935/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006936#include <sys/types.h>
6937#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006938
Martin v. Löwis11437992002-04-12 09:54:03 +00006939int
6940main ()
6941{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006942return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006943 ;
6944 return 0;
6945}
6946_ACEOF
6947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006948if { (ac_try="$ac_compile"
6949case "(($ac_try" in
6950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6951 *) ac_try_echo=$ac_try;;
6952esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006954 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006956 grep -v '^ *+' conftest.er1 >conftest.err
6957 rm -f conftest.er1
6958 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006960 (exit $ac_status); } && {
6961 test -z "$ac_c_werror_flag" ||
6962 test ! -s conftest.err
6963 } && test -s conftest.$ac_objext; then
6964 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006965else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006967sed 's/^/| /' conftest.$ac_ext >&5
6968
Martin v. Löwiseba40652007-08-30 20:10:57 +00006969 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006971
6972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006973fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006974{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6975echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006976
Martin v. Löwis11437992002-04-12 09:54:03 +00006977cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006978#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006979_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006980
Michael W. Hudson54241132001-12-07 15:38:26 +00006981
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006982{ echo "$as_me:$LINENO: checking for size_t" >&5
6983echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006984if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006985 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006986else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006987 cat >conftest.$ac_ext <<_ACEOF
6988/* confdefs.h. */
6989_ACEOF
6990cat confdefs.h >>conftest.$ac_ext
6991cat >>conftest.$ac_ext <<_ACEOF
6992/* end confdefs.h. */
6993$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006994typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006995int
6996main ()
6997{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006998if ((ac__type_new_ *) 0)
6999 return 0;
7000if (sizeof (ac__type_new_))
7001 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007002 ;
7003 return 0;
7004}
7005_ACEOF
7006rm -f conftest.$ac_objext
7007if { (ac_try="$ac_compile"
7008case "(($ac_try" in
7009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7010 *) ac_try_echo=$ac_try;;
7011esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007013 (eval "$ac_compile") 2>conftest.er1
7014 ac_status=$?
7015 grep -v '^ *+' conftest.er1 >conftest.err
7016 rm -f conftest.er1
7017 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007019 (exit $ac_status); } && {
7020 test -z "$ac_c_werror_flag" ||
7021 test ! -s conftest.err
7022 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007023 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007024else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007025 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007026sed 's/^/| /' conftest.$ac_ext >&5
7027
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007028 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007030
7031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007032fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007033{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7034echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7035if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007036 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007037else
Martin v. Löwis11437992002-04-12 09:54:03 +00007038
7039cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007040#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007041_ACEOF
7042
7043fi
7044
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007045{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7046echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007047if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007048 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007049else
7050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007051/* confdefs.h. */
7052_ACEOF
7053cat confdefs.h >>conftest.$ac_ext
7054cat >>conftest.$ac_ext <<_ACEOF
7055/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007056#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007057
7058_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007059if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007060 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007061 ac_cv_type_uid_t=yes
7062else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007063 ac_cv_type_uid_t=no
7064fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +00007065rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007066
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007067fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007068{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7069echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007070if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007071
Martin v. Löwis11437992002-04-12 09:54:03 +00007072cat >>confdefs.h <<\_ACEOF
7073#define uid_t int
7074_ACEOF
7075
7076
7077cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007078#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007079_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007080
7081fi
7082
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007083
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007084 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7085echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007086if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007087 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007088else
7089 ac_cv_c_uint32_t=no
7090 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7091 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7092 cat >conftest.$ac_ext <<_ACEOF
7093/* confdefs.h. */
7094_ACEOF
7095cat confdefs.h >>conftest.$ac_ext
7096cat >>conftest.$ac_ext <<_ACEOF
7097/* end confdefs.h. */
7098$ac_includes_default
7099int
7100main ()
7101{
7102static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7103test_array [0] = 0
7104
7105 ;
7106 return 0;
7107}
7108_ACEOF
7109rm -f conftest.$ac_objext
7110if { (ac_try="$ac_compile"
7111case "(($ac_try" in
7112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7113 *) ac_try_echo=$ac_try;;
7114esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007116 (eval "$ac_compile") 2>conftest.er1
7117 ac_status=$?
7118 grep -v '^ *+' conftest.er1 >conftest.err
7119 rm -f conftest.er1
7120 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007122 (exit $ac_status); } && {
7123 test -z "$ac_c_werror_flag" ||
7124 test ! -s conftest.err
7125 } && test -s conftest.$ac_objext; then
7126 case $ac_type in
7127 uint32_t) ac_cv_c_uint32_t=yes ;;
7128 *) ac_cv_c_uint32_t=$ac_type ;;
7129esac
7130
7131else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007132 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007133sed 's/^/| /' conftest.$ac_ext >&5
7134
7135
7136fi
7137
7138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7139 test "$ac_cv_c_uint32_t" != no && break
7140 done
7141fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007142{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7143echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007144 case $ac_cv_c_uint32_t in #(
7145 no|yes) ;; #(
7146 *)
7147
7148cat >>confdefs.h <<\_ACEOF
7149#define _UINT32_T 1
7150_ACEOF
7151
7152
7153cat >>confdefs.h <<_ACEOF
7154#define uint32_t $ac_cv_c_uint32_t
7155_ACEOF
7156;;
7157 esac
7158
7159
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007160 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7161echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007162if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007163 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007164else
7165 ac_cv_c_uint64_t=no
7166 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7167 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7168 cat >conftest.$ac_ext <<_ACEOF
7169/* confdefs.h. */
7170_ACEOF
7171cat confdefs.h >>conftest.$ac_ext
7172cat >>conftest.$ac_ext <<_ACEOF
7173/* end confdefs.h. */
7174$ac_includes_default
7175int
7176main ()
7177{
7178static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7179test_array [0] = 0
7180
7181 ;
7182 return 0;
7183}
7184_ACEOF
7185rm -f conftest.$ac_objext
7186if { (ac_try="$ac_compile"
7187case "(($ac_try" in
7188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7189 *) ac_try_echo=$ac_try;;
7190esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007192 (eval "$ac_compile") 2>conftest.er1
7193 ac_status=$?
7194 grep -v '^ *+' conftest.er1 >conftest.err
7195 rm -f conftest.er1
7196 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007198 (exit $ac_status); } && {
7199 test -z "$ac_c_werror_flag" ||
7200 test ! -s conftest.err
7201 } && test -s conftest.$ac_objext; then
7202 case $ac_type in
7203 uint64_t) ac_cv_c_uint64_t=yes ;;
7204 *) ac_cv_c_uint64_t=$ac_type ;;
7205esac
7206
7207else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007208 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007209sed 's/^/| /' conftest.$ac_ext >&5
7210
7211
7212fi
7213
7214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7215 test "$ac_cv_c_uint64_t" != no && break
7216 done
7217fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007218{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7219echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007220 case $ac_cv_c_uint64_t in #(
7221 no|yes) ;; #(
7222 *)
7223
7224cat >>confdefs.h <<\_ACEOF
7225#define _UINT64_T 1
7226_ACEOF
7227
7228
7229cat >>confdefs.h <<_ACEOF
7230#define uint64_t $ac_cv_c_uint64_t
7231_ACEOF
7232;;
7233 esac
7234
7235
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007236 { echo "$as_me:$LINENO: checking for int32_t" >&5
7237echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007238if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007239 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007240else
7241 ac_cv_c_int32_t=no
7242 for ac_type in 'int32_t' 'int' 'long int' \
7243 'long long int' 'short int' 'signed char'; do
7244 cat >conftest.$ac_ext <<_ACEOF
7245/* confdefs.h. */
7246_ACEOF
7247cat confdefs.h >>conftest.$ac_ext
7248cat >>conftest.$ac_ext <<_ACEOF
7249/* end confdefs.h. */
7250$ac_includes_default
7251int
7252main ()
7253{
7254static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7255test_array [0] = 0
7256
7257 ;
7258 return 0;
7259}
7260_ACEOF
7261rm -f conftest.$ac_objext
7262if { (ac_try="$ac_compile"
7263case "(($ac_try" in
7264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7265 *) ac_try_echo=$ac_try;;
7266esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007268 (eval "$ac_compile") 2>conftest.er1
7269 ac_status=$?
7270 grep -v '^ *+' conftest.er1 >conftest.err
7271 rm -f conftest.er1
7272 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007274 (exit $ac_status); } && {
7275 test -z "$ac_c_werror_flag" ||
7276 test ! -s conftest.err
7277 } && test -s conftest.$ac_objext; then
7278 cat >conftest.$ac_ext <<_ACEOF
7279/* confdefs.h. */
7280_ACEOF
7281cat confdefs.h >>conftest.$ac_ext
7282cat >>conftest.$ac_ext <<_ACEOF
7283/* end confdefs.h. */
7284$ac_includes_default
7285int
7286main ()
7287{
7288static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007289 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007290test_array [0] = 0
7291
7292 ;
7293 return 0;
7294}
7295_ACEOF
7296rm -f conftest.$ac_objext
7297if { (ac_try="$ac_compile"
7298case "(($ac_try" in
7299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7300 *) ac_try_echo=$ac_try;;
7301esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007303 (eval "$ac_compile") 2>conftest.er1
7304 ac_status=$?
7305 grep -v '^ *+' conftest.er1 >conftest.err
7306 rm -f conftest.er1
7307 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007309 (exit $ac_status); } && {
7310 test -z "$ac_c_werror_flag" ||
7311 test ! -s conftest.err
7312 } && test -s conftest.$ac_objext; then
7313 :
7314else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007315 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007316sed 's/^/| /' conftest.$ac_ext >&5
7317
7318 case $ac_type in
7319 int32_t) ac_cv_c_int32_t=yes ;;
7320 *) ac_cv_c_int32_t=$ac_type ;;
7321esac
7322
7323fi
7324
7325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7326else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007327 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007328sed 's/^/| /' conftest.$ac_ext >&5
7329
7330
7331fi
7332
7333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7334 test "$ac_cv_c_int32_t" != no && break
7335 done
7336fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007337{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7338echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007339 case $ac_cv_c_int32_t in #(
7340 no|yes) ;; #(
7341 *)
7342
7343cat >>confdefs.h <<_ACEOF
7344#define int32_t $ac_cv_c_int32_t
7345_ACEOF
7346;;
7347 esac
7348
7349
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007350 { echo "$as_me:$LINENO: checking for int64_t" >&5
7351echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007352if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007353 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007354else
7355 ac_cv_c_int64_t=no
7356 for ac_type in 'int64_t' 'int' 'long int' \
7357 'long long int' 'short int' 'signed char'; do
7358 cat >conftest.$ac_ext <<_ACEOF
7359/* confdefs.h. */
7360_ACEOF
7361cat confdefs.h >>conftest.$ac_ext
7362cat >>conftest.$ac_ext <<_ACEOF
7363/* end confdefs.h. */
7364$ac_includes_default
7365int
7366main ()
7367{
7368static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7369test_array [0] = 0
7370
7371 ;
7372 return 0;
7373}
7374_ACEOF
7375rm -f conftest.$ac_objext
7376if { (ac_try="$ac_compile"
7377case "(($ac_try" in
7378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7379 *) ac_try_echo=$ac_try;;
7380esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007382 (eval "$ac_compile") 2>conftest.er1
7383 ac_status=$?
7384 grep -v '^ *+' conftest.er1 >conftest.err
7385 rm -f conftest.er1
7386 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007388 (exit $ac_status); } && {
7389 test -z "$ac_c_werror_flag" ||
7390 test ! -s conftest.err
7391 } && test -s conftest.$ac_objext; then
7392 cat >conftest.$ac_ext <<_ACEOF
7393/* confdefs.h. */
7394_ACEOF
7395cat confdefs.h >>conftest.$ac_ext
7396cat >>conftest.$ac_ext <<_ACEOF
7397/* end confdefs.h. */
7398$ac_includes_default
7399int
7400main ()
7401{
7402static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007403 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007404test_array [0] = 0
7405
7406 ;
7407 return 0;
7408}
7409_ACEOF
7410rm -f conftest.$ac_objext
7411if { (ac_try="$ac_compile"
7412case "(($ac_try" in
7413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7414 *) ac_try_echo=$ac_try;;
7415esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007417 (eval "$ac_compile") 2>conftest.er1
7418 ac_status=$?
7419 grep -v '^ *+' conftest.er1 >conftest.err
7420 rm -f conftest.er1
7421 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007423 (exit $ac_status); } && {
7424 test -z "$ac_c_werror_flag" ||
7425 test ! -s conftest.err
7426 } && test -s conftest.$ac_objext; then
7427 :
7428else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007429 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007430sed 's/^/| /' conftest.$ac_ext >&5
7431
7432 case $ac_type in
7433 int64_t) ac_cv_c_int64_t=yes ;;
7434 *) ac_cv_c_int64_t=$ac_type ;;
7435esac
7436
7437fi
7438
7439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7440else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007441 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007442sed 's/^/| /' conftest.$ac_ext >&5
7443
7444
7445fi
7446
7447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7448 test "$ac_cv_c_int64_t" != no && break
7449 done
7450fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007451{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7452echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007453 case $ac_cv_c_int64_t in #(
7454 no|yes) ;; #(
7455 *)
7456
7457cat >>confdefs.h <<_ACEOF
7458#define int64_t $ac_cv_c_int64_t
7459_ACEOF
7460;;
7461 esac
7462
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007463{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7464echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007465if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007466 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007467else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007468 cat >conftest.$ac_ext <<_ACEOF
7469/* confdefs.h. */
7470_ACEOF
7471cat confdefs.h >>conftest.$ac_ext
7472cat >>conftest.$ac_ext <<_ACEOF
7473/* end confdefs.h. */
7474$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007475typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007476int
7477main ()
7478{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007479if ((ac__type_new_ *) 0)
7480 return 0;
7481if (sizeof (ac__type_new_))
7482 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007483 ;
7484 return 0;
7485}
7486_ACEOF
7487rm -f conftest.$ac_objext
7488if { (ac_try="$ac_compile"
7489case "(($ac_try" in
7490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7491 *) ac_try_echo=$ac_try;;
7492esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007494 (eval "$ac_compile") 2>conftest.er1
7495 ac_status=$?
7496 grep -v '^ *+' conftest.er1 >conftest.err
7497 rm -f conftest.er1
7498 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007500 (exit $ac_status); } && {
7501 test -z "$ac_c_werror_flag" ||
7502 test ! -s conftest.err
7503 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007504 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007505else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007506 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007507sed 's/^/| /' conftest.$ac_ext >&5
7508
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007509 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007510fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007511
7512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007513fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007514{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7515echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7516if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007517
7518cat >>confdefs.h <<\_ACEOF
7519#define HAVE_SSIZE_T 1
7520_ACEOF
7521
7522fi
7523
Jack Jansendd19cf82001-12-06 22:36:17 +00007524
Michael W. Hudson54241132001-12-07 15:38:26 +00007525# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007526# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007527{ echo "$as_me:$LINENO: checking for int" >&5
7528echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7529if test "${ac_cv_type_int+set}" = set; then
7530 echo $ECHO_N "(cached) $ECHO_C" >&6
7531else
7532 cat >conftest.$ac_ext <<_ACEOF
7533/* confdefs.h. */
7534_ACEOF
7535cat confdefs.h >>conftest.$ac_ext
7536cat >>conftest.$ac_ext <<_ACEOF
7537/* end confdefs.h. */
7538$ac_includes_default
7539typedef int ac__type_new_;
7540int
7541main ()
7542{
7543if ((ac__type_new_ *) 0)
7544 return 0;
7545if (sizeof (ac__type_new_))
7546 return 0;
7547 ;
7548 return 0;
7549}
7550_ACEOF
7551rm -f conftest.$ac_objext
7552if { (ac_try="$ac_compile"
7553case "(($ac_try" in
7554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7555 *) ac_try_echo=$ac_try;;
7556esac
7557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7558 (eval "$ac_compile") 2>conftest.er1
7559 ac_status=$?
7560 grep -v '^ *+' conftest.er1 >conftest.err
7561 rm -f conftest.er1
7562 cat conftest.err >&5
7563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7564 (exit $ac_status); } && {
7565 test -z "$ac_c_werror_flag" ||
7566 test ! -s conftest.err
7567 } && test -s conftest.$ac_objext; then
7568 ac_cv_type_int=yes
7569else
7570 echo "$as_me: failed program was:" >&5
7571sed 's/^/| /' conftest.$ac_ext >&5
7572
7573 ac_cv_type_int=no
7574fi
7575
7576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7577fi
7578{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7579echo "${ECHO_T}$ac_cv_type_int" >&6; }
7580
Martin v. Löwiseba40652007-08-30 20:10:57 +00007581# The cast to long int works around a bug in the HP C Compiler
7582# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7583# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7584# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007585{ echo "$as_me:$LINENO: checking size of int" >&5
7586echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007587if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007588 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007589else
Martin v. Löwis11437992002-04-12 09:54:03 +00007590 if test "$cross_compiling" = yes; then
7591 # Depending upon the size, compute the lo and hi bounds.
7592cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007593/* confdefs.h. */
7594_ACEOF
7595cat confdefs.h >>conftest.$ac_ext
7596cat >>conftest.$ac_ext <<_ACEOF
7597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007598$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007599 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007600int
7601main ()
7602{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007603static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007604test_array [0] = 0
7605
7606 ;
7607 return 0;
7608}
7609_ACEOF
7610rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007611if { (ac_try="$ac_compile"
7612case "(($ac_try" in
7613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7614 *) ac_try_echo=$ac_try;;
7615esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007617 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007619 grep -v '^ *+' conftest.er1 >conftest.err
7620 rm -f conftest.er1
7621 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007623 (exit $ac_status); } && {
7624 test -z "$ac_c_werror_flag" ||
7625 test ! -s conftest.err
7626 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007627 ac_lo=0 ac_mid=0
7628 while :; do
7629 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007630/* confdefs.h. */
7631_ACEOF
7632cat confdefs.h >>conftest.$ac_ext
7633cat >>conftest.$ac_ext <<_ACEOF
7634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007635$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007636 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007637int
7638main ()
7639{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007640static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007641test_array [0] = 0
7642
7643 ;
7644 return 0;
7645}
7646_ACEOF
7647rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007648if { (ac_try="$ac_compile"
7649case "(($ac_try" in
7650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7651 *) ac_try_echo=$ac_try;;
7652esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007654 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007655 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007656 grep -v '^ *+' conftest.er1 >conftest.err
7657 rm -f conftest.er1
7658 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007660 (exit $ac_status); } && {
7661 test -z "$ac_c_werror_flag" ||
7662 test ! -s conftest.err
7663 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007664 ac_hi=$ac_mid; break
7665else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007666 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007667sed 's/^/| /' conftest.$ac_ext >&5
7668
Martin v. Löwiseba40652007-08-30 20:10:57 +00007669 ac_lo=`expr $ac_mid + 1`
7670 if test $ac_lo -le $ac_mid; then
7671 ac_lo= ac_hi=
7672 break
7673 fi
7674 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007675fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007676
7677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007678 done
7679else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007681sed 's/^/| /' conftest.$ac_ext >&5
7682
Martin v. Löwiseba40652007-08-30 20:10:57 +00007683 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007684/* confdefs.h. */
7685_ACEOF
7686cat confdefs.h >>conftest.$ac_ext
7687cat >>conftest.$ac_ext <<_ACEOF
7688/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007689$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007690 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007691int
7692main ()
7693{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007694static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007695test_array [0] = 0
7696
7697 ;
7698 return 0;
7699}
7700_ACEOF
7701rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007702if { (ac_try="$ac_compile"
7703case "(($ac_try" in
7704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7705 *) ac_try_echo=$ac_try;;
7706esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007708 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007710 grep -v '^ *+' conftest.er1 >conftest.err
7711 rm -f conftest.er1
7712 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007714 (exit $ac_status); } && {
7715 test -z "$ac_c_werror_flag" ||
7716 test ! -s conftest.err
7717 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007718 ac_hi=-1 ac_mid=-1
7719 while :; do
7720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007721/* confdefs.h. */
7722_ACEOF
7723cat confdefs.h >>conftest.$ac_ext
7724cat >>conftest.$ac_ext <<_ACEOF
7725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007726$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007727 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007728int
7729main ()
7730{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007731static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007732test_array [0] = 0
7733
7734 ;
7735 return 0;
7736}
7737_ACEOF
7738rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007739if { (ac_try="$ac_compile"
7740case "(($ac_try" in
7741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7742 *) ac_try_echo=$ac_try;;
7743esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007745 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007746 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007747 grep -v '^ *+' conftest.er1 >conftest.err
7748 rm -f conftest.er1
7749 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007751 (exit $ac_status); } && {
7752 test -z "$ac_c_werror_flag" ||
7753 test ! -s conftest.err
7754 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007755 ac_lo=$ac_mid; break
7756else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007758sed 's/^/| /' conftest.$ac_ext >&5
7759
Martin v. Löwiseba40652007-08-30 20:10:57 +00007760 ac_hi=`expr '(' $ac_mid ')' - 1`
7761 if test $ac_mid -le $ac_hi; then
7762 ac_lo= ac_hi=
7763 break
7764 fi
7765 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007766fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007767
7768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007769 done
7770else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007772sed 's/^/| /' conftest.$ac_ext >&5
7773
Martin v. Löwiseba40652007-08-30 20:10:57 +00007774 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007775fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007776
7777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007778fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007779
7780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007781# Binary search between lo and hi bounds.
7782while test "x$ac_lo" != "x$ac_hi"; do
7783 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7784 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007785/* confdefs.h. */
7786_ACEOF
7787cat confdefs.h >>conftest.$ac_ext
7788cat >>conftest.$ac_ext <<_ACEOF
7789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007790$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007791 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007792int
7793main ()
7794{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007795static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007796test_array [0] = 0
7797
7798 ;
7799 return 0;
7800}
7801_ACEOF
7802rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007803if { (ac_try="$ac_compile"
7804case "(($ac_try" in
7805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7806 *) ac_try_echo=$ac_try;;
7807esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007809 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007811 grep -v '^ *+' conftest.er1 >conftest.err
7812 rm -f conftest.er1
7813 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007815 (exit $ac_status); } && {
7816 test -z "$ac_c_werror_flag" ||
7817 test ! -s conftest.err
7818 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007819 ac_hi=$ac_mid
7820else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007822sed 's/^/| /' conftest.$ac_ext >&5
7823
Martin v. Löwiseba40652007-08-30 20:10:57 +00007824 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007826
7827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007828done
7829case $ac_lo in
7830?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007831'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007832 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007833See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007834echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007835See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007836 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007837 else
7838 ac_cv_sizeof_int=0
7839 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007840esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007841else
Martin v. Löwis11437992002-04-12 09:54:03 +00007842 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007843/* confdefs.h. */
7844_ACEOF
7845cat confdefs.h >>conftest.$ac_ext
7846cat >>conftest.$ac_ext <<_ACEOF
7847/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007848$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007849 typedef int ac__type_sizeof_;
7850static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7851static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007852#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007853#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007854int
7855main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007856{
Martin v. Löwis11437992002-04-12 09:54:03 +00007857
7858 FILE *f = fopen ("conftest.val", "w");
7859 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007860 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007861 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007863 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007864 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007865 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007866 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007867 }
7868 else
7869 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007870 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007871 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007872 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007873 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007874 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007875 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007876
7877 ;
7878 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007879}
Martin v. Löwis11437992002-04-12 09:54:03 +00007880_ACEOF
7881rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007882if { (ac_try="$ac_link"
7883case "(($ac_try" in
7884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7885 *) ac_try_echo=$ac_try;;
7886esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007888 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007889 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007891 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007892 { (case "(($ac_try" in
7893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7894 *) ac_try_echo=$ac_try;;
7895esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007897 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007898 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007900 (exit $ac_status); }; }; then
7901 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007902else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007903 echo "$as_me: program exited with status $ac_status" >&5
7904echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007905sed 's/^/| /' conftest.$ac_ext >&5
7906
Martin v. Löwis11437992002-04-12 09:54:03 +00007907( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007908if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007909 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007910See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007911echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007912See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007913 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007914 else
7915 ac_cv_sizeof_int=0
7916 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007918rm -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 +00007919fi
7920rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007921fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007922{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7923echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007924
7925
7926
Martin v. Löwis11437992002-04-12 09:54:03 +00007927cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007928#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007929_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007930
7931
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007932{ echo "$as_me:$LINENO: checking for long" >&5
7933echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7934if test "${ac_cv_type_long+set}" = set; then
7935 echo $ECHO_N "(cached) $ECHO_C" >&6
7936else
7937 cat >conftest.$ac_ext <<_ACEOF
7938/* confdefs.h. */
7939_ACEOF
7940cat confdefs.h >>conftest.$ac_ext
7941cat >>conftest.$ac_ext <<_ACEOF
7942/* end confdefs.h. */
7943$ac_includes_default
7944typedef long ac__type_new_;
7945int
7946main ()
7947{
7948if ((ac__type_new_ *) 0)
7949 return 0;
7950if (sizeof (ac__type_new_))
7951 return 0;
7952 ;
7953 return 0;
7954}
7955_ACEOF
7956rm -f conftest.$ac_objext
7957if { (ac_try="$ac_compile"
7958case "(($ac_try" in
7959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7960 *) ac_try_echo=$ac_try;;
7961esac
7962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7963 (eval "$ac_compile") 2>conftest.er1
7964 ac_status=$?
7965 grep -v '^ *+' conftest.er1 >conftest.err
7966 rm -f conftest.er1
7967 cat conftest.err >&5
7968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7969 (exit $ac_status); } && {
7970 test -z "$ac_c_werror_flag" ||
7971 test ! -s conftest.err
7972 } && test -s conftest.$ac_objext; then
7973 ac_cv_type_long=yes
7974else
7975 echo "$as_me: failed program was:" >&5
7976sed 's/^/| /' conftest.$ac_ext >&5
7977
7978 ac_cv_type_long=no
7979fi
7980
7981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7982fi
7983{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7984echo "${ECHO_T}$ac_cv_type_long" >&6; }
7985
Martin v. Löwiseba40652007-08-30 20:10:57 +00007986# The cast to long int works around a bug in the HP C Compiler
7987# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7988# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7989# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007990{ echo "$as_me:$LINENO: checking size of long" >&5
7991echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007992if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007993 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007994else
Martin v. Löwis11437992002-04-12 09:54:03 +00007995 if test "$cross_compiling" = yes; then
7996 # Depending upon the size, compute the lo and hi bounds.
7997cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007998/* confdefs.h. */
7999_ACEOF
8000cat confdefs.h >>conftest.$ac_ext
8001cat >>conftest.$ac_ext <<_ACEOF
8002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008003$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008004 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008005int
8006main ()
8007{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008008static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008009test_array [0] = 0
8010
8011 ;
8012 return 0;
8013}
8014_ACEOF
8015rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008016if { (ac_try="$ac_compile"
8017case "(($ac_try" in
8018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8019 *) ac_try_echo=$ac_try;;
8020esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008022 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008024 grep -v '^ *+' conftest.er1 >conftest.err
8025 rm -f conftest.er1
8026 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008028 (exit $ac_status); } && {
8029 test -z "$ac_c_werror_flag" ||
8030 test ! -s conftest.err
8031 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008032 ac_lo=0 ac_mid=0
8033 while :; do
8034 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008035/* confdefs.h. */
8036_ACEOF
8037cat confdefs.h >>conftest.$ac_ext
8038cat >>conftest.$ac_ext <<_ACEOF
8039/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008040$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008041 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008042int
8043main ()
8044{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008045static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008046test_array [0] = 0
8047
8048 ;
8049 return 0;
8050}
8051_ACEOF
8052rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008053if { (ac_try="$ac_compile"
8054case "(($ac_try" in
8055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8056 *) ac_try_echo=$ac_try;;
8057esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008059 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008060 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008061 grep -v '^ *+' conftest.er1 >conftest.err
8062 rm -f conftest.er1
8063 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008065 (exit $ac_status); } && {
8066 test -z "$ac_c_werror_flag" ||
8067 test ! -s conftest.err
8068 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008069 ac_hi=$ac_mid; break
8070else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008071 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008072sed 's/^/| /' conftest.$ac_ext >&5
8073
Martin v. Löwiseba40652007-08-30 20:10:57 +00008074 ac_lo=`expr $ac_mid + 1`
8075 if test $ac_lo -le $ac_mid; then
8076 ac_lo= ac_hi=
8077 break
8078 fi
8079 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008080fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008081
8082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008083 done
8084else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008086sed 's/^/| /' conftest.$ac_ext >&5
8087
Martin v. Löwiseba40652007-08-30 20:10:57 +00008088 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008089/* confdefs.h. */
8090_ACEOF
8091cat confdefs.h >>conftest.$ac_ext
8092cat >>conftest.$ac_ext <<_ACEOF
8093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008094$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008095 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008096int
8097main ()
8098{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008099static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008100test_array [0] = 0
8101
8102 ;
8103 return 0;
8104}
8105_ACEOF
8106rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008107if { (ac_try="$ac_compile"
8108case "(($ac_try" in
8109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8110 *) ac_try_echo=$ac_try;;
8111esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008113 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008114 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008115 grep -v '^ *+' conftest.er1 >conftest.err
8116 rm -f conftest.er1
8117 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008119 (exit $ac_status); } && {
8120 test -z "$ac_c_werror_flag" ||
8121 test ! -s conftest.err
8122 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008123 ac_hi=-1 ac_mid=-1
8124 while :; do
8125 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008126/* confdefs.h. */
8127_ACEOF
8128cat confdefs.h >>conftest.$ac_ext
8129cat >>conftest.$ac_ext <<_ACEOF
8130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008131$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008132 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008133int
8134main ()
8135{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008136static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008137test_array [0] = 0
8138
8139 ;
8140 return 0;
8141}
8142_ACEOF
8143rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008144if { (ac_try="$ac_compile"
8145case "(($ac_try" in
8146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8147 *) ac_try_echo=$ac_try;;
8148esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008150 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008151 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008152 grep -v '^ *+' conftest.er1 >conftest.err
8153 rm -f conftest.er1
8154 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008156 (exit $ac_status); } && {
8157 test -z "$ac_c_werror_flag" ||
8158 test ! -s conftest.err
8159 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008160 ac_lo=$ac_mid; break
8161else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008163sed 's/^/| /' conftest.$ac_ext >&5
8164
Martin v. Löwiseba40652007-08-30 20:10:57 +00008165 ac_hi=`expr '(' $ac_mid ')' - 1`
8166 if test $ac_mid -le $ac_hi; then
8167 ac_lo= ac_hi=
8168 break
8169 fi
8170 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008172
8173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008174 done
8175else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008177sed 's/^/| /' conftest.$ac_ext >&5
8178
Martin v. Löwiseba40652007-08-30 20:10:57 +00008179 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008181
8182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008184
8185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008186# Binary search between lo and hi bounds.
8187while test "x$ac_lo" != "x$ac_hi"; do
8188 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8189 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008190/* confdefs.h. */
8191_ACEOF
8192cat confdefs.h >>conftest.$ac_ext
8193cat >>conftest.$ac_ext <<_ACEOF
8194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008195$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008196 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008197int
8198main ()
8199{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008200static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008201test_array [0] = 0
8202
8203 ;
8204 return 0;
8205}
8206_ACEOF
8207rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008208if { (ac_try="$ac_compile"
8209case "(($ac_try" in
8210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8211 *) ac_try_echo=$ac_try;;
8212esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008214 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008215 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008216 grep -v '^ *+' conftest.er1 >conftest.err
8217 rm -f conftest.er1
8218 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008220 (exit $ac_status); } && {
8221 test -z "$ac_c_werror_flag" ||
8222 test ! -s conftest.err
8223 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008224 ac_hi=$ac_mid
8225else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008227sed 's/^/| /' conftest.$ac_ext >&5
8228
Martin v. Löwiseba40652007-08-30 20:10:57 +00008229 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008231
8232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008233done
8234case $ac_lo in
8235?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008236'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008237 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008238See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008239echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008240See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008241 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008242 else
8243 ac_cv_sizeof_long=0
8244 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008245esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008246else
Martin v. Löwis11437992002-04-12 09:54:03 +00008247 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008248/* confdefs.h. */
8249_ACEOF
8250cat confdefs.h >>conftest.$ac_ext
8251cat >>conftest.$ac_ext <<_ACEOF
8252/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008253$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008254 typedef long ac__type_sizeof_;
8255static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8256static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008257#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008258#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008259int
8260main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008261{
Martin v. Löwis11437992002-04-12 09:54:03 +00008262
8263 FILE *f = fopen ("conftest.val", "w");
8264 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008265 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008266 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008267 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008268 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008269 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008270 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008271 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008272 }
8273 else
8274 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008275 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008276 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008277 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008278 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008279 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008280 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008281
8282 ;
8283 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008284}
Martin v. Löwis11437992002-04-12 09:54:03 +00008285_ACEOF
8286rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008287if { (ac_try="$ac_link"
8288case "(($ac_try" in
8289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8290 *) ac_try_echo=$ac_try;;
8291esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008293 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008294 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008296 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008297 { (case "(($ac_try" in
8298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8299 *) ac_try_echo=$ac_try;;
8300esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008302 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008303 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008305 (exit $ac_status); }; }; then
8306 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008307else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008308 echo "$as_me: program exited with status $ac_status" >&5
8309echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008310sed 's/^/| /' conftest.$ac_ext >&5
8311
Martin v. Löwis11437992002-04-12 09:54:03 +00008312( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008313if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008314 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008315See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008316echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008317See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008318 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008319 else
8320 ac_cv_sizeof_long=0
8321 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008322fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008323rm -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 +00008324fi
8325rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008326fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008327{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8328echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008329
8330
8331
Martin v. Löwis11437992002-04-12 09:54:03 +00008332cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008333#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008334_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008335
8336
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008337{ echo "$as_me:$LINENO: checking for void *" >&5
8338echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8339if test "${ac_cv_type_void_p+set}" = set; then
8340 echo $ECHO_N "(cached) $ECHO_C" >&6
8341else
8342 cat >conftest.$ac_ext <<_ACEOF
8343/* confdefs.h. */
8344_ACEOF
8345cat confdefs.h >>conftest.$ac_ext
8346cat >>conftest.$ac_ext <<_ACEOF
8347/* end confdefs.h. */
8348$ac_includes_default
8349typedef void * ac__type_new_;
8350int
8351main ()
8352{
8353if ((ac__type_new_ *) 0)
8354 return 0;
8355if (sizeof (ac__type_new_))
8356 return 0;
8357 ;
8358 return 0;
8359}
8360_ACEOF
8361rm -f conftest.$ac_objext
8362if { (ac_try="$ac_compile"
8363case "(($ac_try" in
8364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8365 *) ac_try_echo=$ac_try;;
8366esac
8367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8368 (eval "$ac_compile") 2>conftest.er1
8369 ac_status=$?
8370 grep -v '^ *+' conftest.er1 >conftest.err
8371 rm -f conftest.er1
8372 cat conftest.err >&5
8373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8374 (exit $ac_status); } && {
8375 test -z "$ac_c_werror_flag" ||
8376 test ! -s conftest.err
8377 } && test -s conftest.$ac_objext; then
8378 ac_cv_type_void_p=yes
8379else
8380 echo "$as_me: failed program was:" >&5
8381sed 's/^/| /' conftest.$ac_ext >&5
8382
8383 ac_cv_type_void_p=no
8384fi
8385
8386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8387fi
8388{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8389echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8390
Martin v. Löwiseba40652007-08-30 20:10:57 +00008391# The cast to long int works around a bug in the HP C Compiler
8392# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8393# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8394# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008395{ echo "$as_me:$LINENO: checking size of void *" >&5
8396echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008397if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008398 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008399else
Martin v. Löwis11437992002-04-12 09:54:03 +00008400 if test "$cross_compiling" = yes; then
8401 # Depending upon the size, compute the lo and hi bounds.
8402cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008403/* confdefs.h. */
8404_ACEOF
8405cat confdefs.h >>conftest.$ac_ext
8406cat >>conftest.$ac_ext <<_ACEOF
8407/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008408$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008409 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008410int
8411main ()
8412{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008413static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008414test_array [0] = 0
8415
8416 ;
8417 return 0;
8418}
8419_ACEOF
8420rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008421if { (ac_try="$ac_compile"
8422case "(($ac_try" in
8423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8424 *) ac_try_echo=$ac_try;;
8425esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008427 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008428 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008429 grep -v '^ *+' conftest.er1 >conftest.err
8430 rm -f conftest.er1
8431 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008433 (exit $ac_status); } && {
8434 test -z "$ac_c_werror_flag" ||
8435 test ! -s conftest.err
8436 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008437 ac_lo=0 ac_mid=0
8438 while :; do
8439 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008440/* confdefs.h. */
8441_ACEOF
8442cat confdefs.h >>conftest.$ac_ext
8443cat >>conftest.$ac_ext <<_ACEOF
8444/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008445$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008446 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008447int
8448main ()
8449{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008450static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008451test_array [0] = 0
8452
8453 ;
8454 return 0;
8455}
8456_ACEOF
8457rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008458if { (ac_try="$ac_compile"
8459case "(($ac_try" in
8460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8461 *) ac_try_echo=$ac_try;;
8462esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008464 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008466 grep -v '^ *+' conftest.er1 >conftest.err
8467 rm -f conftest.er1
8468 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008470 (exit $ac_status); } && {
8471 test -z "$ac_c_werror_flag" ||
8472 test ! -s conftest.err
8473 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008474 ac_hi=$ac_mid; break
8475else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008477sed 's/^/| /' conftest.$ac_ext >&5
8478
Martin v. Löwiseba40652007-08-30 20:10:57 +00008479 ac_lo=`expr $ac_mid + 1`
8480 if test $ac_lo -le $ac_mid; then
8481 ac_lo= ac_hi=
8482 break
8483 fi
8484 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008486
8487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008488 done
8489else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008490 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008491sed 's/^/| /' conftest.$ac_ext >&5
8492
Martin v. Löwiseba40652007-08-30 20:10:57 +00008493 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008494/* confdefs.h. */
8495_ACEOF
8496cat confdefs.h >>conftest.$ac_ext
8497cat >>conftest.$ac_ext <<_ACEOF
8498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008499$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008500 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008501int
8502main ()
8503{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008504static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008505test_array [0] = 0
8506
8507 ;
8508 return 0;
8509}
8510_ACEOF
8511rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008512if { (ac_try="$ac_compile"
8513case "(($ac_try" in
8514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8515 *) ac_try_echo=$ac_try;;
8516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008518 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008520 grep -v '^ *+' conftest.er1 >conftest.err
8521 rm -f conftest.er1
8522 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008524 (exit $ac_status); } && {
8525 test -z "$ac_c_werror_flag" ||
8526 test ! -s conftest.err
8527 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008528 ac_hi=-1 ac_mid=-1
8529 while :; do
8530 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008531/* confdefs.h. */
8532_ACEOF
8533cat confdefs.h >>conftest.$ac_ext
8534cat >>conftest.$ac_ext <<_ACEOF
8535/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008536$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008537 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008538int
8539main ()
8540{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008541static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008542test_array [0] = 0
8543
8544 ;
8545 return 0;
8546}
8547_ACEOF
8548rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008549if { (ac_try="$ac_compile"
8550case "(($ac_try" in
8551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8552 *) ac_try_echo=$ac_try;;
8553esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008555 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008556 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008557 grep -v '^ *+' conftest.er1 >conftest.err
8558 rm -f conftest.er1
8559 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008561 (exit $ac_status); } && {
8562 test -z "$ac_c_werror_flag" ||
8563 test ! -s conftest.err
8564 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008565 ac_lo=$ac_mid; break
8566else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008568sed 's/^/| /' conftest.$ac_ext >&5
8569
Martin v. Löwiseba40652007-08-30 20:10:57 +00008570 ac_hi=`expr '(' $ac_mid ')' - 1`
8571 if test $ac_mid -le $ac_hi; then
8572 ac_lo= ac_hi=
8573 break
8574 fi
8575 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008576fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008577
8578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008579 done
8580else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008582sed 's/^/| /' conftest.$ac_ext >&5
8583
Martin v. Löwiseba40652007-08-30 20:10:57 +00008584 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008586
8587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008589
8590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008591# Binary search between lo and hi bounds.
8592while test "x$ac_lo" != "x$ac_hi"; do
8593 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8594 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008595/* confdefs.h. */
8596_ACEOF
8597cat confdefs.h >>conftest.$ac_ext
8598cat >>conftest.$ac_ext <<_ACEOF
8599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008600$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008601 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008602int
8603main ()
8604{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008605static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008606test_array [0] = 0
8607
8608 ;
8609 return 0;
8610}
8611_ACEOF
8612rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008613if { (ac_try="$ac_compile"
8614case "(($ac_try" in
8615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8616 *) ac_try_echo=$ac_try;;
8617esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008619 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008621 grep -v '^ *+' conftest.er1 >conftest.err
8622 rm -f conftest.er1
8623 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008625 (exit $ac_status); } && {
8626 test -z "$ac_c_werror_flag" ||
8627 test ! -s conftest.err
8628 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008629 ac_hi=$ac_mid
8630else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008632sed 's/^/| /' conftest.$ac_ext >&5
8633
Martin v. Löwiseba40652007-08-30 20:10:57 +00008634 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008636
8637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008638done
8639case $ac_lo in
8640?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008641'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008642 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008643See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008644echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008645See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008646 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008647 else
8648 ac_cv_sizeof_void_p=0
8649 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008650esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008651else
Martin v. Löwis11437992002-04-12 09:54:03 +00008652 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008653/* confdefs.h. */
8654_ACEOF
8655cat confdefs.h >>conftest.$ac_ext
8656cat >>conftest.$ac_ext <<_ACEOF
8657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008658$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008659 typedef void * ac__type_sizeof_;
8660static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8661static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008662#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008663#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008664int
8665main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008666{
Martin v. Löwis11437992002-04-12 09:54:03 +00008667
8668 FILE *f = fopen ("conftest.val", "w");
8669 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008670 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008671 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008672 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008673 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008674 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008675 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008676 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008677 }
8678 else
8679 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008680 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008681 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008682 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008683 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008684 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008685 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008686
8687 ;
8688 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008689}
Martin v. Löwis11437992002-04-12 09:54:03 +00008690_ACEOF
8691rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008692if { (ac_try="$ac_link"
8693case "(($ac_try" in
8694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8695 *) ac_try_echo=$ac_try;;
8696esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008698 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008699 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008701 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008702 { (case "(($ac_try" in
8703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8704 *) ac_try_echo=$ac_try;;
8705esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008707 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008708 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008710 (exit $ac_status); }; }; then
8711 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008712else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008713 echo "$as_me: program exited with status $ac_status" >&5
8714echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008715sed 's/^/| /' conftest.$ac_ext >&5
8716
Martin v. Löwis11437992002-04-12 09:54:03 +00008717( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008718if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008719 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008720See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008721echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008722See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008723 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008724 else
8725 ac_cv_sizeof_void_p=0
8726 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008728rm -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 +00008729fi
8730rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008731fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008732{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8733echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008734
8735
8736
Martin v. Löwis11437992002-04-12 09:54:03 +00008737cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008738#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008739_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008740
8741
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008742{ echo "$as_me:$LINENO: checking for short" >&5
8743echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8744if test "${ac_cv_type_short+set}" = set; then
8745 echo $ECHO_N "(cached) $ECHO_C" >&6
8746else
8747 cat >conftest.$ac_ext <<_ACEOF
8748/* confdefs.h. */
8749_ACEOF
8750cat confdefs.h >>conftest.$ac_ext
8751cat >>conftest.$ac_ext <<_ACEOF
8752/* end confdefs.h. */
8753$ac_includes_default
8754typedef short ac__type_new_;
8755int
8756main ()
8757{
8758if ((ac__type_new_ *) 0)
8759 return 0;
8760if (sizeof (ac__type_new_))
8761 return 0;
8762 ;
8763 return 0;
8764}
8765_ACEOF
8766rm -f conftest.$ac_objext
8767if { (ac_try="$ac_compile"
8768case "(($ac_try" in
8769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8770 *) ac_try_echo=$ac_try;;
8771esac
8772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8773 (eval "$ac_compile") 2>conftest.er1
8774 ac_status=$?
8775 grep -v '^ *+' conftest.er1 >conftest.err
8776 rm -f conftest.er1
8777 cat conftest.err >&5
8778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8779 (exit $ac_status); } && {
8780 test -z "$ac_c_werror_flag" ||
8781 test ! -s conftest.err
8782 } && test -s conftest.$ac_objext; then
8783 ac_cv_type_short=yes
8784else
8785 echo "$as_me: failed program was:" >&5
8786sed 's/^/| /' conftest.$ac_ext >&5
8787
8788 ac_cv_type_short=no
8789fi
8790
8791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8792fi
8793{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8794echo "${ECHO_T}$ac_cv_type_short" >&6; }
8795
Martin v. Löwiseba40652007-08-30 20:10:57 +00008796# The cast to long int works around a bug in the HP C Compiler
8797# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8798# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8799# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008800{ echo "$as_me:$LINENO: checking size of short" >&5
8801echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008802if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008803 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008804else
Martin v. Löwis11437992002-04-12 09:54:03 +00008805 if test "$cross_compiling" = yes; then
8806 # Depending upon the size, compute the lo and hi bounds.
8807cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008808/* confdefs.h. */
8809_ACEOF
8810cat confdefs.h >>conftest.$ac_ext
8811cat >>conftest.$ac_ext <<_ACEOF
8812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008813$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008814 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008815int
8816main ()
8817{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008818static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008819test_array [0] = 0
8820
8821 ;
8822 return 0;
8823}
8824_ACEOF
8825rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008826if { (ac_try="$ac_compile"
8827case "(($ac_try" in
8828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8829 *) ac_try_echo=$ac_try;;
8830esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008832 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008834 grep -v '^ *+' conftest.er1 >conftest.err
8835 rm -f conftest.er1
8836 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008838 (exit $ac_status); } && {
8839 test -z "$ac_c_werror_flag" ||
8840 test ! -s conftest.err
8841 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008842 ac_lo=0 ac_mid=0
8843 while :; do
8844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008845/* confdefs.h. */
8846_ACEOF
8847cat confdefs.h >>conftest.$ac_ext
8848cat >>conftest.$ac_ext <<_ACEOF
8849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008850$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008851 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008852int
8853main ()
8854{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008855static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008856test_array [0] = 0
8857
8858 ;
8859 return 0;
8860}
8861_ACEOF
8862rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008863if { (ac_try="$ac_compile"
8864case "(($ac_try" in
8865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8866 *) ac_try_echo=$ac_try;;
8867esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008869 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008870 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008871 grep -v '^ *+' conftest.er1 >conftest.err
8872 rm -f conftest.er1
8873 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008875 (exit $ac_status); } && {
8876 test -z "$ac_c_werror_flag" ||
8877 test ! -s conftest.err
8878 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008879 ac_hi=$ac_mid; break
8880else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008881 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008882sed 's/^/| /' conftest.$ac_ext >&5
8883
Martin v. Löwiseba40652007-08-30 20:10:57 +00008884 ac_lo=`expr $ac_mid + 1`
8885 if test $ac_lo -le $ac_mid; then
8886 ac_lo= ac_hi=
8887 break
8888 fi
8889 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008890fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008891
8892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008893 done
8894else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008896sed 's/^/| /' conftest.$ac_ext >&5
8897
Martin v. Löwiseba40652007-08-30 20:10:57 +00008898 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008899/* confdefs.h. */
8900_ACEOF
8901cat confdefs.h >>conftest.$ac_ext
8902cat >>conftest.$ac_ext <<_ACEOF
8903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008904$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008905 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008906int
8907main ()
8908{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008909static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008910test_array [0] = 0
8911
8912 ;
8913 return 0;
8914}
8915_ACEOF
8916rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008917if { (ac_try="$ac_compile"
8918case "(($ac_try" in
8919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8920 *) ac_try_echo=$ac_try;;
8921esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008923 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008924 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008925 grep -v '^ *+' conftest.er1 >conftest.err
8926 rm -f conftest.er1
8927 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008929 (exit $ac_status); } && {
8930 test -z "$ac_c_werror_flag" ||
8931 test ! -s conftest.err
8932 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008933 ac_hi=-1 ac_mid=-1
8934 while :; do
8935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008936/* confdefs.h. */
8937_ACEOF
8938cat confdefs.h >>conftest.$ac_ext
8939cat >>conftest.$ac_ext <<_ACEOF
8940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008941$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008942 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008943int
8944main ()
8945{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008946static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008947test_array [0] = 0
8948
8949 ;
8950 return 0;
8951}
8952_ACEOF
8953rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008954if { (ac_try="$ac_compile"
8955case "(($ac_try" in
8956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8957 *) ac_try_echo=$ac_try;;
8958esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008960 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008961 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008962 grep -v '^ *+' conftest.er1 >conftest.err
8963 rm -f conftest.er1
8964 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008966 (exit $ac_status); } && {
8967 test -z "$ac_c_werror_flag" ||
8968 test ! -s conftest.err
8969 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008970 ac_lo=$ac_mid; break
8971else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008973sed 's/^/| /' conftest.$ac_ext >&5
8974
Martin v. Löwiseba40652007-08-30 20:10:57 +00008975 ac_hi=`expr '(' $ac_mid ')' - 1`
8976 if test $ac_mid -le $ac_hi; then
8977 ac_lo= ac_hi=
8978 break
8979 fi
8980 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008982
8983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 done
8985else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008986 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008987sed 's/^/| /' conftest.$ac_ext >&5
8988
Martin v. Löwiseba40652007-08-30 20:10:57 +00008989 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008990fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008991
8992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008994
8995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008996# Binary search between lo and hi bounds.
8997while test "x$ac_lo" != "x$ac_hi"; do
8998 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8999 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009000/* confdefs.h. */
9001_ACEOF
9002cat confdefs.h >>conftest.$ac_ext
9003cat >>conftest.$ac_ext <<_ACEOF
9004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009005$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009006 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009007int
9008main ()
9009{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009010static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009011test_array [0] = 0
9012
9013 ;
9014 return 0;
9015}
9016_ACEOF
9017rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009018if { (ac_try="$ac_compile"
9019case "(($ac_try" in
9020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9021 *) ac_try_echo=$ac_try;;
9022esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009024 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009025 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009026 grep -v '^ *+' conftest.er1 >conftest.err
9027 rm -f conftest.er1
9028 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009030 (exit $ac_status); } && {
9031 test -z "$ac_c_werror_flag" ||
9032 test ! -s conftest.err
9033 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009034 ac_hi=$ac_mid
9035else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009037sed 's/^/| /' conftest.$ac_ext >&5
9038
Martin v. Löwiseba40652007-08-30 20:10:57 +00009039 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009040fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009041
9042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009043done
9044case $ac_lo in
9045?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009046'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009047 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009048See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009049echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009050See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009051 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009052 else
9053 ac_cv_sizeof_short=0
9054 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009055esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009056else
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009058/* confdefs.h. */
9059_ACEOF
9060cat confdefs.h >>conftest.$ac_ext
9061cat >>conftest.$ac_ext <<_ACEOF
9062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009063$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009064 typedef short ac__type_sizeof_;
9065static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9066static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009067#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009068#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009069int
9070main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009071{
Martin v. Löwis11437992002-04-12 09:54:03 +00009072
9073 FILE *f = fopen ("conftest.val", "w");
9074 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009075 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009076 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009077 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009078 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009079 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009080 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009081 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009082 }
9083 else
9084 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009085 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009086 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009087 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009088 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009089 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009090 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009091
9092 ;
9093 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009094}
Martin v. Löwis11437992002-04-12 09:54:03 +00009095_ACEOF
9096rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009097if { (ac_try="$ac_link"
9098case "(($ac_try" in
9099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9100 *) ac_try_echo=$ac_try;;
9101esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009103 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009104 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009106 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009107 { (case "(($ac_try" in
9108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9109 *) ac_try_echo=$ac_try;;
9110esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009112 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009113 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009115 (exit $ac_status); }; }; then
9116 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009117else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009118 echo "$as_me: program exited with status $ac_status" >&5
9119echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009120sed 's/^/| /' conftest.$ac_ext >&5
9121
Martin v. Löwis11437992002-04-12 09:54:03 +00009122( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009123if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009124 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009125See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009126echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009127See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009128 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009129 else
9130 ac_cv_sizeof_short=0
9131 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009132fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009133rm -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 +00009134fi
9135rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009136fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009137{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9138echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009139
9140
9141
Martin v. Löwis11437992002-04-12 09:54:03 +00009142cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009143#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009144_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009145
9146
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009147{ echo "$as_me:$LINENO: checking for float" >&5
9148echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9149if test "${ac_cv_type_float+set}" = set; then
9150 echo $ECHO_N "(cached) $ECHO_C" >&6
9151else
9152 cat >conftest.$ac_ext <<_ACEOF
9153/* confdefs.h. */
9154_ACEOF
9155cat confdefs.h >>conftest.$ac_ext
9156cat >>conftest.$ac_ext <<_ACEOF
9157/* end confdefs.h. */
9158$ac_includes_default
9159typedef float ac__type_new_;
9160int
9161main ()
9162{
9163if ((ac__type_new_ *) 0)
9164 return 0;
9165if (sizeof (ac__type_new_))
9166 return 0;
9167 ;
9168 return 0;
9169}
9170_ACEOF
9171rm -f conftest.$ac_objext
9172if { (ac_try="$ac_compile"
9173case "(($ac_try" in
9174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9175 *) ac_try_echo=$ac_try;;
9176esac
9177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9178 (eval "$ac_compile") 2>conftest.er1
9179 ac_status=$?
9180 grep -v '^ *+' conftest.er1 >conftest.err
9181 rm -f conftest.er1
9182 cat conftest.err >&5
9183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9184 (exit $ac_status); } && {
9185 test -z "$ac_c_werror_flag" ||
9186 test ! -s conftest.err
9187 } && test -s conftest.$ac_objext; then
9188 ac_cv_type_float=yes
9189else
9190 echo "$as_me: failed program was:" >&5
9191sed 's/^/| /' conftest.$ac_ext >&5
9192
9193 ac_cv_type_float=no
9194fi
9195
9196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9197fi
9198{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9199echo "${ECHO_T}$ac_cv_type_float" >&6; }
9200
Martin v. Löwiseba40652007-08-30 20:10:57 +00009201# The cast to long int works around a bug in the HP C Compiler
9202# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9203# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9204# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009205{ echo "$as_me:$LINENO: checking size of float" >&5
9206echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009207if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009208 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009209else
Martin v. Löwis11437992002-04-12 09:54:03 +00009210 if test "$cross_compiling" = yes; then
9211 # Depending upon the size, compute the lo and hi bounds.
9212cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009213/* confdefs.h. */
9214_ACEOF
9215cat confdefs.h >>conftest.$ac_ext
9216cat >>conftest.$ac_ext <<_ACEOF
9217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009218$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009219 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009220int
9221main ()
9222{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009223static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009224test_array [0] = 0
9225
9226 ;
9227 return 0;
9228}
9229_ACEOF
9230rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009231if { (ac_try="$ac_compile"
9232case "(($ac_try" in
9233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9234 *) ac_try_echo=$ac_try;;
9235esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009237 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009238 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009239 grep -v '^ *+' conftest.er1 >conftest.err
9240 rm -f conftest.er1
9241 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009243 (exit $ac_status); } && {
9244 test -z "$ac_c_werror_flag" ||
9245 test ! -s conftest.err
9246 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009247 ac_lo=0 ac_mid=0
9248 while :; do
9249 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009250/* confdefs.h. */
9251_ACEOF
9252cat confdefs.h >>conftest.$ac_ext
9253cat >>conftest.$ac_ext <<_ACEOF
9254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009255$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009256 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009257int
9258main ()
9259{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009260static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009261test_array [0] = 0
9262
9263 ;
9264 return 0;
9265}
9266_ACEOF
9267rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009268if { (ac_try="$ac_compile"
9269case "(($ac_try" in
9270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9271 *) ac_try_echo=$ac_try;;
9272esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009274 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009276 grep -v '^ *+' conftest.er1 >conftest.err
9277 rm -f conftest.er1
9278 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009280 (exit $ac_status); } && {
9281 test -z "$ac_c_werror_flag" ||
9282 test ! -s conftest.err
9283 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009284 ac_hi=$ac_mid; break
9285else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009287sed 's/^/| /' conftest.$ac_ext >&5
9288
Martin v. Löwiseba40652007-08-30 20:10:57 +00009289 ac_lo=`expr $ac_mid + 1`
9290 if test $ac_lo -le $ac_mid; then
9291 ac_lo= ac_hi=
9292 break
9293 fi
9294 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009295fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009296
9297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009298 done
9299else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009300 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009301sed 's/^/| /' conftest.$ac_ext >&5
9302
Martin v. Löwiseba40652007-08-30 20:10:57 +00009303 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009304/* confdefs.h. */
9305_ACEOF
9306cat confdefs.h >>conftest.$ac_ext
9307cat >>conftest.$ac_ext <<_ACEOF
9308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009309$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009310 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009311int
9312main ()
9313{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009314static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009315test_array [0] = 0
9316
9317 ;
9318 return 0;
9319}
9320_ACEOF
9321rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009322if { (ac_try="$ac_compile"
9323case "(($ac_try" in
9324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9325 *) ac_try_echo=$ac_try;;
9326esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009328 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009329 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009330 grep -v '^ *+' conftest.er1 >conftest.err
9331 rm -f conftest.er1
9332 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009334 (exit $ac_status); } && {
9335 test -z "$ac_c_werror_flag" ||
9336 test ! -s conftest.err
9337 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009338 ac_hi=-1 ac_mid=-1
9339 while :; do
9340 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009341/* confdefs.h. */
9342_ACEOF
9343cat confdefs.h >>conftest.$ac_ext
9344cat >>conftest.$ac_ext <<_ACEOF
9345/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009346$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009347 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009348int
9349main ()
9350{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009351static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009352test_array [0] = 0
9353
9354 ;
9355 return 0;
9356}
9357_ACEOF
9358rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009359if { (ac_try="$ac_compile"
9360case "(($ac_try" in
9361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9362 *) ac_try_echo=$ac_try;;
9363esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009365 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009366 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009367 grep -v '^ *+' conftest.er1 >conftest.err
9368 rm -f conftest.er1
9369 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009371 (exit $ac_status); } && {
9372 test -z "$ac_c_werror_flag" ||
9373 test ! -s conftest.err
9374 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009375 ac_lo=$ac_mid; break
9376else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009378sed 's/^/| /' conftest.$ac_ext >&5
9379
Martin v. Löwiseba40652007-08-30 20:10:57 +00009380 ac_hi=`expr '(' $ac_mid ')' - 1`
9381 if test $ac_mid -le $ac_hi; then
9382 ac_lo= ac_hi=
9383 break
9384 fi
9385 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009386fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009387
9388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009389 done
9390else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009391 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009392sed 's/^/| /' conftest.$ac_ext >&5
9393
Martin v. Löwiseba40652007-08-30 20:10:57 +00009394 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009396
9397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009398fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009399
9400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009401# Binary search between lo and hi bounds.
9402while test "x$ac_lo" != "x$ac_hi"; do
9403 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9404 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009405/* confdefs.h. */
9406_ACEOF
9407cat confdefs.h >>conftest.$ac_ext
9408cat >>conftest.$ac_ext <<_ACEOF
9409/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009410$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009411 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009412int
9413main ()
9414{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009415static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009416test_array [0] = 0
9417
9418 ;
9419 return 0;
9420}
9421_ACEOF
9422rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009423if { (ac_try="$ac_compile"
9424case "(($ac_try" in
9425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9426 *) ac_try_echo=$ac_try;;
9427esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009429 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009431 grep -v '^ *+' conftest.er1 >conftest.err
9432 rm -f conftest.er1
9433 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009435 (exit $ac_status); } && {
9436 test -z "$ac_c_werror_flag" ||
9437 test ! -s conftest.err
9438 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009439 ac_hi=$ac_mid
9440else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009442sed 's/^/| /' conftest.$ac_ext >&5
9443
Martin v. Löwiseba40652007-08-30 20:10:57 +00009444 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009446
9447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009448done
9449case $ac_lo in
9450?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009451'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009452 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009453See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009454echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009455See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009456 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009457 else
9458 ac_cv_sizeof_float=0
9459 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009460esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009461else
Martin v. Löwis11437992002-04-12 09:54:03 +00009462 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009463/* confdefs.h. */
9464_ACEOF
9465cat confdefs.h >>conftest.$ac_ext
9466cat >>conftest.$ac_ext <<_ACEOF
9467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009468$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009469 typedef float ac__type_sizeof_;
9470static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9471static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009472#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009473#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009474int
9475main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009476{
Martin v. Löwis11437992002-04-12 09:54:03 +00009477
9478 FILE *f = fopen ("conftest.val", "w");
9479 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009480 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009481 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009483 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009484 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009485 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009486 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009487 }
9488 else
9489 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009490 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009491 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009492 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009493 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009494 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009495 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009496
9497 ;
9498 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009499}
Martin v. Löwis11437992002-04-12 09:54:03 +00009500_ACEOF
9501rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009502if { (ac_try="$ac_link"
9503case "(($ac_try" in
9504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9505 *) ac_try_echo=$ac_try;;
9506esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009508 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009511 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009512 { (case "(($ac_try" in
9513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9514 *) ac_try_echo=$ac_try;;
9515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009517 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009518 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 (exit $ac_status); }; }; then
9521 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009522else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009523 echo "$as_me: program exited with status $ac_status" >&5
9524echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009525sed 's/^/| /' conftest.$ac_ext >&5
9526
Martin v. Löwis11437992002-04-12 09:54:03 +00009527( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009528if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009529 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009530See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009531echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009532See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009533 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009534 else
9535 ac_cv_sizeof_float=0
9536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009537fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009538rm -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 +00009539fi
9540rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009541fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009542{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9543echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009544
9545
9546
Martin v. Löwis11437992002-04-12 09:54:03 +00009547cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009548#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009549_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009550
9551
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009552{ echo "$as_me:$LINENO: checking for double" >&5
9553echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9554if test "${ac_cv_type_double+set}" = set; then
9555 echo $ECHO_N "(cached) $ECHO_C" >&6
9556else
9557 cat >conftest.$ac_ext <<_ACEOF
9558/* confdefs.h. */
9559_ACEOF
9560cat confdefs.h >>conftest.$ac_ext
9561cat >>conftest.$ac_ext <<_ACEOF
9562/* end confdefs.h. */
9563$ac_includes_default
9564typedef double ac__type_new_;
9565int
9566main ()
9567{
9568if ((ac__type_new_ *) 0)
9569 return 0;
9570if (sizeof (ac__type_new_))
9571 return 0;
9572 ;
9573 return 0;
9574}
9575_ACEOF
9576rm -f conftest.$ac_objext
9577if { (ac_try="$ac_compile"
9578case "(($ac_try" in
9579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9580 *) ac_try_echo=$ac_try;;
9581esac
9582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9583 (eval "$ac_compile") 2>conftest.er1
9584 ac_status=$?
9585 grep -v '^ *+' conftest.er1 >conftest.err
9586 rm -f conftest.er1
9587 cat conftest.err >&5
9588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9589 (exit $ac_status); } && {
9590 test -z "$ac_c_werror_flag" ||
9591 test ! -s conftest.err
9592 } && test -s conftest.$ac_objext; then
9593 ac_cv_type_double=yes
9594else
9595 echo "$as_me: failed program was:" >&5
9596sed 's/^/| /' conftest.$ac_ext >&5
9597
9598 ac_cv_type_double=no
9599fi
9600
9601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9602fi
9603{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9604echo "${ECHO_T}$ac_cv_type_double" >&6; }
9605
Martin v. Löwiseba40652007-08-30 20:10:57 +00009606# The cast to long int works around a bug in the HP C Compiler
9607# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9608# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9609# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009610{ echo "$as_me:$LINENO: checking size of double" >&5
9611echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009612if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009613 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009614else
Martin v. Löwis11437992002-04-12 09:54:03 +00009615 if test "$cross_compiling" = yes; then
9616 # Depending upon the size, compute the lo and hi bounds.
9617cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009618/* confdefs.h. */
9619_ACEOF
9620cat confdefs.h >>conftest.$ac_ext
9621cat >>conftest.$ac_ext <<_ACEOF
9622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009623$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009624 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009625int
9626main ()
9627{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009628static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009629test_array [0] = 0
9630
9631 ;
9632 return 0;
9633}
9634_ACEOF
9635rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009636if { (ac_try="$ac_compile"
9637case "(($ac_try" in
9638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9639 *) ac_try_echo=$ac_try;;
9640esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009642 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009643 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009644 grep -v '^ *+' conftest.er1 >conftest.err
9645 rm -f conftest.er1
9646 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009648 (exit $ac_status); } && {
9649 test -z "$ac_c_werror_flag" ||
9650 test ! -s conftest.err
9651 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 ac_lo=0 ac_mid=0
9653 while :; do
9654 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009655/* confdefs.h. */
9656_ACEOF
9657cat confdefs.h >>conftest.$ac_ext
9658cat >>conftest.$ac_ext <<_ACEOF
9659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009660$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009661 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009662int
9663main ()
9664{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009665static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009666test_array [0] = 0
9667
9668 ;
9669 return 0;
9670}
9671_ACEOF
9672rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009673if { (ac_try="$ac_compile"
9674case "(($ac_try" in
9675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9676 *) ac_try_echo=$ac_try;;
9677esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009679 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009681 grep -v '^ *+' conftest.er1 >conftest.err
9682 rm -f conftest.er1
9683 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009685 (exit $ac_status); } && {
9686 test -z "$ac_c_werror_flag" ||
9687 test ! -s conftest.err
9688 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 ac_hi=$ac_mid; break
9690else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009692sed 's/^/| /' conftest.$ac_ext >&5
9693
Martin v. Löwiseba40652007-08-30 20:10:57 +00009694 ac_lo=`expr $ac_mid + 1`
9695 if test $ac_lo -le $ac_mid; then
9696 ac_lo= ac_hi=
9697 break
9698 fi
9699 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009700fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009701
9702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 done
9704else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009706sed 's/^/| /' conftest.$ac_ext >&5
9707
Martin v. Löwiseba40652007-08-30 20:10:57 +00009708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009709/* confdefs.h. */
9710_ACEOF
9711cat confdefs.h >>conftest.$ac_ext
9712cat >>conftest.$ac_ext <<_ACEOF
9713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009714$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009715 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009716int
9717main ()
9718{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009719static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009720test_array [0] = 0
9721
9722 ;
9723 return 0;
9724}
9725_ACEOF
9726rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009727if { (ac_try="$ac_compile"
9728case "(($ac_try" in
9729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9730 *) ac_try_echo=$ac_try;;
9731esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009735 grep -v '^ *+' conftest.er1 >conftest.err
9736 rm -f conftest.er1
9737 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009739 (exit $ac_status); } && {
9740 test -z "$ac_c_werror_flag" ||
9741 test ! -s conftest.err
9742 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009743 ac_hi=-1 ac_mid=-1
9744 while :; do
9745 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009746/* confdefs.h. */
9747_ACEOF
9748cat confdefs.h >>conftest.$ac_ext
9749cat >>conftest.$ac_ext <<_ACEOF
9750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009751$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009752 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009753int
9754main ()
9755{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009756static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009757test_array [0] = 0
9758
9759 ;
9760 return 0;
9761}
9762_ACEOF
9763rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009764if { (ac_try="$ac_compile"
9765case "(($ac_try" in
9766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9767 *) ac_try_echo=$ac_try;;
9768esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009770 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009772 grep -v '^ *+' conftest.er1 >conftest.err
9773 rm -f conftest.er1
9774 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009776 (exit $ac_status); } && {
9777 test -z "$ac_c_werror_flag" ||
9778 test ! -s conftest.err
9779 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009780 ac_lo=$ac_mid; break
9781else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009783sed 's/^/| /' conftest.$ac_ext >&5
9784
Martin v. Löwiseba40652007-08-30 20:10:57 +00009785 ac_hi=`expr '(' $ac_mid ')' - 1`
9786 if test $ac_mid -le $ac_hi; then
9787 ac_lo= ac_hi=
9788 break
9789 fi
9790 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009792
9793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 done
9795else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009797sed 's/^/| /' conftest.$ac_ext >&5
9798
Martin v. Löwiseba40652007-08-30 20:10:57 +00009799 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009801
9802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009803fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009804
9805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009806# Binary search between lo and hi bounds.
9807while test "x$ac_lo" != "x$ac_hi"; do
9808 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9809 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009810/* confdefs.h. */
9811_ACEOF
9812cat confdefs.h >>conftest.$ac_ext
9813cat >>conftest.$ac_ext <<_ACEOF
9814/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009815$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009816 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009817int
9818main ()
9819{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009820static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009821test_array [0] = 0
9822
9823 ;
9824 return 0;
9825}
9826_ACEOF
9827rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009828if { (ac_try="$ac_compile"
9829case "(($ac_try" in
9830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9831 *) ac_try_echo=$ac_try;;
9832esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009834 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009836 grep -v '^ *+' conftest.er1 >conftest.err
9837 rm -f conftest.er1
9838 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009840 (exit $ac_status); } && {
9841 test -z "$ac_c_werror_flag" ||
9842 test ! -s conftest.err
9843 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009844 ac_hi=$ac_mid
9845else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009847sed 's/^/| /' conftest.$ac_ext >&5
9848
Martin v. Löwiseba40652007-08-30 20:10:57 +00009849 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009850fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009851
9852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009853done
9854case $ac_lo in
9855?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009856'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009857 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009858See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009859echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009860See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009861 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009862 else
9863 ac_cv_sizeof_double=0
9864 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009865esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009866else
Martin v. Löwis11437992002-04-12 09:54:03 +00009867 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009868/* confdefs.h. */
9869_ACEOF
9870cat confdefs.h >>conftest.$ac_ext
9871cat >>conftest.$ac_ext <<_ACEOF
9872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009873$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009874 typedef double ac__type_sizeof_;
9875static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9876static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009877#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009878#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009879int
9880main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009881{
Martin v. Löwis11437992002-04-12 09:54:03 +00009882
9883 FILE *f = fopen ("conftest.val", "w");
9884 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009885 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009886 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009888 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009889 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009890 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009891 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009892 }
9893 else
9894 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009895 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009896 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009897 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009898 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009899 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009900 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009901
9902 ;
9903 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009904}
Martin v. Löwis11437992002-04-12 09:54:03 +00009905_ACEOF
9906rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009907if { (ac_try="$ac_link"
9908case "(($ac_try" in
9909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9910 *) ac_try_echo=$ac_try;;
9911esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009913 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009914 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009916 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009917 { (case "(($ac_try" in
9918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9919 *) ac_try_echo=$ac_try;;
9920esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009922 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009923 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009925 (exit $ac_status); }; }; then
9926 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009927else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009928 echo "$as_me: program exited with status $ac_status" >&5
9929echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009930sed 's/^/| /' conftest.$ac_ext >&5
9931
Martin v. Löwis11437992002-04-12 09:54:03 +00009932( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009933if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009934 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009935See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009936echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009937See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009938 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009939 else
9940 ac_cv_sizeof_double=0
9941 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009942fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009943rm -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 +00009944fi
9945rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009946fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009947{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9948echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009949
9950
9951
Martin v. Löwis11437992002-04-12 09:54:03 +00009952cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009953#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009954_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009955
9956
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009957{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9958echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9959if test "${ac_cv_type_fpos_t+set}" = set; then
9960 echo $ECHO_N "(cached) $ECHO_C" >&6
9961else
9962 cat >conftest.$ac_ext <<_ACEOF
9963/* confdefs.h. */
9964_ACEOF
9965cat confdefs.h >>conftest.$ac_ext
9966cat >>conftest.$ac_ext <<_ACEOF
9967/* end confdefs.h. */
9968$ac_includes_default
9969typedef fpos_t ac__type_new_;
9970int
9971main ()
9972{
9973if ((ac__type_new_ *) 0)
9974 return 0;
9975if (sizeof (ac__type_new_))
9976 return 0;
9977 ;
9978 return 0;
9979}
9980_ACEOF
9981rm -f conftest.$ac_objext
9982if { (ac_try="$ac_compile"
9983case "(($ac_try" in
9984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9985 *) ac_try_echo=$ac_try;;
9986esac
9987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9988 (eval "$ac_compile") 2>conftest.er1
9989 ac_status=$?
9990 grep -v '^ *+' conftest.er1 >conftest.err
9991 rm -f conftest.er1
9992 cat conftest.err >&5
9993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9994 (exit $ac_status); } && {
9995 test -z "$ac_c_werror_flag" ||
9996 test ! -s conftest.err
9997 } && test -s conftest.$ac_objext; then
9998 ac_cv_type_fpos_t=yes
9999else
10000 echo "$as_me: failed program was:" >&5
10001sed 's/^/| /' conftest.$ac_ext >&5
10002
10003 ac_cv_type_fpos_t=no
10004fi
10005
10006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10007fi
10008{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10009echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10010
Martin v. Löwiseba40652007-08-30 20:10:57 +000010011# The cast to long int works around a bug in the HP C Compiler
10012# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10013# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10014# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010015{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10016echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010017if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010018 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010019else
Martin v. Löwis11437992002-04-12 09:54:03 +000010020 if test "$cross_compiling" = yes; then
10021 # Depending upon the size, compute the lo and hi bounds.
10022cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010023/* confdefs.h. */
10024_ACEOF
10025cat confdefs.h >>conftest.$ac_ext
10026cat >>conftest.$ac_ext <<_ACEOF
10027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010028$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010029 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010030int
10031main ()
10032{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010033static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010034test_array [0] = 0
10035
10036 ;
10037 return 0;
10038}
10039_ACEOF
10040rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010041if { (ac_try="$ac_compile"
10042case "(($ac_try" in
10043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10044 *) ac_try_echo=$ac_try;;
10045esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010047 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010049 grep -v '^ *+' conftest.er1 >conftest.err
10050 rm -f conftest.er1
10051 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010053 (exit $ac_status); } && {
10054 test -z "$ac_c_werror_flag" ||
10055 test ! -s conftest.err
10056 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010057 ac_lo=0 ac_mid=0
10058 while :; do
10059 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010060/* confdefs.h. */
10061_ACEOF
10062cat confdefs.h >>conftest.$ac_ext
10063cat >>conftest.$ac_ext <<_ACEOF
10064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010065$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010066 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010067int
10068main ()
10069{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010070static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010071test_array [0] = 0
10072
10073 ;
10074 return 0;
10075}
10076_ACEOF
10077rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010078if { (ac_try="$ac_compile"
10079case "(($ac_try" in
10080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10081 *) ac_try_echo=$ac_try;;
10082esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010084 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010085 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010086 grep -v '^ *+' conftest.er1 >conftest.err
10087 rm -f conftest.er1
10088 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010090 (exit $ac_status); } && {
10091 test -z "$ac_c_werror_flag" ||
10092 test ! -s conftest.err
10093 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010094 ac_hi=$ac_mid; break
10095else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010096 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010097sed 's/^/| /' conftest.$ac_ext >&5
10098
Martin v. Löwiseba40652007-08-30 20:10:57 +000010099 ac_lo=`expr $ac_mid + 1`
10100 if test $ac_lo -le $ac_mid; then
10101 ac_lo= ac_hi=
10102 break
10103 fi
10104 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010106
10107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010108 done
10109else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010110 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010111sed 's/^/| /' conftest.$ac_ext >&5
10112
Martin v. Löwiseba40652007-08-30 20:10:57 +000010113 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010114/* confdefs.h. */
10115_ACEOF
10116cat confdefs.h >>conftest.$ac_ext
10117cat >>conftest.$ac_ext <<_ACEOF
10118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010119$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010120 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010121int
10122main ()
10123{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010124static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010125test_array [0] = 0
10126
10127 ;
10128 return 0;
10129}
10130_ACEOF
10131rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010132if { (ac_try="$ac_compile"
10133case "(($ac_try" in
10134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10135 *) ac_try_echo=$ac_try;;
10136esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010138 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010140 grep -v '^ *+' conftest.er1 >conftest.err
10141 rm -f conftest.er1
10142 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010144 (exit $ac_status); } && {
10145 test -z "$ac_c_werror_flag" ||
10146 test ! -s conftest.err
10147 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010148 ac_hi=-1 ac_mid=-1
10149 while :; do
10150 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010151/* confdefs.h. */
10152_ACEOF
10153cat confdefs.h >>conftest.$ac_ext
10154cat >>conftest.$ac_ext <<_ACEOF
10155/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010156$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010157 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010158int
10159main ()
10160{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010161static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010162test_array [0] = 0
10163
10164 ;
10165 return 0;
10166}
10167_ACEOF
10168rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010169if { (ac_try="$ac_compile"
10170case "(($ac_try" in
10171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10172 *) ac_try_echo=$ac_try;;
10173esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010175 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010177 grep -v '^ *+' conftest.er1 >conftest.err
10178 rm -f conftest.er1
10179 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010181 (exit $ac_status); } && {
10182 test -z "$ac_c_werror_flag" ||
10183 test ! -s conftest.err
10184 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010185 ac_lo=$ac_mid; break
10186else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010188sed 's/^/| /' conftest.$ac_ext >&5
10189
Martin v. Löwiseba40652007-08-30 20:10:57 +000010190 ac_hi=`expr '(' $ac_mid ')' - 1`
10191 if test $ac_mid -le $ac_hi; then
10192 ac_lo= ac_hi=
10193 break
10194 fi
10195 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010197
10198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010199 done
10200else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010201 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010202sed 's/^/| /' conftest.$ac_ext >&5
10203
Martin v. Löwiseba40652007-08-30 20:10:57 +000010204 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010206
10207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010208fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010209
10210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010211# Binary search between lo and hi bounds.
10212while test "x$ac_lo" != "x$ac_hi"; do
10213 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10214 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010215/* confdefs.h. */
10216_ACEOF
10217cat confdefs.h >>conftest.$ac_ext
10218cat >>conftest.$ac_ext <<_ACEOF
10219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010220$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010221 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010222int
10223main ()
10224{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010225static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010226test_array [0] = 0
10227
10228 ;
10229 return 0;
10230}
10231_ACEOF
10232rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010233if { (ac_try="$ac_compile"
10234case "(($ac_try" in
10235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10236 *) ac_try_echo=$ac_try;;
10237esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010239 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010240 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010241 grep -v '^ *+' conftest.er1 >conftest.err
10242 rm -f conftest.er1
10243 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010245 (exit $ac_status); } && {
10246 test -z "$ac_c_werror_flag" ||
10247 test ! -s conftest.err
10248 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010249 ac_hi=$ac_mid
10250else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010252sed 's/^/| /' conftest.$ac_ext >&5
10253
Martin v. Löwiseba40652007-08-30 20:10:57 +000010254 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010255fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010256
10257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010258done
10259case $ac_lo in
10260?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010261'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010262 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010263See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010264echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010265See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010266 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010267 else
10268 ac_cv_sizeof_fpos_t=0
10269 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010270esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010271else
Martin v. Löwis11437992002-04-12 09:54:03 +000010272 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010273/* confdefs.h. */
10274_ACEOF
10275cat confdefs.h >>conftest.$ac_ext
10276cat >>conftest.$ac_ext <<_ACEOF
10277/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010278$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010279 typedef fpos_t ac__type_sizeof_;
10280static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10281static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010282#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010283#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010284int
10285main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010286{
Martin v. Löwis11437992002-04-12 09:54:03 +000010287
10288 FILE *f = fopen ("conftest.val", "w");
10289 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010290 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010291 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010293 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010294 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010295 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010296 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010297 }
10298 else
10299 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010300 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010301 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010302 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010303 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010304 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010305 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010306
10307 ;
10308 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010309}
Martin v. Löwis11437992002-04-12 09:54:03 +000010310_ACEOF
10311rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010312if { (ac_try="$ac_link"
10313case "(($ac_try" in
10314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10315 *) ac_try_echo=$ac_try;;
10316esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010318 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010319 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010321 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010322 { (case "(($ac_try" in
10323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10324 *) ac_try_echo=$ac_try;;
10325esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010327 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010328 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010330 (exit $ac_status); }; }; then
10331 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010332else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010333 echo "$as_me: program exited with status $ac_status" >&5
10334echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010335sed 's/^/| /' conftest.$ac_ext >&5
10336
Martin v. Löwis11437992002-04-12 09:54:03 +000010337( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010338if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010339 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010340See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010341echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010342See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010343 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010344 else
10345 ac_cv_sizeof_fpos_t=0
10346 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010347fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010348rm -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 +000010349fi
10350rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010351fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010352{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10353echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010354
10355
10356
Martin v. Löwis11437992002-04-12 09:54:03 +000010357cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010358#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010359_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010360
Michael W. Hudson54241132001-12-07 15:38:26 +000010361
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010362{ echo "$as_me:$LINENO: checking for size_t" >&5
10363echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10364if test "${ac_cv_type_size_t+set}" = set; then
10365 echo $ECHO_N "(cached) $ECHO_C" >&6
10366else
10367 cat >conftest.$ac_ext <<_ACEOF
10368/* confdefs.h. */
10369_ACEOF
10370cat confdefs.h >>conftest.$ac_ext
10371cat >>conftest.$ac_ext <<_ACEOF
10372/* end confdefs.h. */
10373$ac_includes_default
10374typedef size_t ac__type_new_;
10375int
10376main ()
10377{
10378if ((ac__type_new_ *) 0)
10379 return 0;
10380if (sizeof (ac__type_new_))
10381 return 0;
10382 ;
10383 return 0;
10384}
10385_ACEOF
10386rm -f conftest.$ac_objext
10387if { (ac_try="$ac_compile"
10388case "(($ac_try" in
10389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10390 *) ac_try_echo=$ac_try;;
10391esac
10392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10393 (eval "$ac_compile") 2>conftest.er1
10394 ac_status=$?
10395 grep -v '^ *+' conftest.er1 >conftest.err
10396 rm -f conftest.er1
10397 cat conftest.err >&5
10398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10399 (exit $ac_status); } && {
10400 test -z "$ac_c_werror_flag" ||
10401 test ! -s conftest.err
10402 } && test -s conftest.$ac_objext; then
10403 ac_cv_type_size_t=yes
10404else
10405 echo "$as_me: failed program was:" >&5
10406sed 's/^/| /' conftest.$ac_ext >&5
10407
10408 ac_cv_type_size_t=no
10409fi
10410
10411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10412fi
10413{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10414echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10415
Martin v. Löwiseba40652007-08-30 20:10:57 +000010416# The cast to long int works around a bug in the HP C Compiler
10417# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10418# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10419# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010420{ echo "$as_me:$LINENO: checking size of size_t" >&5
10421echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010422if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010423 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010424else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010425 if test "$cross_compiling" = yes; then
10426 # Depending upon the size, compute the lo and hi bounds.
10427cat >conftest.$ac_ext <<_ACEOF
10428/* confdefs.h. */
10429_ACEOF
10430cat confdefs.h >>conftest.$ac_ext
10431cat >>conftest.$ac_ext <<_ACEOF
10432/* end confdefs.h. */
10433$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010434 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010435int
10436main ()
10437{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010438static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010439test_array [0] = 0
10440
10441 ;
10442 return 0;
10443}
10444_ACEOF
10445rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010446if { (ac_try="$ac_compile"
10447case "(($ac_try" in
10448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10449 *) ac_try_echo=$ac_try;;
10450esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010453 ac_status=$?
10454 grep -v '^ *+' conftest.er1 >conftest.err
10455 rm -f conftest.er1
10456 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010458 (exit $ac_status); } && {
10459 test -z "$ac_c_werror_flag" ||
10460 test ! -s conftest.err
10461 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010462 ac_lo=0 ac_mid=0
10463 while :; do
10464 cat >conftest.$ac_ext <<_ACEOF
10465/* confdefs.h. */
10466_ACEOF
10467cat confdefs.h >>conftest.$ac_ext
10468cat >>conftest.$ac_ext <<_ACEOF
10469/* end confdefs.h. */
10470$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010471 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010472int
10473main ()
10474{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010475static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010476test_array [0] = 0
10477
10478 ;
10479 return 0;
10480}
10481_ACEOF
10482rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010483if { (ac_try="$ac_compile"
10484case "(($ac_try" in
10485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10486 *) ac_try_echo=$ac_try;;
10487esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010489 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010490 ac_status=$?
10491 grep -v '^ *+' conftest.er1 >conftest.err
10492 rm -f conftest.er1
10493 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010495 (exit $ac_status); } && {
10496 test -z "$ac_c_werror_flag" ||
10497 test ! -s conftest.err
10498 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010499 ac_hi=$ac_mid; break
10500else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010501 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010502sed 's/^/| /' conftest.$ac_ext >&5
10503
Martin v. Löwiseba40652007-08-30 20:10:57 +000010504 ac_lo=`expr $ac_mid + 1`
10505 if test $ac_lo -le $ac_mid; then
10506 ac_lo= ac_hi=
10507 break
10508 fi
10509 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010510fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010511
10512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010513 done
10514else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010515 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010516sed 's/^/| /' conftest.$ac_ext >&5
10517
Martin v. Löwiseba40652007-08-30 20:10:57 +000010518 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010519/* confdefs.h. */
10520_ACEOF
10521cat confdefs.h >>conftest.$ac_ext
10522cat >>conftest.$ac_ext <<_ACEOF
10523/* end confdefs.h. */
10524$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010525 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010526int
10527main ()
10528{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010529static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010530test_array [0] = 0
10531
10532 ;
10533 return 0;
10534}
10535_ACEOF
10536rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010537if { (ac_try="$ac_compile"
10538case "(($ac_try" in
10539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10540 *) ac_try_echo=$ac_try;;
10541esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010543 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010544 ac_status=$?
10545 grep -v '^ *+' conftest.er1 >conftest.err
10546 rm -f conftest.er1
10547 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010549 (exit $ac_status); } && {
10550 test -z "$ac_c_werror_flag" ||
10551 test ! -s conftest.err
10552 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010553 ac_hi=-1 ac_mid=-1
10554 while :; do
10555 cat >conftest.$ac_ext <<_ACEOF
10556/* confdefs.h. */
10557_ACEOF
10558cat confdefs.h >>conftest.$ac_ext
10559cat >>conftest.$ac_ext <<_ACEOF
10560/* end confdefs.h. */
10561$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010562 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010563int
10564main ()
10565{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010566static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010567test_array [0] = 0
10568
10569 ;
10570 return 0;
10571}
10572_ACEOF
10573rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010574if { (ac_try="$ac_compile"
10575case "(($ac_try" in
10576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10577 *) ac_try_echo=$ac_try;;
10578esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010580 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010581 ac_status=$?
10582 grep -v '^ *+' conftest.er1 >conftest.err
10583 rm -f conftest.er1
10584 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010586 (exit $ac_status); } && {
10587 test -z "$ac_c_werror_flag" ||
10588 test ! -s conftest.err
10589 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010590 ac_lo=$ac_mid; break
10591else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010592 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010593sed 's/^/| /' conftest.$ac_ext >&5
10594
Martin v. Löwiseba40652007-08-30 20:10:57 +000010595 ac_hi=`expr '(' $ac_mid ')' - 1`
10596 if test $ac_mid -le $ac_hi; then
10597 ac_lo= ac_hi=
10598 break
10599 fi
10600 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010602
10603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010604 done
10605else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010606 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010607sed 's/^/| /' conftest.$ac_ext >&5
10608
Martin v. Löwiseba40652007-08-30 20:10:57 +000010609 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010610fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010611
10612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010614
10615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010616# Binary search between lo and hi bounds.
10617while test "x$ac_lo" != "x$ac_hi"; do
10618 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10619 cat >conftest.$ac_ext <<_ACEOF
10620/* confdefs.h. */
10621_ACEOF
10622cat confdefs.h >>conftest.$ac_ext
10623cat >>conftest.$ac_ext <<_ACEOF
10624/* end confdefs.h. */
10625$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010626 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010627int
10628main ()
10629{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010630static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010631test_array [0] = 0
10632
10633 ;
10634 return 0;
10635}
10636_ACEOF
10637rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010638if { (ac_try="$ac_compile"
10639case "(($ac_try" in
10640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10641 *) ac_try_echo=$ac_try;;
10642esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010644 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010645 ac_status=$?
10646 grep -v '^ *+' conftest.er1 >conftest.err
10647 rm -f conftest.er1
10648 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010650 (exit $ac_status); } && {
10651 test -z "$ac_c_werror_flag" ||
10652 test ! -s conftest.err
10653 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010654 ac_hi=$ac_mid
10655else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010656 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010657sed 's/^/| /' conftest.$ac_ext >&5
10658
Martin v. Löwiseba40652007-08-30 20:10:57 +000010659 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010661
10662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010663done
10664case $ac_lo in
10665?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010666'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010667 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010668See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010669echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010671 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010672 else
10673 ac_cv_sizeof_size_t=0
10674 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010675esac
10676else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010677 cat >conftest.$ac_ext <<_ACEOF
10678/* confdefs.h. */
10679_ACEOF
10680cat confdefs.h >>conftest.$ac_ext
10681cat >>conftest.$ac_ext <<_ACEOF
10682/* end confdefs.h. */
10683$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010684 typedef size_t ac__type_sizeof_;
10685static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10686static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010687#include <stdio.h>
10688#include <stdlib.h>
10689int
10690main ()
10691{
10692
10693 FILE *f = fopen ("conftest.val", "w");
10694 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010695 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010696 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010697 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010698 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010699 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010700 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010701 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010702 }
10703 else
10704 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010705 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010706 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010707 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010708 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010709 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010710 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010711
10712 ;
10713 return 0;
10714}
10715_ACEOF
10716rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010717if { (ac_try="$ac_link"
10718case "(($ac_try" in
10719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10720 *) ac_try_echo=$ac_try;;
10721esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010723 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010724 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010726 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010727 { (case "(($ac_try" in
10728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10729 *) ac_try_echo=$ac_try;;
10730esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010732 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010733 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010735 (exit $ac_status); }; }; then
10736 ac_cv_sizeof_size_t=`cat conftest.val`
10737else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010738 echo "$as_me: program exited with status $ac_status" >&5
10739echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010740sed 's/^/| /' conftest.$ac_ext >&5
10741
10742( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010743if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010744 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010745See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010746echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010747See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010748 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010749 else
10750 ac_cv_sizeof_size_t=0
10751 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010753rm -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 +000010754fi
10755rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010756fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010757{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10758echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010759
10760
10761
Martin v. Löwis18e16552006-02-15 17:27:45 +000010762cat >>confdefs.h <<_ACEOF
10763#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10764_ACEOF
10765
10766
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010767{ echo "$as_me:$LINENO: checking for pid_t" >&5
10768echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10769if test "${ac_cv_type_pid_t+set}" = set; then
10770 echo $ECHO_N "(cached) $ECHO_C" >&6
10771else
10772 cat >conftest.$ac_ext <<_ACEOF
10773/* confdefs.h. */
10774_ACEOF
10775cat confdefs.h >>conftest.$ac_ext
10776cat >>conftest.$ac_ext <<_ACEOF
10777/* end confdefs.h. */
10778$ac_includes_default
10779typedef pid_t ac__type_new_;
10780int
10781main ()
10782{
10783if ((ac__type_new_ *) 0)
10784 return 0;
10785if (sizeof (ac__type_new_))
10786 return 0;
10787 ;
10788 return 0;
10789}
10790_ACEOF
10791rm -f conftest.$ac_objext
10792if { (ac_try="$ac_compile"
10793case "(($ac_try" in
10794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10795 *) ac_try_echo=$ac_try;;
10796esac
10797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10798 (eval "$ac_compile") 2>conftest.er1
10799 ac_status=$?
10800 grep -v '^ *+' conftest.er1 >conftest.err
10801 rm -f conftest.er1
10802 cat conftest.err >&5
10803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10804 (exit $ac_status); } && {
10805 test -z "$ac_c_werror_flag" ||
10806 test ! -s conftest.err
10807 } && test -s conftest.$ac_objext; then
10808 ac_cv_type_pid_t=yes
10809else
10810 echo "$as_me: failed program was:" >&5
10811sed 's/^/| /' conftest.$ac_ext >&5
10812
10813 ac_cv_type_pid_t=no
10814fi
10815
10816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10817fi
10818{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10819echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10820
Christian Heimes951cc0f2008-01-31 23:08:23 +000010821# The cast to long int works around a bug in the HP C Compiler
10822# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10823# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10824# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010825{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10826echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010827if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010828 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010829else
10830 if test "$cross_compiling" = yes; then
10831 # Depending upon the size, compute the lo and hi bounds.
10832cat >conftest.$ac_ext <<_ACEOF
10833/* confdefs.h. */
10834_ACEOF
10835cat confdefs.h >>conftest.$ac_ext
10836cat >>conftest.$ac_ext <<_ACEOF
10837/* end confdefs.h. */
10838$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010839 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010840int
10841main ()
10842{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010843static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010844test_array [0] = 0
10845
10846 ;
10847 return 0;
10848}
10849_ACEOF
10850rm -f conftest.$ac_objext
10851if { (ac_try="$ac_compile"
10852case "(($ac_try" in
10853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10854 *) ac_try_echo=$ac_try;;
10855esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010857 (eval "$ac_compile") 2>conftest.er1
10858 ac_status=$?
10859 grep -v '^ *+' conftest.er1 >conftest.err
10860 rm -f conftest.er1
10861 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010863 (exit $ac_status); } && {
10864 test -z "$ac_c_werror_flag" ||
10865 test ! -s conftest.err
10866 } && test -s conftest.$ac_objext; then
10867 ac_lo=0 ac_mid=0
10868 while :; do
10869 cat >conftest.$ac_ext <<_ACEOF
10870/* confdefs.h. */
10871_ACEOF
10872cat confdefs.h >>conftest.$ac_ext
10873cat >>conftest.$ac_ext <<_ACEOF
10874/* end confdefs.h. */
10875$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010876 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010877int
10878main ()
10879{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010880static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010881test_array [0] = 0
10882
10883 ;
10884 return 0;
10885}
10886_ACEOF
10887rm -f conftest.$ac_objext
10888if { (ac_try="$ac_compile"
10889case "(($ac_try" in
10890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10891 *) ac_try_echo=$ac_try;;
10892esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010894 (eval "$ac_compile") 2>conftest.er1
10895 ac_status=$?
10896 grep -v '^ *+' conftest.er1 >conftest.err
10897 rm -f conftest.er1
10898 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010900 (exit $ac_status); } && {
10901 test -z "$ac_c_werror_flag" ||
10902 test ! -s conftest.err
10903 } && test -s conftest.$ac_objext; then
10904 ac_hi=$ac_mid; break
10905else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010906 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010907sed 's/^/| /' conftest.$ac_ext >&5
10908
10909 ac_lo=`expr $ac_mid + 1`
10910 if test $ac_lo -le $ac_mid; then
10911 ac_lo= ac_hi=
10912 break
10913 fi
10914 ac_mid=`expr 2 '*' $ac_mid + 1`
10915fi
10916
10917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10918 done
10919else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010920 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010921sed 's/^/| /' conftest.$ac_ext >&5
10922
10923 cat >conftest.$ac_ext <<_ACEOF
10924/* confdefs.h. */
10925_ACEOF
10926cat confdefs.h >>conftest.$ac_ext
10927cat >>conftest.$ac_ext <<_ACEOF
10928/* end confdefs.h. */
10929$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010930 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010931int
10932main ()
10933{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010934static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010935test_array [0] = 0
10936
10937 ;
10938 return 0;
10939}
10940_ACEOF
10941rm -f conftest.$ac_objext
10942if { (ac_try="$ac_compile"
10943case "(($ac_try" in
10944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10945 *) ac_try_echo=$ac_try;;
10946esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010948 (eval "$ac_compile") 2>conftest.er1
10949 ac_status=$?
10950 grep -v '^ *+' conftest.er1 >conftest.err
10951 rm -f conftest.er1
10952 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010954 (exit $ac_status); } && {
10955 test -z "$ac_c_werror_flag" ||
10956 test ! -s conftest.err
10957 } && test -s conftest.$ac_objext; then
10958 ac_hi=-1 ac_mid=-1
10959 while :; do
10960 cat >conftest.$ac_ext <<_ACEOF
10961/* confdefs.h. */
10962_ACEOF
10963cat confdefs.h >>conftest.$ac_ext
10964cat >>conftest.$ac_ext <<_ACEOF
10965/* end confdefs.h. */
10966$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010967 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010968int
10969main ()
10970{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010971static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010972test_array [0] = 0
10973
10974 ;
10975 return 0;
10976}
10977_ACEOF
10978rm -f conftest.$ac_objext
10979if { (ac_try="$ac_compile"
10980case "(($ac_try" in
10981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10982 *) ac_try_echo=$ac_try;;
10983esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010985 (eval "$ac_compile") 2>conftest.er1
10986 ac_status=$?
10987 grep -v '^ *+' conftest.er1 >conftest.err
10988 rm -f conftest.er1
10989 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010991 (exit $ac_status); } && {
10992 test -z "$ac_c_werror_flag" ||
10993 test ! -s conftest.err
10994 } && test -s conftest.$ac_objext; then
10995 ac_lo=$ac_mid; break
10996else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010997 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010998sed 's/^/| /' conftest.$ac_ext >&5
10999
11000 ac_hi=`expr '(' $ac_mid ')' - 1`
11001 if test $ac_mid -le $ac_hi; then
11002 ac_lo= ac_hi=
11003 break
11004 fi
11005 ac_mid=`expr 2 '*' $ac_mid`
11006fi
11007
11008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11009 done
11010else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011011 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011012sed 's/^/| /' conftest.$ac_ext >&5
11013
11014 ac_lo= ac_hi=
11015fi
11016
11017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11018fi
11019
11020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11021# Binary search between lo and hi bounds.
11022while test "x$ac_lo" != "x$ac_hi"; do
11023 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11024 cat >conftest.$ac_ext <<_ACEOF
11025/* confdefs.h. */
11026_ACEOF
11027cat confdefs.h >>conftest.$ac_ext
11028cat >>conftest.$ac_ext <<_ACEOF
11029/* end confdefs.h. */
11030$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011031 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011032int
11033main ()
11034{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011035static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011036test_array [0] = 0
11037
11038 ;
11039 return 0;
11040}
11041_ACEOF
11042rm -f conftest.$ac_objext
11043if { (ac_try="$ac_compile"
11044case "(($ac_try" in
11045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11046 *) ac_try_echo=$ac_try;;
11047esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011049 (eval "$ac_compile") 2>conftest.er1
11050 ac_status=$?
11051 grep -v '^ *+' conftest.er1 >conftest.err
11052 rm -f conftest.er1
11053 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011055 (exit $ac_status); } && {
11056 test -z "$ac_c_werror_flag" ||
11057 test ! -s conftest.err
11058 } && test -s conftest.$ac_objext; then
11059 ac_hi=$ac_mid
11060else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011061 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011062sed 's/^/| /' conftest.$ac_ext >&5
11063
11064 ac_lo=`expr '(' $ac_mid ')' + 1`
11065fi
11066
11067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11068done
11069case $ac_lo in
11070?*) ac_cv_sizeof_pid_t=$ac_lo;;
11071'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011072 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011073See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011074echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011075See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011076 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011077 else
11078 ac_cv_sizeof_pid_t=0
11079 fi ;;
11080esac
11081else
11082 cat >conftest.$ac_ext <<_ACEOF
11083/* confdefs.h. */
11084_ACEOF
11085cat confdefs.h >>conftest.$ac_ext
11086cat >>conftest.$ac_ext <<_ACEOF
11087/* end confdefs.h. */
11088$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011089 typedef pid_t ac__type_sizeof_;
11090static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11091static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011092#include <stdio.h>
11093#include <stdlib.h>
11094int
11095main ()
11096{
11097
11098 FILE *f = fopen ("conftest.val", "w");
11099 if (! f)
11100 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011101 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011102 {
11103 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011104 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011105 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011106 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011107 }
11108 else
11109 {
11110 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011111 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011112 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011113 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011114 }
11115 return ferror (f) || fclose (f) != 0;
11116
11117 ;
11118 return 0;
11119}
11120_ACEOF
11121rm -f conftest$ac_exeext
11122if { (ac_try="$ac_link"
11123case "(($ac_try" in
11124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11125 *) ac_try_echo=$ac_try;;
11126esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011128 (eval "$ac_link") 2>&5
11129 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011131 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11132 { (case "(($ac_try" in
11133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11134 *) ac_try_echo=$ac_try;;
11135esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011137 (eval "$ac_try") 2>&5
11138 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011140 (exit $ac_status); }; }; then
11141 ac_cv_sizeof_pid_t=`cat conftest.val`
11142else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011143 echo "$as_me: program exited with status $ac_status" >&5
11144echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011145sed 's/^/| /' conftest.$ac_ext >&5
11146
11147( exit $ac_status )
11148if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011149 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011150See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011151echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011152See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011153 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011154 else
11155 ac_cv_sizeof_pid_t=0
11156 fi
11157fi
11158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11159fi
11160rm -f conftest.val
11161fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011162{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11163echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011164
11165
11166
11167cat >>confdefs.h <<_ACEOF
11168#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11169_ACEOF
11170
11171
Michael W. Hudson54241132001-12-07 15:38:26 +000011172
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011173{ echo "$as_me:$LINENO: checking for long long support" >&5
11174echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011175have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011176cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011177/* confdefs.h. */
11178_ACEOF
11179cat confdefs.h >>conftest.$ac_ext
11180cat >>conftest.$ac_ext <<_ACEOF
11181/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011182
Martin v. Löwis11437992002-04-12 09:54:03 +000011183int
11184main ()
11185{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011186long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011187 ;
11188 return 0;
11189}
11190_ACEOF
11191rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011192if { (ac_try="$ac_compile"
11193case "(($ac_try" in
11194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11195 *) ac_try_echo=$ac_try;;
11196esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011200 grep -v '^ *+' conftest.er1 >conftest.err
11201 rm -f conftest.er1
11202 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011204 (exit $ac_status); } && {
11205 test -z "$ac_c_werror_flag" ||
11206 test ! -s conftest.err
11207 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011208
11209
11210cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011211#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011212_ACEOF
11213
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011214 have_long_long=yes
11215
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011216else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011218sed 's/^/| /' conftest.$ac_ext >&5
11219
Martin v. Löwiseba40652007-08-30 20:10:57 +000011220
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011222
11223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011224{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11225echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011226if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011227{ echo "$as_me:$LINENO: checking for long long" >&5
11228echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11229if test "${ac_cv_type_long_long+set}" = set; then
11230 echo $ECHO_N "(cached) $ECHO_C" >&6
11231else
11232 cat >conftest.$ac_ext <<_ACEOF
11233/* confdefs.h. */
11234_ACEOF
11235cat confdefs.h >>conftest.$ac_ext
11236cat >>conftest.$ac_ext <<_ACEOF
11237/* end confdefs.h. */
11238$ac_includes_default
11239typedef long long ac__type_new_;
11240int
11241main ()
11242{
11243if ((ac__type_new_ *) 0)
11244 return 0;
11245if (sizeof (ac__type_new_))
11246 return 0;
11247 ;
11248 return 0;
11249}
11250_ACEOF
11251rm -f conftest.$ac_objext
11252if { (ac_try="$ac_compile"
11253case "(($ac_try" in
11254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11255 *) ac_try_echo=$ac_try;;
11256esac
11257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11258 (eval "$ac_compile") 2>conftest.er1
11259 ac_status=$?
11260 grep -v '^ *+' conftest.er1 >conftest.err
11261 rm -f conftest.er1
11262 cat conftest.err >&5
11263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11264 (exit $ac_status); } && {
11265 test -z "$ac_c_werror_flag" ||
11266 test ! -s conftest.err
11267 } && test -s conftest.$ac_objext; then
11268 ac_cv_type_long_long=yes
11269else
11270 echo "$as_me: failed program was:" >&5
11271sed 's/^/| /' conftest.$ac_ext >&5
11272
11273 ac_cv_type_long_long=no
11274fi
11275
11276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11277fi
11278{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11279echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11280
Martin v. Löwiseba40652007-08-30 20:10:57 +000011281# The cast to long int works around a bug in the HP C Compiler
11282# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11283# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11284# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011285{ echo "$as_me:$LINENO: checking size of long long" >&5
11286echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011287if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011288 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011289else
Martin v. Löwis11437992002-04-12 09:54:03 +000011290 if test "$cross_compiling" = yes; then
11291 # Depending upon the size, compute the lo and hi bounds.
11292cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011293/* confdefs.h. */
11294_ACEOF
11295cat confdefs.h >>conftest.$ac_ext
11296cat >>conftest.$ac_ext <<_ACEOF
11297/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011298$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011299 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011300int
11301main ()
11302{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011303static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011304test_array [0] = 0
11305
11306 ;
11307 return 0;
11308}
11309_ACEOF
11310rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011311if { (ac_try="$ac_compile"
11312case "(($ac_try" in
11313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11314 *) ac_try_echo=$ac_try;;
11315esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011317 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011319 grep -v '^ *+' conftest.er1 >conftest.err
11320 rm -f conftest.er1
11321 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011323 (exit $ac_status); } && {
11324 test -z "$ac_c_werror_flag" ||
11325 test ! -s conftest.err
11326 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011327 ac_lo=0 ac_mid=0
11328 while :; do
11329 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011330/* confdefs.h. */
11331_ACEOF
11332cat confdefs.h >>conftest.$ac_ext
11333cat >>conftest.$ac_ext <<_ACEOF
11334/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011335$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011336 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011337int
11338main ()
11339{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011340static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011341test_array [0] = 0
11342
11343 ;
11344 return 0;
11345}
11346_ACEOF
11347rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011348if { (ac_try="$ac_compile"
11349case "(($ac_try" in
11350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11351 *) ac_try_echo=$ac_try;;
11352esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011354 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011355 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011356 grep -v '^ *+' conftest.er1 >conftest.err
11357 rm -f conftest.er1
11358 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011360 (exit $ac_status); } && {
11361 test -z "$ac_c_werror_flag" ||
11362 test ! -s conftest.err
11363 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011364 ac_hi=$ac_mid; break
11365else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011366 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011367sed 's/^/| /' conftest.$ac_ext >&5
11368
Martin v. Löwiseba40652007-08-30 20:10:57 +000011369 ac_lo=`expr $ac_mid + 1`
11370 if test $ac_lo -le $ac_mid; then
11371 ac_lo= ac_hi=
11372 break
11373 fi
11374 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011375fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011376
11377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011378 done
11379else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011380 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011381sed 's/^/| /' conftest.$ac_ext >&5
11382
Martin v. Löwiseba40652007-08-30 20:10:57 +000011383 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011384/* confdefs.h. */
11385_ACEOF
11386cat confdefs.h >>conftest.$ac_ext
11387cat >>conftest.$ac_ext <<_ACEOF
11388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011389$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011390 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011391int
11392main ()
11393{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011394static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011395test_array [0] = 0
11396
11397 ;
11398 return 0;
11399}
11400_ACEOF
11401rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011402if { (ac_try="$ac_compile"
11403case "(($ac_try" in
11404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11405 *) ac_try_echo=$ac_try;;
11406esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011408 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011409 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011410 grep -v '^ *+' conftest.er1 >conftest.err
11411 rm -f conftest.er1
11412 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011414 (exit $ac_status); } && {
11415 test -z "$ac_c_werror_flag" ||
11416 test ! -s conftest.err
11417 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011418 ac_hi=-1 ac_mid=-1
11419 while :; do
11420 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011421/* confdefs.h. */
11422_ACEOF
11423cat confdefs.h >>conftest.$ac_ext
11424cat >>conftest.$ac_ext <<_ACEOF
11425/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011426$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011427 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011428int
11429main ()
11430{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011431static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011432test_array [0] = 0
11433
11434 ;
11435 return 0;
11436}
11437_ACEOF
11438rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011439if { (ac_try="$ac_compile"
11440case "(($ac_try" in
11441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11442 *) ac_try_echo=$ac_try;;
11443esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011445 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011446 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011447 grep -v '^ *+' conftest.er1 >conftest.err
11448 rm -f conftest.er1
11449 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011451 (exit $ac_status); } && {
11452 test -z "$ac_c_werror_flag" ||
11453 test ! -s conftest.err
11454 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011455 ac_lo=$ac_mid; break
11456else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011457 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011458sed 's/^/| /' conftest.$ac_ext >&5
11459
Martin v. Löwiseba40652007-08-30 20:10:57 +000011460 ac_hi=`expr '(' $ac_mid ')' - 1`
11461 if test $ac_mid -le $ac_hi; then
11462 ac_lo= ac_hi=
11463 break
11464 fi
11465 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011466fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011467
11468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011469 done
11470else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011472sed 's/^/| /' conftest.$ac_ext >&5
11473
Martin v. Löwiseba40652007-08-30 20:10:57 +000011474 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011475fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011476
11477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011478fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011479
11480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011481# Binary search between lo and hi bounds.
11482while test "x$ac_lo" != "x$ac_hi"; do
11483 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011485/* confdefs.h. */
11486_ACEOF
11487cat confdefs.h >>conftest.$ac_ext
11488cat >>conftest.$ac_ext <<_ACEOF
11489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011490$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011491 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011492int
11493main ()
11494{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011495static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011496test_array [0] = 0
11497
11498 ;
11499 return 0;
11500}
11501_ACEOF
11502rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011503if { (ac_try="$ac_compile"
11504case "(($ac_try" in
11505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11506 *) ac_try_echo=$ac_try;;
11507esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011509 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011511 grep -v '^ *+' conftest.er1 >conftest.err
11512 rm -f conftest.er1
11513 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011515 (exit $ac_status); } && {
11516 test -z "$ac_c_werror_flag" ||
11517 test ! -s conftest.err
11518 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011519 ac_hi=$ac_mid
11520else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011521 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011522sed 's/^/| /' conftest.$ac_ext >&5
11523
Martin v. Löwiseba40652007-08-30 20:10:57 +000011524 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011525fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011526
11527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011528done
11529case $ac_lo in
11530?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011531'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011532 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011533See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011534echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011535See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011536 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011537 else
11538 ac_cv_sizeof_long_long=0
11539 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011540esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011541else
Martin v. Löwis11437992002-04-12 09:54:03 +000011542 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011543/* confdefs.h. */
11544_ACEOF
11545cat confdefs.h >>conftest.$ac_ext
11546cat >>conftest.$ac_ext <<_ACEOF
11547/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011548$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011549 typedef long long ac__type_sizeof_;
11550static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11551static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011552#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011553#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011554int
11555main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011556{
Martin v. Löwis11437992002-04-12 09:54:03 +000011557
11558 FILE *f = fopen ("conftest.val", "w");
11559 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011560 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011561 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011562 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011563 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011564 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011565 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011566 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011567 }
11568 else
11569 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011570 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011571 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011572 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011573 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011574 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011575 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011576
11577 ;
11578 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011579}
Martin v. Löwis11437992002-04-12 09:54:03 +000011580_ACEOF
11581rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011582if { (ac_try="$ac_link"
11583case "(($ac_try" in
11584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11585 *) ac_try_echo=$ac_try;;
11586esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011588 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011589 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011591 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011592 { (case "(($ac_try" in
11593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11594 *) ac_try_echo=$ac_try;;
11595esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011597 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011598 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011600 (exit $ac_status); }; }; then
11601 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011602else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011603 echo "$as_me: program exited with status $ac_status" >&5
11604echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011605sed 's/^/| /' conftest.$ac_ext >&5
11606
Martin v. Löwis11437992002-04-12 09:54:03 +000011607( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011608if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011609 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011610See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011611echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011612See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011613 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011614 else
11615 ac_cv_sizeof_long_long=0
11616 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011618rm -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 +000011619fi
11620rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011621fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011622{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11623echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011624
11625
11626
Martin v. Löwis11437992002-04-12 09:54:03 +000011627cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011628#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011629_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011630
Michael W. Hudson54241132001-12-07 15:38:26 +000011631
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011632fi
11633
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011634{ echo "$as_me:$LINENO: checking for long double support" >&5
11635echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011636have_long_double=no
11637cat >conftest.$ac_ext <<_ACEOF
11638/* confdefs.h. */
11639_ACEOF
11640cat confdefs.h >>conftest.$ac_ext
11641cat >>conftest.$ac_ext <<_ACEOF
11642/* end confdefs.h. */
11643
11644int
11645main ()
11646{
11647long double x; x = (long double)0.;
11648 ;
11649 return 0;
11650}
11651_ACEOF
11652rm -f conftest.$ac_objext
11653if { (ac_try="$ac_compile"
11654case "(($ac_try" in
11655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11656 *) ac_try_echo=$ac_try;;
11657esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011659 (eval "$ac_compile") 2>conftest.er1
11660 ac_status=$?
11661 grep -v '^ *+' conftest.er1 >conftest.err
11662 rm -f conftest.er1
11663 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011665 (exit $ac_status); } && {
11666 test -z "$ac_c_werror_flag" ||
11667 test ! -s conftest.err
11668 } && test -s conftest.$ac_objext; then
11669
11670
11671cat >>confdefs.h <<\_ACEOF
11672#define HAVE_LONG_DOUBLE 1
11673_ACEOF
11674
11675 have_long_double=yes
11676
11677else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011678 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011679sed 's/^/| /' conftest.$ac_ext >&5
11680
11681
11682fi
11683
11684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011685{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11686echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011687if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011688{ echo "$as_me:$LINENO: checking for long double" >&5
11689echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11690if test "${ac_cv_type_long_double+set}" = set; then
11691 echo $ECHO_N "(cached) $ECHO_C" >&6
11692else
11693 cat >conftest.$ac_ext <<_ACEOF
11694/* confdefs.h. */
11695_ACEOF
11696cat confdefs.h >>conftest.$ac_ext
11697cat >>conftest.$ac_ext <<_ACEOF
11698/* end confdefs.h. */
11699$ac_includes_default
11700typedef long double ac__type_new_;
11701int
11702main ()
11703{
11704if ((ac__type_new_ *) 0)
11705 return 0;
11706if (sizeof (ac__type_new_))
11707 return 0;
11708 ;
11709 return 0;
11710}
11711_ACEOF
11712rm -f conftest.$ac_objext
11713if { (ac_try="$ac_compile"
11714case "(($ac_try" in
11715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11716 *) ac_try_echo=$ac_try;;
11717esac
11718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11719 (eval "$ac_compile") 2>conftest.er1
11720 ac_status=$?
11721 grep -v '^ *+' conftest.er1 >conftest.err
11722 rm -f conftest.er1
11723 cat conftest.err >&5
11724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11725 (exit $ac_status); } && {
11726 test -z "$ac_c_werror_flag" ||
11727 test ! -s conftest.err
11728 } && test -s conftest.$ac_objext; then
11729 ac_cv_type_long_double=yes
11730else
11731 echo "$as_me: failed program was:" >&5
11732sed 's/^/| /' conftest.$ac_ext >&5
11733
11734 ac_cv_type_long_double=no
11735fi
11736
11737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11738fi
11739{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11740echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11741
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011742# The cast to long int works around a bug in the HP C Compiler
11743# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11744# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11745# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011746{ echo "$as_me:$LINENO: checking size of long double" >&5
11747echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011748if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011749 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011750else
11751 if test "$cross_compiling" = yes; then
11752 # Depending upon the size, compute the lo and hi bounds.
11753cat >conftest.$ac_ext <<_ACEOF
11754/* confdefs.h. */
11755_ACEOF
11756cat confdefs.h >>conftest.$ac_ext
11757cat >>conftest.$ac_ext <<_ACEOF
11758/* end confdefs.h. */
11759$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011760 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011761int
11762main ()
11763{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011764static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011765test_array [0] = 0
11766
11767 ;
11768 return 0;
11769}
11770_ACEOF
11771rm -f conftest.$ac_objext
11772if { (ac_try="$ac_compile"
11773case "(($ac_try" in
11774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11775 *) ac_try_echo=$ac_try;;
11776esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011778 (eval "$ac_compile") 2>conftest.er1
11779 ac_status=$?
11780 grep -v '^ *+' conftest.er1 >conftest.err
11781 rm -f conftest.er1
11782 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011784 (exit $ac_status); } && {
11785 test -z "$ac_c_werror_flag" ||
11786 test ! -s conftest.err
11787 } && test -s conftest.$ac_objext; then
11788 ac_lo=0 ac_mid=0
11789 while :; do
11790 cat >conftest.$ac_ext <<_ACEOF
11791/* confdefs.h. */
11792_ACEOF
11793cat confdefs.h >>conftest.$ac_ext
11794cat >>conftest.$ac_ext <<_ACEOF
11795/* end confdefs.h. */
11796$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011797 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011798int
11799main ()
11800{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011801static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011802test_array [0] = 0
11803
11804 ;
11805 return 0;
11806}
11807_ACEOF
11808rm -f conftest.$ac_objext
11809if { (ac_try="$ac_compile"
11810case "(($ac_try" in
11811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11812 *) ac_try_echo=$ac_try;;
11813esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011815 (eval "$ac_compile") 2>conftest.er1
11816 ac_status=$?
11817 grep -v '^ *+' conftest.er1 >conftest.err
11818 rm -f conftest.er1
11819 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011821 (exit $ac_status); } && {
11822 test -z "$ac_c_werror_flag" ||
11823 test ! -s conftest.err
11824 } && test -s conftest.$ac_objext; then
11825 ac_hi=$ac_mid; break
11826else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011827 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011828sed 's/^/| /' conftest.$ac_ext >&5
11829
11830 ac_lo=`expr $ac_mid + 1`
11831 if test $ac_lo -le $ac_mid; then
11832 ac_lo= ac_hi=
11833 break
11834 fi
11835 ac_mid=`expr 2 '*' $ac_mid + 1`
11836fi
11837
11838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11839 done
11840else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011841 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011842sed 's/^/| /' conftest.$ac_ext >&5
11843
11844 cat >conftest.$ac_ext <<_ACEOF
11845/* confdefs.h. */
11846_ACEOF
11847cat confdefs.h >>conftest.$ac_ext
11848cat >>conftest.$ac_ext <<_ACEOF
11849/* end confdefs.h. */
11850$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011851 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011852int
11853main ()
11854{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011855static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011856test_array [0] = 0
11857
11858 ;
11859 return 0;
11860}
11861_ACEOF
11862rm -f conftest.$ac_objext
11863if { (ac_try="$ac_compile"
11864case "(($ac_try" in
11865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11866 *) ac_try_echo=$ac_try;;
11867esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011869 (eval "$ac_compile") 2>conftest.er1
11870 ac_status=$?
11871 grep -v '^ *+' conftest.er1 >conftest.err
11872 rm -f conftest.er1
11873 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011875 (exit $ac_status); } && {
11876 test -z "$ac_c_werror_flag" ||
11877 test ! -s conftest.err
11878 } && test -s conftest.$ac_objext; then
11879 ac_hi=-1 ac_mid=-1
11880 while :; do
11881 cat >conftest.$ac_ext <<_ACEOF
11882/* confdefs.h. */
11883_ACEOF
11884cat confdefs.h >>conftest.$ac_ext
11885cat >>conftest.$ac_ext <<_ACEOF
11886/* end confdefs.h. */
11887$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011888 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011889int
11890main ()
11891{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011892static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011893test_array [0] = 0
11894
11895 ;
11896 return 0;
11897}
11898_ACEOF
11899rm -f conftest.$ac_objext
11900if { (ac_try="$ac_compile"
11901case "(($ac_try" in
11902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11903 *) ac_try_echo=$ac_try;;
11904esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011906 (eval "$ac_compile") 2>conftest.er1
11907 ac_status=$?
11908 grep -v '^ *+' conftest.er1 >conftest.err
11909 rm -f conftest.er1
11910 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011912 (exit $ac_status); } && {
11913 test -z "$ac_c_werror_flag" ||
11914 test ! -s conftest.err
11915 } && test -s conftest.$ac_objext; then
11916 ac_lo=$ac_mid; break
11917else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011918 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011919sed 's/^/| /' conftest.$ac_ext >&5
11920
11921 ac_hi=`expr '(' $ac_mid ')' - 1`
11922 if test $ac_mid -le $ac_hi; then
11923 ac_lo= ac_hi=
11924 break
11925 fi
11926 ac_mid=`expr 2 '*' $ac_mid`
11927fi
11928
11929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11930 done
11931else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011932 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011933sed 's/^/| /' conftest.$ac_ext >&5
11934
11935 ac_lo= ac_hi=
11936fi
11937
11938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11939fi
11940
11941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11942# Binary search between lo and hi bounds.
11943while test "x$ac_lo" != "x$ac_hi"; do
11944 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11945 cat >conftest.$ac_ext <<_ACEOF
11946/* confdefs.h. */
11947_ACEOF
11948cat confdefs.h >>conftest.$ac_ext
11949cat >>conftest.$ac_ext <<_ACEOF
11950/* end confdefs.h. */
11951$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011952 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011953int
11954main ()
11955{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011956static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011957test_array [0] = 0
11958
11959 ;
11960 return 0;
11961}
11962_ACEOF
11963rm -f conftest.$ac_objext
11964if { (ac_try="$ac_compile"
11965case "(($ac_try" in
11966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11967 *) ac_try_echo=$ac_try;;
11968esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011970 (eval "$ac_compile") 2>conftest.er1
11971 ac_status=$?
11972 grep -v '^ *+' conftest.er1 >conftest.err
11973 rm -f conftest.er1
11974 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011976 (exit $ac_status); } && {
11977 test -z "$ac_c_werror_flag" ||
11978 test ! -s conftest.err
11979 } && test -s conftest.$ac_objext; then
11980 ac_hi=$ac_mid
11981else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011982 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011983sed 's/^/| /' conftest.$ac_ext >&5
11984
11985 ac_lo=`expr '(' $ac_mid ')' + 1`
11986fi
11987
11988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11989done
11990case $ac_lo in
11991?*) ac_cv_sizeof_long_double=$ac_lo;;
11992'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011993 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011994See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011995echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011996See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011997 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011998 else
11999 ac_cv_sizeof_long_double=0
12000 fi ;;
12001esac
12002else
12003 cat >conftest.$ac_ext <<_ACEOF
12004/* confdefs.h. */
12005_ACEOF
12006cat confdefs.h >>conftest.$ac_ext
12007cat >>conftest.$ac_ext <<_ACEOF
12008/* end confdefs.h. */
12009$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012010 typedef long double ac__type_sizeof_;
12011static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12012static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012013#include <stdio.h>
12014#include <stdlib.h>
12015int
12016main ()
12017{
12018
12019 FILE *f = fopen ("conftest.val", "w");
12020 if (! f)
12021 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012022 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012023 {
12024 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012025 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012026 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012027 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012028 }
12029 else
12030 {
12031 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012032 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012033 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012034 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012035 }
12036 return ferror (f) || fclose (f) != 0;
12037
12038 ;
12039 return 0;
12040}
12041_ACEOF
12042rm -f conftest$ac_exeext
12043if { (ac_try="$ac_link"
12044case "(($ac_try" in
12045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12046 *) ac_try_echo=$ac_try;;
12047esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012049 (eval "$ac_link") 2>&5
12050 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012052 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12053 { (case "(($ac_try" in
12054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12055 *) ac_try_echo=$ac_try;;
12056esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012058 (eval "$ac_try") 2>&5
12059 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012061 (exit $ac_status); }; }; then
12062 ac_cv_sizeof_long_double=`cat conftest.val`
12063else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012064 echo "$as_me: program exited with status $ac_status" >&5
12065echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012066sed 's/^/| /' conftest.$ac_ext >&5
12067
12068( exit $ac_status )
12069if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012070 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012071See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012072echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012073See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012074 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012075 else
12076 ac_cv_sizeof_long_double=0
12077 fi
12078fi
12079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12080fi
12081rm -f conftest.val
12082fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012083{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12084echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012085
12086
12087
12088cat >>confdefs.h <<_ACEOF
12089#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12090_ACEOF
12091
12092
12093fi
12094
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012095{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12096echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012097have_c99_bool=no
12098cat >conftest.$ac_ext <<_ACEOF
12099/* confdefs.h. */
12100_ACEOF
12101cat confdefs.h >>conftest.$ac_ext
12102cat >>conftest.$ac_ext <<_ACEOF
12103/* end confdefs.h. */
12104
12105int
12106main ()
12107{
12108_Bool x; x = (_Bool)0;
12109 ;
12110 return 0;
12111}
12112_ACEOF
12113rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012114if { (ac_try="$ac_compile"
12115case "(($ac_try" in
12116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12117 *) ac_try_echo=$ac_try;;
12118esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012120 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012121 ac_status=$?
12122 grep -v '^ *+' conftest.er1 >conftest.err
12123 rm -f conftest.er1
12124 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012126 (exit $ac_status); } && {
12127 test -z "$ac_c_werror_flag" ||
12128 test ! -s conftest.err
12129 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012130
12131
12132cat >>confdefs.h <<\_ACEOF
12133#define HAVE_C99_BOOL 1
12134_ACEOF
12135
12136 have_c99_bool=yes
12137
12138else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012139 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012140sed 's/^/| /' conftest.$ac_ext >&5
12141
Martin v. Löwiseba40652007-08-30 20:10:57 +000012142
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012144
12145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012146{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12147echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012148if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012149{ echo "$as_me:$LINENO: checking for _Bool" >&5
12150echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12151if test "${ac_cv_type__Bool+set}" = set; then
12152 echo $ECHO_N "(cached) $ECHO_C" >&6
12153else
12154 cat >conftest.$ac_ext <<_ACEOF
12155/* confdefs.h. */
12156_ACEOF
12157cat confdefs.h >>conftest.$ac_ext
12158cat >>conftest.$ac_ext <<_ACEOF
12159/* end confdefs.h. */
12160$ac_includes_default
12161typedef _Bool ac__type_new_;
12162int
12163main ()
12164{
12165if ((ac__type_new_ *) 0)
12166 return 0;
12167if (sizeof (ac__type_new_))
12168 return 0;
12169 ;
12170 return 0;
12171}
12172_ACEOF
12173rm -f conftest.$ac_objext
12174if { (ac_try="$ac_compile"
12175case "(($ac_try" in
12176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12177 *) ac_try_echo=$ac_try;;
12178esac
12179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12180 (eval "$ac_compile") 2>conftest.er1
12181 ac_status=$?
12182 grep -v '^ *+' conftest.er1 >conftest.err
12183 rm -f conftest.er1
12184 cat conftest.err >&5
12185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12186 (exit $ac_status); } && {
12187 test -z "$ac_c_werror_flag" ||
12188 test ! -s conftest.err
12189 } && test -s conftest.$ac_objext; then
12190 ac_cv_type__Bool=yes
12191else
12192 echo "$as_me: failed program was:" >&5
12193sed 's/^/| /' conftest.$ac_ext >&5
12194
12195 ac_cv_type__Bool=no
12196fi
12197
12198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12199fi
12200{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12201echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12202
Martin v. Löwiseba40652007-08-30 20:10:57 +000012203# The cast to long int works around a bug in the HP C Compiler
12204# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12205# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12206# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012207{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12208echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012209if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012210 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012211else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012212 if test "$cross_compiling" = yes; then
12213 # Depending upon the size, compute the lo and hi bounds.
12214cat >conftest.$ac_ext <<_ACEOF
12215/* confdefs.h. */
12216_ACEOF
12217cat confdefs.h >>conftest.$ac_ext
12218cat >>conftest.$ac_ext <<_ACEOF
12219/* end confdefs.h. */
12220$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012221 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012222int
12223main ()
12224{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012225static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012226test_array [0] = 0
12227
12228 ;
12229 return 0;
12230}
12231_ACEOF
12232rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012233if { (ac_try="$ac_compile"
12234case "(($ac_try" in
12235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12236 *) ac_try_echo=$ac_try;;
12237esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012239 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012240 ac_status=$?
12241 grep -v '^ *+' conftest.er1 >conftest.err
12242 rm -f conftest.er1
12243 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012245 (exit $ac_status); } && {
12246 test -z "$ac_c_werror_flag" ||
12247 test ! -s conftest.err
12248 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012249 ac_lo=0 ac_mid=0
12250 while :; do
12251 cat >conftest.$ac_ext <<_ACEOF
12252/* confdefs.h. */
12253_ACEOF
12254cat confdefs.h >>conftest.$ac_ext
12255cat >>conftest.$ac_ext <<_ACEOF
12256/* end confdefs.h. */
12257$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012258 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012259int
12260main ()
12261{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012262static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012263test_array [0] = 0
12264
12265 ;
12266 return 0;
12267}
12268_ACEOF
12269rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012270if { (ac_try="$ac_compile"
12271case "(($ac_try" in
12272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12273 *) ac_try_echo=$ac_try;;
12274esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012276 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012277 ac_status=$?
12278 grep -v '^ *+' conftest.er1 >conftest.err
12279 rm -f conftest.er1
12280 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012282 (exit $ac_status); } && {
12283 test -z "$ac_c_werror_flag" ||
12284 test ! -s conftest.err
12285 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012286 ac_hi=$ac_mid; break
12287else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012288 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012289sed 's/^/| /' conftest.$ac_ext >&5
12290
Martin v. Löwiseba40652007-08-30 20:10:57 +000012291 ac_lo=`expr $ac_mid + 1`
12292 if test $ac_lo -le $ac_mid; then
12293 ac_lo= ac_hi=
12294 break
12295 fi
12296 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012298
12299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012300 done
12301else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012302 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012303sed 's/^/| /' conftest.$ac_ext >&5
12304
Martin v. Löwiseba40652007-08-30 20:10:57 +000012305 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012306/* confdefs.h. */
12307_ACEOF
12308cat confdefs.h >>conftest.$ac_ext
12309cat >>conftest.$ac_ext <<_ACEOF
12310/* end confdefs.h. */
12311$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012312 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012313int
12314main ()
12315{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012316static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012317test_array [0] = 0
12318
12319 ;
12320 return 0;
12321}
12322_ACEOF
12323rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012324if { (ac_try="$ac_compile"
12325case "(($ac_try" in
12326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12327 *) ac_try_echo=$ac_try;;
12328esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012330 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012331 ac_status=$?
12332 grep -v '^ *+' conftest.er1 >conftest.err
12333 rm -f conftest.er1
12334 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012336 (exit $ac_status); } && {
12337 test -z "$ac_c_werror_flag" ||
12338 test ! -s conftest.err
12339 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012340 ac_hi=-1 ac_mid=-1
12341 while :; do
12342 cat >conftest.$ac_ext <<_ACEOF
12343/* confdefs.h. */
12344_ACEOF
12345cat confdefs.h >>conftest.$ac_ext
12346cat >>conftest.$ac_ext <<_ACEOF
12347/* end confdefs.h. */
12348$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012349 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012350int
12351main ()
12352{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012353static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012354test_array [0] = 0
12355
12356 ;
12357 return 0;
12358}
12359_ACEOF
12360rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012361if { (ac_try="$ac_compile"
12362case "(($ac_try" in
12363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12364 *) ac_try_echo=$ac_try;;
12365esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012367 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012368 ac_status=$?
12369 grep -v '^ *+' conftest.er1 >conftest.err
12370 rm -f conftest.er1
12371 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012373 (exit $ac_status); } && {
12374 test -z "$ac_c_werror_flag" ||
12375 test ! -s conftest.err
12376 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012377 ac_lo=$ac_mid; break
12378else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012379 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012380sed 's/^/| /' conftest.$ac_ext >&5
12381
Martin v. Löwiseba40652007-08-30 20:10:57 +000012382 ac_hi=`expr '(' $ac_mid ')' - 1`
12383 if test $ac_mid -le $ac_hi; then
12384 ac_lo= ac_hi=
12385 break
12386 fi
12387 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012388fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012389
12390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012391 done
12392else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012393 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012394sed 's/^/| /' conftest.$ac_ext >&5
12395
Martin v. Löwiseba40652007-08-30 20:10:57 +000012396 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012398
12399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012401
12402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012403# Binary search between lo and hi bounds.
12404while test "x$ac_lo" != "x$ac_hi"; do
12405 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12406 cat >conftest.$ac_ext <<_ACEOF
12407/* confdefs.h. */
12408_ACEOF
12409cat confdefs.h >>conftest.$ac_ext
12410cat >>conftest.$ac_ext <<_ACEOF
12411/* end confdefs.h. */
12412$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012413 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012414int
12415main ()
12416{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012417static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012418test_array [0] = 0
12419
12420 ;
12421 return 0;
12422}
12423_ACEOF
12424rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012425if { (ac_try="$ac_compile"
12426case "(($ac_try" in
12427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12428 *) ac_try_echo=$ac_try;;
12429esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012431 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012432 ac_status=$?
12433 grep -v '^ *+' conftest.er1 >conftest.err
12434 rm -f conftest.er1
12435 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012437 (exit $ac_status); } && {
12438 test -z "$ac_c_werror_flag" ||
12439 test ! -s conftest.err
12440 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012441 ac_hi=$ac_mid
12442else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012443 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012444sed 's/^/| /' conftest.$ac_ext >&5
12445
Martin v. Löwiseba40652007-08-30 20:10:57 +000012446 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012447fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012448
12449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012450done
12451case $ac_lo in
12452?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012453'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012454 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012455See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012456echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012457See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012458 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012459 else
12460 ac_cv_sizeof__Bool=0
12461 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012462esac
12463else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012464 cat >conftest.$ac_ext <<_ACEOF
12465/* confdefs.h. */
12466_ACEOF
12467cat confdefs.h >>conftest.$ac_ext
12468cat >>conftest.$ac_ext <<_ACEOF
12469/* end confdefs.h. */
12470$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012471 typedef _Bool ac__type_sizeof_;
12472static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12473static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012474#include <stdio.h>
12475#include <stdlib.h>
12476int
12477main ()
12478{
12479
12480 FILE *f = fopen ("conftest.val", "w");
12481 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012482 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012483 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012484 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012485 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012486 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012487 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012488 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012489 }
12490 else
12491 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012492 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012493 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012494 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012495 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012496 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012497 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012498
12499 ;
12500 return 0;
12501}
12502_ACEOF
12503rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012504if { (ac_try="$ac_link"
12505case "(($ac_try" in
12506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12507 *) ac_try_echo=$ac_try;;
12508esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012510 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012511 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012513 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012514 { (case "(($ac_try" in
12515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12516 *) ac_try_echo=$ac_try;;
12517esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012519 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012520 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012522 (exit $ac_status); }; }; then
12523 ac_cv_sizeof__Bool=`cat conftest.val`
12524else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012525 echo "$as_me: program exited with status $ac_status" >&5
12526echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012527sed 's/^/| /' conftest.$ac_ext >&5
12528
12529( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012530if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012531 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012532See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012533echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012534See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012535 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012536 else
12537 ac_cv_sizeof__Bool=0
12538 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012539fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012540rm -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 +000012541fi
12542rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012543fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012544{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12545echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012546
12547
12548
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012549cat >>confdefs.h <<_ACEOF
12550#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12551_ACEOF
12552
12553
12554fi
12555
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012556{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12557echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012558if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012559 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012560else
12561 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012562/* confdefs.h. */
12563_ACEOF
12564cat confdefs.h >>conftest.$ac_ext
12565cat >>conftest.$ac_ext <<_ACEOF
12566/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012567#ifdef HAVE_STDINT_H
12568 #include <stdint.h>
12569 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012570
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012571typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012572int
12573main ()
12574{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012575if ((ac__type_new_ *) 0)
12576 return 0;
12577if (sizeof (ac__type_new_))
12578 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012579 ;
12580 return 0;
12581}
12582_ACEOF
12583rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012584if { (ac_try="$ac_compile"
12585case "(($ac_try" in
12586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12587 *) ac_try_echo=$ac_try;;
12588esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012590 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012591 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012592 grep -v '^ *+' conftest.er1 >conftest.err
12593 rm -f conftest.er1
12594 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012596 (exit $ac_status); } && {
12597 test -z "$ac_c_werror_flag" ||
12598 test ! -s conftest.err
12599 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012600 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012601else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012603sed 's/^/| /' conftest.$ac_ext >&5
12604
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012605 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012606fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012607
12608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012609fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012610{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12611echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12612if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012613
12614cat >>confdefs.h <<_ACEOF
12615#define HAVE_UINTPTR_T 1
12616_ACEOF
12617
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012618{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12619echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12620if test "${ac_cv_type_uintptr_t+set}" = set; then
12621 echo $ECHO_N "(cached) $ECHO_C" >&6
12622else
12623 cat >conftest.$ac_ext <<_ACEOF
12624/* confdefs.h. */
12625_ACEOF
12626cat confdefs.h >>conftest.$ac_ext
12627cat >>conftest.$ac_ext <<_ACEOF
12628/* end confdefs.h. */
12629$ac_includes_default
12630typedef uintptr_t ac__type_new_;
12631int
12632main ()
12633{
12634if ((ac__type_new_ *) 0)
12635 return 0;
12636if (sizeof (ac__type_new_))
12637 return 0;
12638 ;
12639 return 0;
12640}
12641_ACEOF
12642rm -f conftest.$ac_objext
12643if { (ac_try="$ac_compile"
12644case "(($ac_try" in
12645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12646 *) ac_try_echo=$ac_try;;
12647esac
12648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12649 (eval "$ac_compile") 2>conftest.er1
12650 ac_status=$?
12651 grep -v '^ *+' conftest.er1 >conftest.err
12652 rm -f conftest.er1
12653 cat conftest.err >&5
12654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12655 (exit $ac_status); } && {
12656 test -z "$ac_c_werror_flag" ||
12657 test ! -s conftest.err
12658 } && test -s conftest.$ac_objext; then
12659 ac_cv_type_uintptr_t=yes
12660else
12661 echo "$as_me: failed program was:" >&5
12662sed 's/^/| /' conftest.$ac_ext >&5
12663
12664 ac_cv_type_uintptr_t=no
12665fi
12666
12667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12668fi
12669{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12670echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12671
Martin v. Löwiseba40652007-08-30 20:10:57 +000012672# The cast to long int works around a bug in the HP C Compiler
12673# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12674# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12675# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012676{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12677echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012678if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012679 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012680else
Martin v. Löwis11437992002-04-12 09:54:03 +000012681 if test "$cross_compiling" = yes; then
12682 # Depending upon the size, compute the lo and hi bounds.
12683cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012684/* confdefs.h. */
12685_ACEOF
12686cat confdefs.h >>conftest.$ac_ext
12687cat >>conftest.$ac_ext <<_ACEOF
12688/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012689$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012690 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012691int
12692main ()
12693{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012694static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012695test_array [0] = 0
12696
12697 ;
12698 return 0;
12699}
12700_ACEOF
12701rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012702if { (ac_try="$ac_compile"
12703case "(($ac_try" in
12704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12705 *) ac_try_echo=$ac_try;;
12706esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012708 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012710 grep -v '^ *+' conftest.er1 >conftest.err
12711 rm -f conftest.er1
12712 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012714 (exit $ac_status); } && {
12715 test -z "$ac_c_werror_flag" ||
12716 test ! -s conftest.err
12717 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012718 ac_lo=0 ac_mid=0
12719 while :; do
12720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012721/* confdefs.h. */
12722_ACEOF
12723cat confdefs.h >>conftest.$ac_ext
12724cat >>conftest.$ac_ext <<_ACEOF
12725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012726$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012727 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012728int
12729main ()
12730{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012731static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012732test_array [0] = 0
12733
12734 ;
12735 return 0;
12736}
12737_ACEOF
12738rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012739if { (ac_try="$ac_compile"
12740case "(($ac_try" in
12741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12742 *) ac_try_echo=$ac_try;;
12743esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012745 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012746 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012747 grep -v '^ *+' conftest.er1 >conftest.err
12748 rm -f conftest.er1
12749 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012751 (exit $ac_status); } && {
12752 test -z "$ac_c_werror_flag" ||
12753 test ! -s conftest.err
12754 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012755 ac_hi=$ac_mid; break
12756else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012758sed 's/^/| /' conftest.$ac_ext >&5
12759
Martin v. Löwiseba40652007-08-30 20:10:57 +000012760 ac_lo=`expr $ac_mid + 1`
12761 if test $ac_lo -le $ac_mid; then
12762 ac_lo= ac_hi=
12763 break
12764 fi
12765 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012766fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012767
12768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012769 done
12770else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012772sed 's/^/| /' conftest.$ac_ext >&5
12773
Martin v. Löwiseba40652007-08-30 20:10:57 +000012774 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012775/* confdefs.h. */
12776_ACEOF
12777cat confdefs.h >>conftest.$ac_ext
12778cat >>conftest.$ac_ext <<_ACEOF
12779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012780$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012781 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012782int
12783main ()
12784{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012785static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012786test_array [0] = 0
12787
12788 ;
12789 return 0;
12790}
12791_ACEOF
12792rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012793if { (ac_try="$ac_compile"
12794case "(($ac_try" in
12795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12796 *) ac_try_echo=$ac_try;;
12797esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012799 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012801 grep -v '^ *+' conftest.er1 >conftest.err
12802 rm -f conftest.er1
12803 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012805 (exit $ac_status); } && {
12806 test -z "$ac_c_werror_flag" ||
12807 test ! -s conftest.err
12808 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012809 ac_hi=-1 ac_mid=-1
12810 while :; do
12811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012812/* confdefs.h. */
12813_ACEOF
12814cat confdefs.h >>conftest.$ac_ext
12815cat >>conftest.$ac_ext <<_ACEOF
12816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012817$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012818 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012819int
12820main ()
12821{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012822static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012823test_array [0] = 0
12824
12825 ;
12826 return 0;
12827}
12828_ACEOF
12829rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012830if { (ac_try="$ac_compile"
12831case "(($ac_try" in
12832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12833 *) ac_try_echo=$ac_try;;
12834esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012836 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012838 grep -v '^ *+' conftest.er1 >conftest.err
12839 rm -f conftest.er1
12840 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012842 (exit $ac_status); } && {
12843 test -z "$ac_c_werror_flag" ||
12844 test ! -s conftest.err
12845 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012846 ac_lo=$ac_mid; break
12847else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012849sed 's/^/| /' conftest.$ac_ext >&5
12850
Martin v. Löwiseba40652007-08-30 20:10:57 +000012851 ac_hi=`expr '(' $ac_mid ')' - 1`
12852 if test $ac_mid -le $ac_hi; then
12853 ac_lo= ac_hi=
12854 break
12855 fi
12856 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012857fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012858
12859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012860 done
12861else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012862 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012863sed 's/^/| /' conftest.$ac_ext >&5
12864
Martin v. Löwiseba40652007-08-30 20:10:57 +000012865 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012867
12868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012870
12871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012872# Binary search between lo and hi bounds.
12873while test "x$ac_lo" != "x$ac_hi"; do
12874 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12875 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012876/* confdefs.h. */
12877_ACEOF
12878cat confdefs.h >>conftest.$ac_ext
12879cat >>conftest.$ac_ext <<_ACEOF
12880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012881$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012882 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012883int
12884main ()
12885{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012886static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012887test_array [0] = 0
12888
12889 ;
12890 return 0;
12891}
12892_ACEOF
12893rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012894if { (ac_try="$ac_compile"
12895case "(($ac_try" in
12896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12897 *) ac_try_echo=$ac_try;;
12898esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012900 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012901 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012902 grep -v '^ *+' conftest.er1 >conftest.err
12903 rm -f conftest.er1
12904 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012906 (exit $ac_status); } && {
12907 test -z "$ac_c_werror_flag" ||
12908 test ! -s conftest.err
12909 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012910 ac_hi=$ac_mid
12911else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012913sed 's/^/| /' conftest.$ac_ext >&5
12914
Martin v. Löwiseba40652007-08-30 20:10:57 +000012915 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012916fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012917
12918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012919done
12920case $ac_lo in
12921?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012922'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012923 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012924See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012925echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012926See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012927 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012928 else
12929 ac_cv_sizeof_uintptr_t=0
12930 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012931esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012932else
Martin v. Löwis11437992002-04-12 09:54:03 +000012933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012934/* confdefs.h. */
12935_ACEOF
12936cat confdefs.h >>conftest.$ac_ext
12937cat >>conftest.$ac_ext <<_ACEOF
12938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012939$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012940 typedef uintptr_t ac__type_sizeof_;
12941static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12942static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012943#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012944#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012945int
12946main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012947{
Martin v. Löwis11437992002-04-12 09:54:03 +000012948
12949 FILE *f = fopen ("conftest.val", "w");
12950 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012951 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012952 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012954 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012955 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012956 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012957 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012958 }
12959 else
12960 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012961 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012962 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012963 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012964 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012965 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012966 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012967
12968 ;
12969 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012970}
Martin v. Löwis11437992002-04-12 09:54:03 +000012971_ACEOF
12972rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012973if { (ac_try="$ac_link"
12974case "(($ac_try" in
12975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12976 *) ac_try_echo=$ac_try;;
12977esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012979 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012980 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012982 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012983 { (case "(($ac_try" in
12984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12985 *) ac_try_echo=$ac_try;;
12986esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012988 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012989 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012991 (exit $ac_status); }; }; then
12992 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012993else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012994 echo "$as_me: program exited with status $ac_status" >&5
12995echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012996sed 's/^/| /' conftest.$ac_ext >&5
12997
Martin v. Löwis11437992002-04-12 09:54:03 +000012998( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012999if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013000 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013001See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013002echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013003See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013004 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013005 else
13006 ac_cv_sizeof_uintptr_t=0
13007 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013009rm -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 +000013010fi
13011rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013012fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013013{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13014echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013015
13016
13017
Martin v. Löwis11437992002-04-12 09:54:03 +000013018cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013019#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013020_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013021
Michael W. Hudson54241132001-12-07 15:38:26 +000013022
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013023fi
13024
Martin v. Löwisebe26702006-10-02 14:55:51 +000013025
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013026{ echo "$as_me:$LINENO: checking for off_t" >&5
13027echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13028if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013029 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013030else
Martin v. Löwis11437992002-04-12 09:54:03 +000013031 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013032/* confdefs.h. */
13033_ACEOF
13034cat confdefs.h >>conftest.$ac_ext
13035cat >>conftest.$ac_ext <<_ACEOF
13036/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013037
13038#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013039#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013040#endif
13041
13042
13043typedef off_t ac__type_new_;
13044int
13045main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013046{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013047if ((ac__type_new_ *) 0)
13048 return 0;
13049if (sizeof (ac__type_new_))
13050 return 0;
13051 ;
13052 return 0;
13053}
13054_ACEOF
13055rm -f conftest.$ac_objext
13056if { (ac_try="$ac_compile"
13057case "(($ac_try" in
13058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13059 *) ac_try_echo=$ac_try;;
13060esac
13061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13062 (eval "$ac_compile") 2>conftest.er1
13063 ac_status=$?
13064 grep -v '^ *+' conftest.er1 >conftest.err
13065 rm -f conftest.er1
13066 cat conftest.err >&5
13067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13068 (exit $ac_status); } && {
13069 test -z "$ac_c_werror_flag" ||
13070 test ! -s conftest.err
13071 } && test -s conftest.$ac_objext; then
13072 ac_cv_type_off_t=yes
13073else
13074 echo "$as_me: failed program was:" >&5
13075sed 's/^/| /' conftest.$ac_ext >&5
13076
13077 ac_cv_type_off_t=no
13078fi
13079
13080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13081fi
13082{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13083echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13084
13085# The cast to long int works around a bug in the HP C Compiler
13086# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13087# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13088# This bug is HP SR number 8606223364.
13089{ echo "$as_me:$LINENO: checking size of off_t" >&5
13090echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13091if test "${ac_cv_sizeof_off_t+set}" = set; then
13092 echo $ECHO_N "(cached) $ECHO_C" >&6
13093else
13094 if test "$cross_compiling" = yes; then
13095 # Depending upon the size, compute the lo and hi bounds.
13096cat >conftest.$ac_ext <<_ACEOF
13097/* confdefs.h. */
13098_ACEOF
13099cat confdefs.h >>conftest.$ac_ext
13100cat >>conftest.$ac_ext <<_ACEOF
13101/* end confdefs.h. */
13102
13103#ifdef HAVE_SYS_TYPES_H
13104#include <sys/types.h>
13105#endif
13106
13107
13108 typedef off_t ac__type_sizeof_;
13109int
13110main ()
13111{
13112static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13113test_array [0] = 0
13114
13115 ;
13116 return 0;
13117}
13118_ACEOF
13119rm -f conftest.$ac_objext
13120if { (ac_try="$ac_compile"
13121case "(($ac_try" in
13122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13123 *) ac_try_echo=$ac_try;;
13124esac
13125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13126 (eval "$ac_compile") 2>conftest.er1
13127 ac_status=$?
13128 grep -v '^ *+' conftest.er1 >conftest.err
13129 rm -f conftest.er1
13130 cat conftest.err >&5
13131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13132 (exit $ac_status); } && {
13133 test -z "$ac_c_werror_flag" ||
13134 test ! -s conftest.err
13135 } && test -s conftest.$ac_objext; then
13136 ac_lo=0 ac_mid=0
13137 while :; do
13138 cat >conftest.$ac_ext <<_ACEOF
13139/* confdefs.h. */
13140_ACEOF
13141cat confdefs.h >>conftest.$ac_ext
13142cat >>conftest.$ac_ext <<_ACEOF
13143/* end confdefs.h. */
13144
13145#ifdef HAVE_SYS_TYPES_H
13146#include <sys/types.h>
13147#endif
13148
13149
13150 typedef off_t ac__type_sizeof_;
13151int
13152main ()
13153{
13154static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13155test_array [0] = 0
13156
13157 ;
13158 return 0;
13159}
13160_ACEOF
13161rm -f conftest.$ac_objext
13162if { (ac_try="$ac_compile"
13163case "(($ac_try" in
13164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13165 *) ac_try_echo=$ac_try;;
13166esac
13167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13168 (eval "$ac_compile") 2>conftest.er1
13169 ac_status=$?
13170 grep -v '^ *+' conftest.er1 >conftest.err
13171 rm -f conftest.er1
13172 cat conftest.err >&5
13173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13174 (exit $ac_status); } && {
13175 test -z "$ac_c_werror_flag" ||
13176 test ! -s conftest.err
13177 } && test -s conftest.$ac_objext; then
13178 ac_hi=$ac_mid; break
13179else
13180 echo "$as_me: failed program was:" >&5
13181sed 's/^/| /' conftest.$ac_ext >&5
13182
13183 ac_lo=`expr $ac_mid + 1`
13184 if test $ac_lo -le $ac_mid; then
13185 ac_lo= ac_hi=
13186 break
13187 fi
13188 ac_mid=`expr 2 '*' $ac_mid + 1`
13189fi
13190
13191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13192 done
13193else
13194 echo "$as_me: failed program was:" >&5
13195sed 's/^/| /' conftest.$ac_ext >&5
13196
13197 cat >conftest.$ac_ext <<_ACEOF
13198/* confdefs.h. */
13199_ACEOF
13200cat confdefs.h >>conftest.$ac_ext
13201cat >>conftest.$ac_ext <<_ACEOF
13202/* end confdefs.h. */
13203
13204#ifdef HAVE_SYS_TYPES_H
13205#include <sys/types.h>
13206#endif
13207
13208
13209 typedef off_t ac__type_sizeof_;
13210int
13211main ()
13212{
13213static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13214test_array [0] = 0
13215
13216 ;
13217 return 0;
13218}
13219_ACEOF
13220rm -f conftest.$ac_objext
13221if { (ac_try="$ac_compile"
13222case "(($ac_try" in
13223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13224 *) ac_try_echo=$ac_try;;
13225esac
13226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13227 (eval "$ac_compile") 2>conftest.er1
13228 ac_status=$?
13229 grep -v '^ *+' conftest.er1 >conftest.err
13230 rm -f conftest.er1
13231 cat conftest.err >&5
13232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13233 (exit $ac_status); } && {
13234 test -z "$ac_c_werror_flag" ||
13235 test ! -s conftest.err
13236 } && test -s conftest.$ac_objext; then
13237 ac_hi=-1 ac_mid=-1
13238 while :; do
13239 cat >conftest.$ac_ext <<_ACEOF
13240/* confdefs.h. */
13241_ACEOF
13242cat confdefs.h >>conftest.$ac_ext
13243cat >>conftest.$ac_ext <<_ACEOF
13244/* end confdefs.h. */
13245
13246#ifdef HAVE_SYS_TYPES_H
13247#include <sys/types.h>
13248#endif
13249
13250
13251 typedef off_t ac__type_sizeof_;
13252int
13253main ()
13254{
13255static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13256test_array [0] = 0
13257
13258 ;
13259 return 0;
13260}
13261_ACEOF
13262rm -f conftest.$ac_objext
13263if { (ac_try="$ac_compile"
13264case "(($ac_try" in
13265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13266 *) ac_try_echo=$ac_try;;
13267esac
13268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13269 (eval "$ac_compile") 2>conftest.er1
13270 ac_status=$?
13271 grep -v '^ *+' conftest.er1 >conftest.err
13272 rm -f conftest.er1
13273 cat conftest.err >&5
13274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13275 (exit $ac_status); } && {
13276 test -z "$ac_c_werror_flag" ||
13277 test ! -s conftest.err
13278 } && test -s conftest.$ac_objext; then
13279 ac_lo=$ac_mid; break
13280else
13281 echo "$as_me: failed program was:" >&5
13282sed 's/^/| /' conftest.$ac_ext >&5
13283
13284 ac_hi=`expr '(' $ac_mid ')' - 1`
13285 if test $ac_mid -le $ac_hi; then
13286 ac_lo= ac_hi=
13287 break
13288 fi
13289 ac_mid=`expr 2 '*' $ac_mid`
13290fi
13291
13292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13293 done
13294else
13295 echo "$as_me: failed program was:" >&5
13296sed 's/^/| /' conftest.$ac_ext >&5
13297
13298 ac_lo= ac_hi=
13299fi
13300
13301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13302fi
13303
13304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13305# Binary search between lo and hi bounds.
13306while test "x$ac_lo" != "x$ac_hi"; do
13307 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13308 cat >conftest.$ac_ext <<_ACEOF
13309/* confdefs.h. */
13310_ACEOF
13311cat confdefs.h >>conftest.$ac_ext
13312cat >>conftest.$ac_ext <<_ACEOF
13313/* end confdefs.h. */
13314
13315#ifdef HAVE_SYS_TYPES_H
13316#include <sys/types.h>
13317#endif
13318
13319
13320 typedef off_t ac__type_sizeof_;
13321int
13322main ()
13323{
13324static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13325test_array [0] = 0
13326
13327 ;
13328 return 0;
13329}
13330_ACEOF
13331rm -f conftest.$ac_objext
13332if { (ac_try="$ac_compile"
13333case "(($ac_try" in
13334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13335 *) ac_try_echo=$ac_try;;
13336esac
13337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13338 (eval "$ac_compile") 2>conftest.er1
13339 ac_status=$?
13340 grep -v '^ *+' conftest.er1 >conftest.err
13341 rm -f conftest.er1
13342 cat conftest.err >&5
13343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13344 (exit $ac_status); } && {
13345 test -z "$ac_c_werror_flag" ||
13346 test ! -s conftest.err
13347 } && test -s conftest.$ac_objext; then
13348 ac_hi=$ac_mid
13349else
13350 echo "$as_me: failed program was:" >&5
13351sed 's/^/| /' conftest.$ac_ext >&5
13352
13353 ac_lo=`expr '(' $ac_mid ')' + 1`
13354fi
13355
13356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13357done
13358case $ac_lo in
13359?*) ac_cv_sizeof_off_t=$ac_lo;;
13360'') if test "$ac_cv_type_off_t" = yes; then
13361 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13362See \`config.log' for more details." >&5
13363echo "$as_me: error: cannot compute sizeof (off_t)
13364See \`config.log' for more details." >&2;}
13365 { (exit 77); exit 77; }; }
13366 else
13367 ac_cv_sizeof_off_t=0
13368 fi ;;
13369esac
13370else
13371 cat >conftest.$ac_ext <<_ACEOF
13372/* confdefs.h. */
13373_ACEOF
13374cat confdefs.h >>conftest.$ac_ext
13375cat >>conftest.$ac_ext <<_ACEOF
13376/* end confdefs.h. */
13377
13378#ifdef HAVE_SYS_TYPES_H
13379#include <sys/types.h>
13380#endif
13381
13382
13383 typedef off_t ac__type_sizeof_;
13384static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13385static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13386#include <stdio.h>
13387#include <stdlib.h>
13388int
13389main ()
13390{
13391
13392 FILE *f = fopen ("conftest.val", "w");
13393 if (! f)
13394 return 1;
13395 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13396 {
13397 long int i = longval ();
13398 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13399 return 1;
13400 fprintf (f, "%ld\n", i);
13401 }
13402 else
13403 {
13404 unsigned long int i = ulongval ();
13405 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13406 return 1;
13407 fprintf (f, "%lu\n", i);
13408 }
13409 return ferror (f) || fclose (f) != 0;
13410
13411 ;
13412 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013413}
Martin v. Löwis11437992002-04-12 09:54:03 +000013414_ACEOF
13415rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013416if { (ac_try="$ac_link"
13417case "(($ac_try" in
13418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13419 *) ac_try_echo=$ac_try;;
13420esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013422 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013423 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013425 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013426 { (case "(($ac_try" in
13427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13428 *) ac_try_echo=$ac_try;;
13429esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013431 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013432 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013434 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013435 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013436else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013437 echo "$as_me: program exited with status $ac_status" >&5
13438echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013439sed 's/^/| /' conftest.$ac_ext >&5
13440
Martin v. Löwis11437992002-04-12 09:54:03 +000013441( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013442if test "$ac_cv_type_off_t" = yes; then
13443 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13444See \`config.log' for more details." >&5
13445echo "$as_me: error: cannot compute sizeof (off_t)
13446See \`config.log' for more details." >&2;}
13447 { (exit 77); exit 77; }; }
13448 else
13449 ac_cv_sizeof_off_t=0
13450 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013452rm -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 +000013453fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013454rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013455fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013456{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13457echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013458
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013459
13460
Martin v. Löwis11437992002-04-12 09:54:03 +000013461cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013462#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013463_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013464
Michael W. Hudson54241132001-12-07 15:38:26 +000013465
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013466
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013467{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13468echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013469if test "$have_long_long" = yes -a \
13470 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13471 "$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
13483
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013484{ echo "$as_me:$LINENO: checking for time_t" >&5
13485echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13486if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013487 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013488else
Martin v. Löwis11437992002-04-12 09:54:03 +000013489 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013490/* confdefs.h. */
13491_ACEOF
13492cat confdefs.h >>conftest.$ac_ext
13493cat >>conftest.$ac_ext <<_ACEOF
13494/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013495
13496#ifdef HAVE_SYS_TYPES_H
13497#include <sys/types.h>
13498#endif
13499#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013500#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013501#endif
13502
13503
13504typedef time_t ac__type_new_;
13505int
13506main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013507{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013508if ((ac__type_new_ *) 0)
13509 return 0;
13510if (sizeof (ac__type_new_))
13511 return 0;
13512 ;
13513 return 0;
13514}
13515_ACEOF
13516rm -f conftest.$ac_objext
13517if { (ac_try="$ac_compile"
13518case "(($ac_try" in
13519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13520 *) ac_try_echo=$ac_try;;
13521esac
13522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13523 (eval "$ac_compile") 2>conftest.er1
13524 ac_status=$?
13525 grep -v '^ *+' conftest.er1 >conftest.err
13526 rm -f conftest.er1
13527 cat conftest.err >&5
13528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13529 (exit $ac_status); } && {
13530 test -z "$ac_c_werror_flag" ||
13531 test ! -s conftest.err
13532 } && test -s conftest.$ac_objext; then
13533 ac_cv_type_time_t=yes
13534else
13535 echo "$as_me: failed program was:" >&5
13536sed 's/^/| /' conftest.$ac_ext >&5
13537
13538 ac_cv_type_time_t=no
13539fi
13540
13541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13542fi
13543{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13544echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13545
13546# The cast to long int works around a bug in the HP C Compiler
13547# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13548# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13549# This bug is HP SR number 8606223364.
13550{ echo "$as_me:$LINENO: checking size of time_t" >&5
13551echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13552if test "${ac_cv_sizeof_time_t+set}" = set; then
13553 echo $ECHO_N "(cached) $ECHO_C" >&6
13554else
13555 if test "$cross_compiling" = yes; then
13556 # Depending upon the size, compute the lo and hi bounds.
13557cat >conftest.$ac_ext <<_ACEOF
13558/* confdefs.h. */
13559_ACEOF
13560cat confdefs.h >>conftest.$ac_ext
13561cat >>conftest.$ac_ext <<_ACEOF
13562/* end confdefs.h. */
13563
13564#ifdef HAVE_SYS_TYPES_H
13565#include <sys/types.h>
13566#endif
13567#ifdef HAVE_TIME_H
13568#include <time.h>
13569#endif
13570
13571
13572 typedef time_t ac__type_sizeof_;
13573int
13574main ()
13575{
13576static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13577test_array [0] = 0
13578
13579 ;
13580 return 0;
13581}
13582_ACEOF
13583rm -f conftest.$ac_objext
13584if { (ac_try="$ac_compile"
13585case "(($ac_try" in
13586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13587 *) ac_try_echo=$ac_try;;
13588esac
13589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13590 (eval "$ac_compile") 2>conftest.er1
13591 ac_status=$?
13592 grep -v '^ *+' conftest.er1 >conftest.err
13593 rm -f conftest.er1
13594 cat conftest.err >&5
13595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13596 (exit $ac_status); } && {
13597 test -z "$ac_c_werror_flag" ||
13598 test ! -s conftest.err
13599 } && test -s conftest.$ac_objext; then
13600 ac_lo=0 ac_mid=0
13601 while :; do
13602 cat >conftest.$ac_ext <<_ACEOF
13603/* confdefs.h. */
13604_ACEOF
13605cat confdefs.h >>conftest.$ac_ext
13606cat >>conftest.$ac_ext <<_ACEOF
13607/* end confdefs.h. */
13608
13609#ifdef HAVE_SYS_TYPES_H
13610#include <sys/types.h>
13611#endif
13612#ifdef HAVE_TIME_H
13613#include <time.h>
13614#endif
13615
13616
13617 typedef time_t ac__type_sizeof_;
13618int
13619main ()
13620{
13621static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13622test_array [0] = 0
13623
13624 ;
13625 return 0;
13626}
13627_ACEOF
13628rm -f conftest.$ac_objext
13629if { (ac_try="$ac_compile"
13630case "(($ac_try" in
13631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13632 *) ac_try_echo=$ac_try;;
13633esac
13634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13635 (eval "$ac_compile") 2>conftest.er1
13636 ac_status=$?
13637 grep -v '^ *+' conftest.er1 >conftest.err
13638 rm -f conftest.er1
13639 cat conftest.err >&5
13640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13641 (exit $ac_status); } && {
13642 test -z "$ac_c_werror_flag" ||
13643 test ! -s conftest.err
13644 } && test -s conftest.$ac_objext; then
13645 ac_hi=$ac_mid; break
13646else
13647 echo "$as_me: failed program was:" >&5
13648sed 's/^/| /' conftest.$ac_ext >&5
13649
13650 ac_lo=`expr $ac_mid + 1`
13651 if test $ac_lo -le $ac_mid; then
13652 ac_lo= ac_hi=
13653 break
13654 fi
13655 ac_mid=`expr 2 '*' $ac_mid + 1`
13656fi
13657
13658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13659 done
13660else
13661 echo "$as_me: failed program was:" >&5
13662sed 's/^/| /' conftest.$ac_ext >&5
13663
13664 cat >conftest.$ac_ext <<_ACEOF
13665/* confdefs.h. */
13666_ACEOF
13667cat confdefs.h >>conftest.$ac_ext
13668cat >>conftest.$ac_ext <<_ACEOF
13669/* end confdefs.h. */
13670
13671#ifdef HAVE_SYS_TYPES_H
13672#include <sys/types.h>
13673#endif
13674#ifdef HAVE_TIME_H
13675#include <time.h>
13676#endif
13677
13678
13679 typedef time_t ac__type_sizeof_;
13680int
13681main ()
13682{
13683static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13684test_array [0] = 0
13685
13686 ;
13687 return 0;
13688}
13689_ACEOF
13690rm -f conftest.$ac_objext
13691if { (ac_try="$ac_compile"
13692case "(($ac_try" in
13693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13694 *) ac_try_echo=$ac_try;;
13695esac
13696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13697 (eval "$ac_compile") 2>conftest.er1
13698 ac_status=$?
13699 grep -v '^ *+' conftest.er1 >conftest.err
13700 rm -f conftest.er1
13701 cat conftest.err >&5
13702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13703 (exit $ac_status); } && {
13704 test -z "$ac_c_werror_flag" ||
13705 test ! -s conftest.err
13706 } && test -s conftest.$ac_objext; then
13707 ac_hi=-1 ac_mid=-1
13708 while :; do
13709 cat >conftest.$ac_ext <<_ACEOF
13710/* confdefs.h. */
13711_ACEOF
13712cat confdefs.h >>conftest.$ac_ext
13713cat >>conftest.$ac_ext <<_ACEOF
13714/* end confdefs.h. */
13715
13716#ifdef HAVE_SYS_TYPES_H
13717#include <sys/types.h>
13718#endif
13719#ifdef HAVE_TIME_H
13720#include <time.h>
13721#endif
13722
13723
13724 typedef time_t ac__type_sizeof_;
13725int
13726main ()
13727{
13728static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13729test_array [0] = 0
13730
13731 ;
13732 return 0;
13733}
13734_ACEOF
13735rm -f conftest.$ac_objext
13736if { (ac_try="$ac_compile"
13737case "(($ac_try" in
13738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13739 *) ac_try_echo=$ac_try;;
13740esac
13741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13742 (eval "$ac_compile") 2>conftest.er1
13743 ac_status=$?
13744 grep -v '^ *+' conftest.er1 >conftest.err
13745 rm -f conftest.er1
13746 cat conftest.err >&5
13747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13748 (exit $ac_status); } && {
13749 test -z "$ac_c_werror_flag" ||
13750 test ! -s conftest.err
13751 } && test -s conftest.$ac_objext; then
13752 ac_lo=$ac_mid; break
13753else
13754 echo "$as_me: failed program was:" >&5
13755sed 's/^/| /' conftest.$ac_ext >&5
13756
13757 ac_hi=`expr '(' $ac_mid ')' - 1`
13758 if test $ac_mid -le $ac_hi; then
13759 ac_lo= ac_hi=
13760 break
13761 fi
13762 ac_mid=`expr 2 '*' $ac_mid`
13763fi
13764
13765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13766 done
13767else
13768 echo "$as_me: failed program was:" >&5
13769sed 's/^/| /' conftest.$ac_ext >&5
13770
13771 ac_lo= ac_hi=
13772fi
13773
13774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13775fi
13776
13777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13778# Binary search between lo and hi bounds.
13779while test "x$ac_lo" != "x$ac_hi"; do
13780 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13781 cat >conftest.$ac_ext <<_ACEOF
13782/* confdefs.h. */
13783_ACEOF
13784cat confdefs.h >>conftest.$ac_ext
13785cat >>conftest.$ac_ext <<_ACEOF
13786/* end confdefs.h. */
13787
13788#ifdef HAVE_SYS_TYPES_H
13789#include <sys/types.h>
13790#endif
13791#ifdef HAVE_TIME_H
13792#include <time.h>
13793#endif
13794
13795
13796 typedef time_t ac__type_sizeof_;
13797int
13798main ()
13799{
13800static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13801test_array [0] = 0
13802
13803 ;
13804 return 0;
13805}
13806_ACEOF
13807rm -f conftest.$ac_objext
13808if { (ac_try="$ac_compile"
13809case "(($ac_try" in
13810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13811 *) ac_try_echo=$ac_try;;
13812esac
13813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13814 (eval "$ac_compile") 2>conftest.er1
13815 ac_status=$?
13816 grep -v '^ *+' conftest.er1 >conftest.err
13817 rm -f conftest.er1
13818 cat conftest.err >&5
13819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13820 (exit $ac_status); } && {
13821 test -z "$ac_c_werror_flag" ||
13822 test ! -s conftest.err
13823 } && test -s conftest.$ac_objext; then
13824 ac_hi=$ac_mid
13825else
13826 echo "$as_me: failed program was:" >&5
13827sed 's/^/| /' conftest.$ac_ext >&5
13828
13829 ac_lo=`expr '(' $ac_mid ')' + 1`
13830fi
13831
13832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13833done
13834case $ac_lo in
13835?*) ac_cv_sizeof_time_t=$ac_lo;;
13836'') if test "$ac_cv_type_time_t" = yes; then
13837 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13838See \`config.log' for more details." >&5
13839echo "$as_me: error: cannot compute sizeof (time_t)
13840See \`config.log' for more details." >&2;}
13841 { (exit 77); exit 77; }; }
13842 else
13843 ac_cv_sizeof_time_t=0
13844 fi ;;
13845esac
13846else
13847 cat >conftest.$ac_ext <<_ACEOF
13848/* confdefs.h. */
13849_ACEOF
13850cat confdefs.h >>conftest.$ac_ext
13851cat >>conftest.$ac_ext <<_ACEOF
13852/* end confdefs.h. */
13853
13854#ifdef HAVE_SYS_TYPES_H
13855#include <sys/types.h>
13856#endif
13857#ifdef HAVE_TIME_H
13858#include <time.h>
13859#endif
13860
13861
13862 typedef time_t ac__type_sizeof_;
13863static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13864static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13865#include <stdio.h>
13866#include <stdlib.h>
13867int
13868main ()
13869{
13870
13871 FILE *f = fopen ("conftest.val", "w");
13872 if (! f)
13873 return 1;
13874 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13875 {
13876 long int i = longval ();
13877 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13878 return 1;
13879 fprintf (f, "%ld\n", i);
13880 }
13881 else
13882 {
13883 unsigned long int i = ulongval ();
13884 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13885 return 1;
13886 fprintf (f, "%lu\n", i);
13887 }
13888 return ferror (f) || fclose (f) != 0;
13889
13890 ;
13891 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013892}
Martin v. Löwis11437992002-04-12 09:54:03 +000013893_ACEOF
13894rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013895if { (ac_try="$ac_link"
13896case "(($ac_try" in
13897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13898 *) ac_try_echo=$ac_try;;
13899esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013901 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013902 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013904 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013905 { (case "(($ac_try" in
13906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13907 *) ac_try_echo=$ac_try;;
13908esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013910 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013911 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013913 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013914 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013915else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013916 echo "$as_me: program exited with status $ac_status" >&5
13917echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013918sed 's/^/| /' conftest.$ac_ext >&5
13919
Martin v. Löwis11437992002-04-12 09:54:03 +000013920( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013921if test "$ac_cv_type_time_t" = yes; then
13922 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13923See \`config.log' for more details." >&5
13924echo "$as_me: error: cannot compute sizeof (time_t)
13925See \`config.log' for more details." >&2;}
13926 { (exit 77); exit 77; }; }
13927 else
13928 ac_cv_sizeof_time_t=0
13929 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013931rm -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 +000013932fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013933rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013934fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013935{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13936echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013937
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013938
13939
Martin v. Löwis11437992002-04-12 09:54:03 +000013940cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013941#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013942_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013943
Michael W. Hudson54241132001-12-07 15:38:26 +000013944
13945
Trent Mick635f6fb2000-08-23 21:33:05 +000013946# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013947ac_save_cc="$CC"
13948if test "$ac_cv_kpthread" = "yes"
13949then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013950elif test "$ac_cv_kthread" = "yes"
13951then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013952elif test "$ac_cv_pthread" = "yes"
13953then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013954fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013955{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13956echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013957have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013958cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013959/* confdefs.h. */
13960_ACEOF
13961cat confdefs.h >>conftest.$ac_ext
13962cat >>conftest.$ac_ext <<_ACEOF
13963/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013964#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013965int
13966main ()
13967{
Guido van Rossum12580492000-09-24 16:47:19 +000013968pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013969 ;
13970 return 0;
13971}
13972_ACEOF
13973rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013974if { (ac_try="$ac_compile"
13975case "(($ac_try" in
13976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13977 *) ac_try_echo=$ac_try;;
13978esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013982 grep -v '^ *+' conftest.er1 >conftest.err
13983 rm -f conftest.er1
13984 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013986 (exit $ac_status); } && {
13987 test -z "$ac_c_werror_flag" ||
13988 test ! -s conftest.err
13989 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013990 have_pthread_t=yes
13991else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013993sed 's/^/| /' conftest.$ac_ext >&5
13994
Martin v. Löwiseba40652007-08-30 20:10:57 +000013995
Trent Mick635f6fb2000-08-23 21:33:05 +000013996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013997
13998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013999{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14000echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014001if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014002 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14003echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14004if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014005 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014006else
Martin v. Löwis11437992002-04-12 09:54:03 +000014007 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014008/* confdefs.h. */
14009_ACEOF
14010cat confdefs.h >>conftest.$ac_ext
14011cat >>conftest.$ac_ext <<_ACEOF
14012/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014013
14014#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014015#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014016#endif
14017
14018
14019typedef pthread_t ac__type_new_;
14020int
14021main ()
14022{
14023if ((ac__type_new_ *) 0)
14024 return 0;
14025if (sizeof (ac__type_new_))
14026 return 0;
14027 ;
14028 return 0;
14029}
14030_ACEOF
14031rm -f conftest.$ac_objext
14032if { (ac_try="$ac_compile"
14033case "(($ac_try" in
14034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14035 *) ac_try_echo=$ac_try;;
14036esac
14037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14038 (eval "$ac_compile") 2>conftest.er1
14039 ac_status=$?
14040 grep -v '^ *+' conftest.er1 >conftest.err
14041 rm -f conftest.er1
14042 cat conftest.err >&5
14043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14044 (exit $ac_status); } && {
14045 test -z "$ac_c_werror_flag" ||
14046 test ! -s conftest.err
14047 } && test -s conftest.$ac_objext; then
14048 ac_cv_type_pthread_t=yes
14049else
14050 echo "$as_me: failed program was:" >&5
14051sed 's/^/| /' conftest.$ac_ext >&5
14052
14053 ac_cv_type_pthread_t=no
14054fi
14055
14056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14057fi
14058{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14059echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14060
14061# The cast to long int works around a bug in the HP C Compiler
14062# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14063# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14064# This bug is HP SR number 8606223364.
14065{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14066echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14067if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14068 echo $ECHO_N "(cached) $ECHO_C" >&6
14069else
14070 if test "$cross_compiling" = yes; then
14071 # Depending upon the size, compute the lo and hi bounds.
14072cat >conftest.$ac_ext <<_ACEOF
14073/* confdefs.h. */
14074_ACEOF
14075cat confdefs.h >>conftest.$ac_ext
14076cat >>conftest.$ac_ext <<_ACEOF
14077/* end confdefs.h. */
14078
14079#ifdef HAVE_PTHREAD_H
14080#include <pthread.h>
14081#endif
14082
14083
14084 typedef pthread_t ac__type_sizeof_;
14085int
14086main ()
14087{
14088static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14089test_array [0] = 0
14090
14091 ;
14092 return 0;
14093}
14094_ACEOF
14095rm -f conftest.$ac_objext
14096if { (ac_try="$ac_compile"
14097case "(($ac_try" in
14098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14099 *) ac_try_echo=$ac_try;;
14100esac
14101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14102 (eval "$ac_compile") 2>conftest.er1
14103 ac_status=$?
14104 grep -v '^ *+' conftest.er1 >conftest.err
14105 rm -f conftest.er1
14106 cat conftest.err >&5
14107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14108 (exit $ac_status); } && {
14109 test -z "$ac_c_werror_flag" ||
14110 test ! -s conftest.err
14111 } && test -s conftest.$ac_objext; then
14112 ac_lo=0 ac_mid=0
14113 while :; do
14114 cat >conftest.$ac_ext <<_ACEOF
14115/* confdefs.h. */
14116_ACEOF
14117cat confdefs.h >>conftest.$ac_ext
14118cat >>conftest.$ac_ext <<_ACEOF
14119/* end confdefs.h. */
14120
14121#ifdef HAVE_PTHREAD_H
14122#include <pthread.h>
14123#endif
14124
14125
14126 typedef pthread_t ac__type_sizeof_;
14127int
14128main ()
14129{
14130static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14131test_array [0] = 0
14132
14133 ;
14134 return 0;
14135}
14136_ACEOF
14137rm -f conftest.$ac_objext
14138if { (ac_try="$ac_compile"
14139case "(($ac_try" in
14140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14141 *) ac_try_echo=$ac_try;;
14142esac
14143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14144 (eval "$ac_compile") 2>conftest.er1
14145 ac_status=$?
14146 grep -v '^ *+' conftest.er1 >conftest.err
14147 rm -f conftest.er1
14148 cat conftest.err >&5
14149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14150 (exit $ac_status); } && {
14151 test -z "$ac_c_werror_flag" ||
14152 test ! -s conftest.err
14153 } && test -s conftest.$ac_objext; then
14154 ac_hi=$ac_mid; break
14155else
14156 echo "$as_me: failed program was:" >&5
14157sed 's/^/| /' conftest.$ac_ext >&5
14158
14159 ac_lo=`expr $ac_mid + 1`
14160 if test $ac_lo -le $ac_mid; then
14161 ac_lo= ac_hi=
14162 break
14163 fi
14164 ac_mid=`expr 2 '*' $ac_mid + 1`
14165fi
14166
14167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14168 done
14169else
14170 echo "$as_me: failed program was:" >&5
14171sed 's/^/| /' conftest.$ac_ext >&5
14172
14173 cat >conftest.$ac_ext <<_ACEOF
14174/* confdefs.h. */
14175_ACEOF
14176cat confdefs.h >>conftest.$ac_ext
14177cat >>conftest.$ac_ext <<_ACEOF
14178/* end confdefs.h. */
14179
14180#ifdef HAVE_PTHREAD_H
14181#include <pthread.h>
14182#endif
14183
14184
14185 typedef pthread_t ac__type_sizeof_;
14186int
14187main ()
14188{
14189static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14190test_array [0] = 0
14191
14192 ;
14193 return 0;
14194}
14195_ACEOF
14196rm -f conftest.$ac_objext
14197if { (ac_try="$ac_compile"
14198case "(($ac_try" in
14199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14200 *) ac_try_echo=$ac_try;;
14201esac
14202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14203 (eval "$ac_compile") 2>conftest.er1
14204 ac_status=$?
14205 grep -v '^ *+' conftest.er1 >conftest.err
14206 rm -f conftest.er1
14207 cat conftest.err >&5
14208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14209 (exit $ac_status); } && {
14210 test -z "$ac_c_werror_flag" ||
14211 test ! -s conftest.err
14212 } && test -s conftest.$ac_objext; then
14213 ac_hi=-1 ac_mid=-1
14214 while :; do
14215 cat >conftest.$ac_ext <<_ACEOF
14216/* confdefs.h. */
14217_ACEOF
14218cat confdefs.h >>conftest.$ac_ext
14219cat >>conftest.$ac_ext <<_ACEOF
14220/* end confdefs.h. */
14221
14222#ifdef HAVE_PTHREAD_H
14223#include <pthread.h>
14224#endif
14225
14226
14227 typedef pthread_t ac__type_sizeof_;
14228int
14229main ()
14230{
14231static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14232test_array [0] = 0
14233
14234 ;
14235 return 0;
14236}
14237_ACEOF
14238rm -f conftest.$ac_objext
14239if { (ac_try="$ac_compile"
14240case "(($ac_try" in
14241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14242 *) ac_try_echo=$ac_try;;
14243esac
14244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14245 (eval "$ac_compile") 2>conftest.er1
14246 ac_status=$?
14247 grep -v '^ *+' conftest.er1 >conftest.err
14248 rm -f conftest.er1
14249 cat conftest.err >&5
14250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14251 (exit $ac_status); } && {
14252 test -z "$ac_c_werror_flag" ||
14253 test ! -s conftest.err
14254 } && test -s conftest.$ac_objext; then
14255 ac_lo=$ac_mid; break
14256else
14257 echo "$as_me: failed program was:" >&5
14258sed 's/^/| /' conftest.$ac_ext >&5
14259
14260 ac_hi=`expr '(' $ac_mid ')' - 1`
14261 if test $ac_mid -le $ac_hi; then
14262 ac_lo= ac_hi=
14263 break
14264 fi
14265 ac_mid=`expr 2 '*' $ac_mid`
14266fi
14267
14268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14269 done
14270else
14271 echo "$as_me: failed program was:" >&5
14272sed 's/^/| /' conftest.$ac_ext >&5
14273
14274 ac_lo= ac_hi=
14275fi
14276
14277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14278fi
14279
14280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14281# Binary search between lo and hi bounds.
14282while test "x$ac_lo" != "x$ac_hi"; do
14283 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14284 cat >conftest.$ac_ext <<_ACEOF
14285/* confdefs.h. */
14286_ACEOF
14287cat confdefs.h >>conftest.$ac_ext
14288cat >>conftest.$ac_ext <<_ACEOF
14289/* end confdefs.h. */
14290
14291#ifdef HAVE_PTHREAD_H
14292#include <pthread.h>
14293#endif
14294
14295
14296 typedef pthread_t ac__type_sizeof_;
14297int
14298main ()
14299{
14300static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14301test_array [0] = 0
14302
14303 ;
14304 return 0;
14305}
14306_ACEOF
14307rm -f conftest.$ac_objext
14308if { (ac_try="$ac_compile"
14309case "(($ac_try" in
14310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14311 *) ac_try_echo=$ac_try;;
14312esac
14313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14314 (eval "$ac_compile") 2>conftest.er1
14315 ac_status=$?
14316 grep -v '^ *+' conftest.er1 >conftest.err
14317 rm -f conftest.er1
14318 cat conftest.err >&5
14319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14320 (exit $ac_status); } && {
14321 test -z "$ac_c_werror_flag" ||
14322 test ! -s conftest.err
14323 } && test -s conftest.$ac_objext; then
14324 ac_hi=$ac_mid
14325else
14326 echo "$as_me: failed program was:" >&5
14327sed 's/^/| /' conftest.$ac_ext >&5
14328
14329 ac_lo=`expr '(' $ac_mid ')' + 1`
14330fi
14331
14332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14333done
14334case $ac_lo in
14335?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14336'') if test "$ac_cv_type_pthread_t" = yes; then
14337 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14338See \`config.log' for more details." >&5
14339echo "$as_me: error: cannot compute sizeof (pthread_t)
14340See \`config.log' for more details." >&2;}
14341 { (exit 77); exit 77; }; }
14342 else
14343 ac_cv_sizeof_pthread_t=0
14344 fi ;;
14345esac
14346else
14347 cat >conftest.$ac_ext <<_ACEOF
14348/* confdefs.h. */
14349_ACEOF
14350cat confdefs.h >>conftest.$ac_ext
14351cat >>conftest.$ac_ext <<_ACEOF
14352/* end confdefs.h. */
14353
14354#ifdef HAVE_PTHREAD_H
14355#include <pthread.h>
14356#endif
14357
14358
14359 typedef pthread_t ac__type_sizeof_;
14360static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14361static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14362#include <stdio.h>
14363#include <stdlib.h>
14364int
14365main ()
14366{
14367
14368 FILE *f = fopen ("conftest.val", "w");
14369 if (! f)
14370 return 1;
14371 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14372 {
14373 long int i = longval ();
14374 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14375 return 1;
14376 fprintf (f, "%ld\n", i);
14377 }
14378 else
14379 {
14380 unsigned long int i = ulongval ();
14381 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14382 return 1;
14383 fprintf (f, "%lu\n", i);
14384 }
14385 return ferror (f) || fclose (f) != 0;
14386
14387 ;
14388 return 0;
14389}
Martin v. Löwis11437992002-04-12 09:54:03 +000014390_ACEOF
14391rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014392if { (ac_try="$ac_link"
14393case "(($ac_try" in
14394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14395 *) ac_try_echo=$ac_try;;
14396esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014398 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014399 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014401 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014402 { (case "(($ac_try" in
14403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14404 *) ac_try_echo=$ac_try;;
14405esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014407 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014408 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014410 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014411 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014412else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014413 echo "$as_me: program exited with status $ac_status" >&5
14414echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014415sed 's/^/| /' conftest.$ac_ext >&5
14416
Martin v. Löwis11437992002-04-12 09:54:03 +000014417( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014418if test "$ac_cv_type_pthread_t" = yes; then
14419 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14420See \`config.log' for more details." >&5
14421echo "$as_me: error: cannot compute sizeof (pthread_t)
14422See \`config.log' for more details." >&2;}
14423 { (exit 77); exit 77; }; }
14424 else
14425 ac_cv_sizeof_pthread_t=0
14426 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014427fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014428rm -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 +000014429fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014430rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014431fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014432{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014433echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014434
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014435
14436
Martin v. Löwis11437992002-04-12 09:54:03 +000014437cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014438#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014439_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014440
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014441
Trent Mick635f6fb2000-08-23 21:33:05 +000014442fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014443CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014444
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014445{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14446echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014447# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014448if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014449 enableval=$enable_toolbox_glue;
14450fi
Jack Jansene578a632001-08-15 01:27:14 +000014451
14452
14453if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014454then
Jack Jansene578a632001-08-15 01:27:14 +000014455 case $ac_sys_system/$ac_sys_release in
14456 Darwin/*)
14457 enable_toolbox_glue="yes";;
14458 *)
14459 enable_toolbox_glue="no";;
14460 esac
14461fi
14462case "$enable_toolbox_glue" in
14463yes)
Jack Jansene578a632001-08-15 01:27:14 +000014464 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014465 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014466
14467cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014468#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014469_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014470
14471 ;;
14472*)
Jack Jansene578a632001-08-15 01:27:14 +000014473 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014474 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014475 ;;
14476esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014477{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14478echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014479
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014480
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014481
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014482case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014483 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014484 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14485 ;;
14486 Darwin/*)
14487 OTHER_LIBTOOL_OPT=""
14488 ;;
14489esac
14490
14491
Ronald Oussoren25967582009-09-06 10:00:26 +000014492ARCH_RUN_32BIT=""
14493
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014494case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014495 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014496 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14497 if test "${enable_universalsdk}"; then
14498 :
14499 else
Ronald Oussoren25967582009-09-06 10:00:26 +000014500 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014501 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014502 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014503 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014504 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014505 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14506 if test ${gcc_version} '<' 4.0
14507 then
14508 LIBTOOL_CRUFT="-lcc_dynamic"
14509 else
14510 LIBTOOL_CRUFT=""
14511 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014512 if test "$cross_compiling" = yes; then
Ronald Oussoren23d92532009-09-07 06:12:00 +000014513 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +000014514else
14515 cat >conftest.$ac_ext <<_ACEOF
14516/* confdefs.h. */
14517_ACEOF
14518cat confdefs.h >>conftest.$ac_ext
14519cat >>conftest.$ac_ext <<_ACEOF
14520/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +000014521
Ronald Oussoren25967582009-09-06 10:00:26 +000014522 #include <unistd.h>
14523 int main(int argc, char*argv[])
14524 {
14525 if (sizeof(long) == 4) {
14526 return 0;
14527 } else {
14528 return 1;
14529 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +000014530 }
Ronald Oussoren23d92532009-09-07 06:12:00 +000014531
Ronald Oussoren25967582009-09-06 10:00:26 +000014532_ACEOF
14533rm -f conftest$ac_exeext
14534if { (ac_try="$ac_link"
14535case "(($ac_try" in
14536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14537 *) ac_try_echo=$ac_try;;
14538esac
14539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14540 (eval "$ac_link") 2>&5
14541 ac_status=$?
14542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14543 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14544 { (case "(($ac_try" in
14545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14546 *) ac_try_echo=$ac_try;;
14547esac
14548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14549 (eval "$ac_try") 2>&5
14550 ac_status=$?
14551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14552 (exit $ac_status); }; }; then
14553 ac_osx_32bit=yes
14554else
14555 echo "$as_me: program exited with status $ac_status" >&5
14556echo "$as_me: failed program was:" >&5
14557sed 's/^/| /' conftest.$ac_ext >&5
14558
14559( exit $ac_status )
14560ac_osx_32bit=no
14561fi
14562rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14563fi
14564
14565
14566
14567 if test "${ac_osx_32bit}" = "yes"; then
14568 case `arch` in
14569 i386)
14570 MACOSX_DEFAULT_ARCH="i386"
14571 ;;
14572 ppc)
14573 MACOSX_DEFAULT_ARCH="ppc"
14574 ;;
14575 *)
14576 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14577echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14578 { (exit 1); exit 1; }; }
14579 ;;
14580 esac
14581 else
14582 case `arch` in
14583 i386)
14584 MACOSX_DEFAULT_ARCH="x86_64"
14585 ;;
14586 ppc)
14587 MACOSX_DEFAULT_ARCH="ppc64"
14588 ;;
14589 *)
14590 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14591echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14592 { (exit 1); exit 1; }; }
14593 ;;
14594 esac
14595
14596 #ARCH_RUN_32BIT="true"
14597 fi
14598
14599 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014600 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014601 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014602esac
14603
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014604{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14605echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014606if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014607then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014608 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014609 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014610 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014611
Martin v. Löwis11437992002-04-12 09:54:03 +000014612cat >>confdefs.h <<\_ACEOF
14613#define WITH_NEXT_FRAMEWORK 1
14614_ACEOF
14615
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014616 { echo "$as_me:$LINENO: result: yes" >&5
14617echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014618 if test $enable_shared = "yes"
14619 then
Ronald Oussoren9ebd2422009-09-29 13:00:44 +000014620 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
14621echo "$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 +000014622 { (exit 1); exit 1; }; }
14623 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014624else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014625 { echo "$as_me:$LINENO: result: no" >&5
14626echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014627fi
14628
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014629{ echo "$as_me:$LINENO: checking for dyld" >&5
14630echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014631case $ac_sys_system/$ac_sys_release in
14632 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014633
Martin v. Löwis11437992002-04-12 09:54:03 +000014634cat >>confdefs.h <<\_ACEOF
14635#define WITH_DYLD 1
14636_ACEOF
14637
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014638 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14639echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014640 ;;
14641 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014642 { echo "$as_me:$LINENO: result: no" >&5
14643echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014644 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014645esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014646
Guido van Rossum0a516c91994-09-12 10:58:40 +000014647# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014648
Michael W. Hudson54241132001-12-07 15:38:26 +000014649
14650
14651
14652
Guido van Rossum0a516c91994-09-12 10:58:40 +000014653# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014654# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014655{ echo "$as_me:$LINENO: checking SO" >&5
14656echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014657if test -z "$SO"
14658then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014659 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014660 hp*|HP*)
14661 case `uname -m` in
14662 ia64) SO=.so;;
14663 *) SO=.sl;;
14664 esac
14665 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014666 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014667 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014668 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014669else
14670 # this might also be a termcap variable, see #610332
14671 echo
14672 echo '====================================================================='
14673 echo '+ +'
14674 echo '+ WARNING: You have set SO in your environment. +'
14675 echo '+ Do you really mean to change the extension for shared libraries? +'
14676 echo '+ Continuing in 10 seconds to let you to ponder. +'
14677 echo '+ +'
14678 echo '====================================================================='
14679 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014680fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014681{ echo "$as_me:$LINENO: result: $SO" >&5
14682echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014683
Ronald Oussoren79f90492009-01-02 10:44:46 +000014684
Neal Norwitz58e28882006-05-19 07:00:58 +000014685cat >>confdefs.h <<_ACEOF
14686#define SHLIB_EXT "$SO"
14687_ACEOF
14688
Guido van Rossum0a516c91994-09-12 10:58:40 +000014689# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014690# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014691# (Shared libraries in this instance are shared modules to be loaded into
14692# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014693{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14694echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014695if test -z "$LDSHARED"
14696then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014697 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014698 AIX*)
14699 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014700 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014701 ;;
14702 BeOS*)
14703 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014704 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014705 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014706 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014707 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014708 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000014709 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014710 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014711 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000014712 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014713 hp*|HP*)
14714 if test "$GCC" = "yes"
14715 then LDSHARED='$(CC) -shared'
14716 else LDSHARED='ld -b';
14717 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014718 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014719 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014720 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14721 if test "$enable_framework" ; then
14722 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014723 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14724 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014725 else
14726 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014727 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014728 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014729 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014730 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14731 if test "$enable_framework" ; then
14732 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014733 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14734 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014735 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014736 # No framework, use the Python app as bundle-loader
14737 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014738 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014739 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014740 Darwin/*)
14741 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14742 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014743
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014744 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014745 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014746 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014747 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014748 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014749 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14750 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014751 else
14752 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14753 if test "$enable_framework" ; then
14754 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014755 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14756 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014757 else
14758 # No framework, use the Python app as bundle-loader
14759 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14760 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14761 fi
14762 fi
14763 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014764 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014765 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014766 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014767 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014768 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014769 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014770 else
14771 LDSHARED="ld -Bshareable ${LDFLAGS}"
14772 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014773 OpenBSD*)
14774 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14775 then
14776 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14777 else
14778 case `uname -r` in
14779 [01].* | 2.[0-7] | 2.[0-7].*)
14780 LDSHARED="ld -Bshareable ${LDFLAGS}"
14781 ;;
14782 *)
14783 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14784 ;;
14785 esac
14786 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014787 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014788 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014789 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014790 then LDSHARED='$(CC) -shared'
14791 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014792 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014793 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014794 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014795 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014796 *) LDSHARED="ld";;
14797 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014798fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014799{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14800echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014801BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014802# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014803# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014804{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14805echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014806if test -z "$CCSHARED"
14807then
Guido van Rossum07397971997-04-29 21:49:50 +000014808 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014809 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014810 then CCSHARED="-fPIC";
14811 elif test `uname -p` = sparc;
14812 then CCSHARED="-xcode=pic32";
14813 else CCSHARED="-Kpic";
14814 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014815 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014816 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014817 else CCSHARED="+z";
14818 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014819 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014820 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014821 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014822 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014823 if test "$GCC" = "yes"
14824 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014825 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014826 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014827 SCO_SV*)
14828 if test "$GCC" = "yes"
14829 then CCSHARED="-fPIC"
14830 else CCSHARED="-Kpic -belf"
14831 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014832 IRIX*/6*) case $CC in
14833 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014834 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014835 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014836 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014837 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014838fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014839{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14840echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014841# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014842# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014843{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14844echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014845if test -z "$LINKFORSHARED"
14846then
Guido van Rossum07397971997-04-29 21:49:50 +000014847 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014848 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014849 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014850 LINKFORSHARED="-Wl,-E -Wl,+s";;
14851# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014852 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014853 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014854 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014855 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014856 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14857 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014858 # not used by the core itself but which needs to be in the core so
14859 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014860 # -prebind is no longer used, because it actually seems to give a
14861 # slowdown in stead of a speedup, maybe due to the large number of
14862 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014863
14864 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014865 if test "$enable_framework"
14866 then
Jack Jansenda49e192005-01-07 13:08:22 +000014867 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014868 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014869 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014870 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014871 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014872 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014873 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014874 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14875 then
14876 LINKFORSHARED="-Wl,--export-dynamic"
14877 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014878 SunOS/5*) case $CC in
14879 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014880 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014881 then
14882 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014883 fi;;
14884 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014885 CYGWIN*)
14886 if test $enable_shared = "no"
14887 then
14888 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14889 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014890 QNX*)
14891 # -Wl,-E causes the symbols to be added to the dynamic
14892 # symbol table so that they can be found when a module
14893 # is loaded. -N 2048K causes the stack size to be set
14894 # to 2048 kilobytes so that the stack doesn't overflow
14895 # when running test_compile.py.
14896 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014897 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014898fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014899{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14900echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014901
Michael W. Hudson54241132001-12-07 15:38:26 +000014902
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014903
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014904{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14905echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014906if test ! "$LIBRARY" = "$LDLIBRARY"
14907then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014908 case $ac_sys_system in
14909 CYGWIN*)
14910 # Cygwin needs CCSHARED when building extension DLLs
14911 # but not when building the interpreter DLL.
14912 CFLAGSFORSHARED='';;
14913 *)
14914 CFLAGSFORSHARED='$(CCSHARED)'
14915 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014916fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014917{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14918echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014919
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014920# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14921# library (with --enable-shared).
14922# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014923# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14924# if it is not required, since it creates a dependency of the shared library
14925# to LIBS. This, in turn, means that applications linking the shared libpython
14926# don't need to link LIBS explicitly. The default should be only changed
14927# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014928
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014929{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14930echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014931case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014932 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014933 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014934esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014935{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14936echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014937
14938
Guido van Rossum627b2d71993-12-24 10:39:16 +000014939# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014940
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014941{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14942echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014943if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014944 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014945else
Martin v. Löwis11437992002-04-12 09:54:03 +000014946 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014947LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014948cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014949/* confdefs.h. */
14950_ACEOF
14951cat confdefs.h >>conftest.$ac_ext
14952cat >>conftest.$ac_ext <<_ACEOF
14953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014954
Martin v. Löwiseba40652007-08-30 20:10:57 +000014955/* Override any GCC internal prototype to avoid an error.
14956 Use char because int might match the return type of a GCC
14957 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014958#ifdef __cplusplus
14959extern "C"
14960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014961char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014962int
14963main ()
14964{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014965return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014966 ;
14967 return 0;
14968}
14969_ACEOF
14970rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014971if { (ac_try="$ac_link"
14972case "(($ac_try" in
14973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14974 *) ac_try_echo=$ac_try;;
14975esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014977 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014978 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014979 grep -v '^ *+' conftest.er1 >conftest.err
14980 rm -f conftest.er1
14981 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014983 (exit $ac_status); } && {
14984 test -z "$ac_c_werror_flag" ||
14985 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014986 } && test -s conftest$ac_exeext &&
14987 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014988 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014989else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014991sed 's/^/| /' conftest.$ac_ext >&5
14992
Martin v. Löwiseba40652007-08-30 20:10:57 +000014993 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014994fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014995
14996rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014997 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014998LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014999fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015000{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
15001echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
15002if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015003 cat >>confdefs.h <<_ACEOF
15004#define HAVE_LIBDL 1
15005_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015006
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015007 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015008
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015009fi
15010 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015011
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015012{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15013echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015014if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015015 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015016else
Martin v. Löwis11437992002-04-12 09:54:03 +000015017 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015018LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015019cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015020/* confdefs.h. */
15021_ACEOF
15022cat confdefs.h >>conftest.$ac_ext
15023cat >>conftest.$ac_ext <<_ACEOF
15024/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015025
Martin v. Löwiseba40652007-08-30 20:10:57 +000015026/* Override any GCC internal prototype to avoid an error.
15027 Use char because int might match the return type of a GCC
15028 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015029#ifdef __cplusplus
15030extern "C"
15031#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015032char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015033int
15034main ()
15035{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015036return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015037 ;
15038 return 0;
15039}
15040_ACEOF
15041rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015042if { (ac_try="$ac_link"
15043case "(($ac_try" in
15044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15045 *) ac_try_echo=$ac_try;;
15046esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015048 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015050 grep -v '^ *+' conftest.er1 >conftest.err
15051 rm -f conftest.er1
15052 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015054 (exit $ac_status); } && {
15055 test -z "$ac_c_werror_flag" ||
15056 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015057 } && test -s conftest$ac_exeext &&
15058 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015059 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015060else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015062sed 's/^/| /' conftest.$ac_ext >&5
15063
Martin v. Löwiseba40652007-08-30 20:10:57 +000015064 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015065fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015066
15067rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015068 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015069LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015070fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015071{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15072echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15073if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015074 cat >>confdefs.h <<_ACEOF
15075#define HAVE_LIBDLD 1
15076_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015077
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015078 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015079
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015080fi
15081 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015082
Ronald Oussoren79f90492009-01-02 10:44:46 +000015083# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015084if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015085 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15086echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015087if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015088 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015089else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015090 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015091cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015092/* confdefs.h. */
15093_ACEOF
15094cat confdefs.h >>conftest.$ac_ext
15095cat >>conftest.$ac_ext <<_ACEOF
15096/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015097
Martin v. Löwiseba40652007-08-30 20:10:57 +000015098/* Override any GCC internal prototype to avoid an error.
15099 Use char because int might match the return type of a GCC
15100 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015101#ifdef __cplusplus
15102extern "C"
15103#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015104char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015105int
15106main ()
15107{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015108return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015109 ;
15110 return 0;
15111}
15112_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015113for ac_lib in '' pthread rt posix4; do
15114 if test -z "$ac_lib"; then
15115 ac_res="none required"
15116 else
15117 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015118 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015119 fi
15120 rm -f conftest.$ac_objext conftest$ac_exeext
15121if { (ac_try="$ac_link"
15122case "(($ac_try" in
15123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15124 *) ac_try_echo=$ac_try;;
15125esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015127 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015128 ac_status=$?
15129 grep -v '^ *+' conftest.er1 >conftest.err
15130 rm -f conftest.er1
15131 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015133 (exit $ac_status); } && {
15134 test -z "$ac_c_werror_flag" ||
15135 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015136 } && test -s conftest$ac_exeext &&
15137 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015138 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015139else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015140 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015141sed 's/^/| /' conftest.$ac_ext >&5
15142
Martin v. Löwiseba40652007-08-30 20:10:57 +000015143
Brett Cannon19fab762007-06-02 03:02:29 +000015144fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015145
15146rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15147 conftest$ac_exeext
15148 if test "${ac_cv_search_sem_init+set}" = set; then
15149 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015151done
15152if test "${ac_cv_search_sem_init+set}" = set; then
15153 :
15154else
15155 ac_cv_search_sem_init=no
15156fi
15157rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015158LIBS=$ac_func_search_save_LIBS
15159fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015160{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15161echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015162ac_res=$ac_cv_search_sem_init
15163if test "$ac_res" != no; then
15164 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015165
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015166fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015167 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015168 # posix4 on Solaris 2.6
15169 # pthread (first!) on Linux
15170fi
15171
Martin v. Löwis19d17342003-06-14 21:03:05 +000015172# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015173{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15174echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015175if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015176 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015177else
15178 ac_check_lib_save_LIBS=$LIBS
15179LIBS="-lintl $LIBS"
15180cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015181/* confdefs.h. */
15182_ACEOF
15183cat confdefs.h >>conftest.$ac_ext
15184cat >>conftest.$ac_ext <<_ACEOF
15185/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015186
Martin v. Löwiseba40652007-08-30 20:10:57 +000015187/* Override any GCC internal prototype to avoid an error.
15188 Use char because int might match the return type of a GCC
15189 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015190#ifdef __cplusplus
15191extern "C"
15192#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015193char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015194int
15195main ()
15196{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015197return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015198 ;
15199 return 0;
15200}
15201_ACEOF
15202rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015203if { (ac_try="$ac_link"
15204case "(($ac_try" in
15205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15206 *) ac_try_echo=$ac_try;;
15207esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015209 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015211 grep -v '^ *+' conftest.er1 >conftest.err
15212 rm -f conftest.er1
15213 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015215 (exit $ac_status); } && {
15216 test -z "$ac_c_werror_flag" ||
15217 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015218 } && test -s conftest$ac_exeext &&
15219 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015220 ac_cv_lib_intl_textdomain=yes
15221else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015223sed 's/^/| /' conftest.$ac_ext >&5
15224
Martin v. Löwiseba40652007-08-30 20:10:57 +000015225 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015227
15228rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015229 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015230LIBS=$ac_check_lib_save_LIBS
15231fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015232{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15233echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15234if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015235
15236cat >>confdefs.h <<\_ACEOF
15237#define WITH_LIBINTL 1
15238_ACEOF
15239
15240fi
15241
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015242
15243# checks for system dependent C++ extensions support
15244case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015245 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15246echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015247 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015248/* confdefs.h. */
15249_ACEOF
15250cat confdefs.h >>conftest.$ac_ext
15251cat >>conftest.$ac_ext <<_ACEOF
15252/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015253#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015254int
15255main ()
15256{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015257loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015258 ;
15259 return 0;
15260}
15261_ACEOF
15262rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015263if { (ac_try="$ac_link"
15264case "(($ac_try" in
15265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15266 *) ac_try_echo=$ac_try;;
15267esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015269 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015270 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015271 grep -v '^ *+' conftest.er1 >conftest.err
15272 rm -f conftest.er1
15273 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015275 (exit $ac_status); } && {
15276 test -z "$ac_c_werror_flag" ||
15277 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015278 } && test -s conftest$ac_exeext &&
15279 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015280
Martin v. Löwis11437992002-04-12 09:54:03 +000015281cat >>confdefs.h <<\_ACEOF
15282#define AIX_GENUINE_CPLUSPLUS 1
15283_ACEOF
15284
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015285 { echo "$as_me:$LINENO: result: yes" >&5
15286echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015287else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015289sed 's/^/| /' conftest.$ac_ext >&5
15290
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015291 { echo "$as_me:$LINENO: result: no" >&5
15292echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015293fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015294
15295rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015296 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015297 *) ;;
15298esac
15299
Guido van Rossum70c7f481998-03-26 18:44:10 +000015300# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015301# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015302{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15303echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015304if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015305 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015306else
Martin v. Löwis11437992002-04-12 09:54:03 +000015307 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015308LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015309cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015310/* confdefs.h. */
15311_ACEOF
15312cat confdefs.h >>conftest.$ac_ext
15313cat >>conftest.$ac_ext <<_ACEOF
15314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015315
Martin v. Löwiseba40652007-08-30 20:10:57 +000015316/* Override any GCC internal prototype to avoid an error.
15317 Use char because int might match the return type of a GCC
15318 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015319#ifdef __cplusplus
15320extern "C"
15321#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015322char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015323int
15324main ()
15325{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015326return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015327 ;
15328 return 0;
15329}
15330_ACEOF
15331rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015332if { (ac_try="$ac_link"
15333case "(($ac_try" in
15334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15335 *) ac_try_echo=$ac_try;;
15336esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015338 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015339 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015340 grep -v '^ *+' conftest.er1 >conftest.err
15341 rm -f conftest.er1
15342 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015344 (exit $ac_status); } && {
15345 test -z "$ac_c_werror_flag" ||
15346 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015347 } && test -s conftest$ac_exeext &&
15348 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015349 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015350else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015352sed 's/^/| /' conftest.$ac_ext >&5
15353
Martin v. Löwiseba40652007-08-30 20:10:57 +000015354 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015355fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015356
15357rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015358 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015359LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015360fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015361{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15362echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15363if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015364 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015365fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015366 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015367{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15368echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015369if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015370 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015371else
Martin v. Löwis11437992002-04-12 09:54:03 +000015372 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015373LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015374cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015375/* confdefs.h. */
15376_ACEOF
15377cat confdefs.h >>conftest.$ac_ext
15378cat >>conftest.$ac_ext <<_ACEOF
15379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015380
Martin v. Löwiseba40652007-08-30 20:10:57 +000015381/* Override any GCC internal prototype to avoid an error.
15382 Use char because int might match the return type of a GCC
15383 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015384#ifdef __cplusplus
15385extern "C"
15386#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015387char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015388int
15389main ()
15390{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015391return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015392 ;
15393 return 0;
15394}
15395_ACEOF
15396rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015397if { (ac_try="$ac_link"
15398case "(($ac_try" in
15399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15400 *) ac_try_echo=$ac_try;;
15401esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015403 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015404 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015405 grep -v '^ *+' conftest.er1 >conftest.err
15406 rm -f conftest.er1
15407 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015409 (exit $ac_status); } && {
15410 test -z "$ac_c_werror_flag" ||
15411 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015412 } && test -s conftest$ac_exeext &&
15413 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015414 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015415else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015417sed 's/^/| /' conftest.$ac_ext >&5
15418
Martin v. Löwiseba40652007-08-30 20:10:57 +000015419 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015420fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015421
15422rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015423 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015424LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015425fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015426{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15427echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15428if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015429 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015430fi
15431 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015432
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015433case "$ac_sys_system" in
15434BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015435{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15436echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015437if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015438 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015439else
Martin v. Löwis11437992002-04-12 09:54:03 +000015440 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015441LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015442cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015443/* confdefs.h. */
15444_ACEOF
15445cat confdefs.h >>conftest.$ac_ext
15446cat >>conftest.$ac_ext <<_ACEOF
15447/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015448
Martin v. Löwiseba40652007-08-30 20:10:57 +000015449/* Override any GCC internal prototype to avoid an error.
15450 Use char because int might match the return type of a GCC
15451 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015452#ifdef __cplusplus
15453extern "C"
15454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015455char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015456int
15457main ()
15458{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015459return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015460 ;
15461 return 0;
15462}
15463_ACEOF
15464rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015465if { (ac_try="$ac_link"
15466case "(($ac_try" in
15467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15468 *) ac_try_echo=$ac_try;;
15469esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015471 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015472 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015473 grep -v '^ *+' conftest.er1 >conftest.err
15474 rm -f conftest.er1
15475 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015477 (exit $ac_status); } && {
15478 test -z "$ac_c_werror_flag" ||
15479 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015480 } && test -s conftest$ac_exeext &&
15481 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015482 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015483else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015485sed 's/^/| /' conftest.$ac_ext >&5
15486
Martin v. Löwiseba40652007-08-30 20:10:57 +000015487 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015489
15490rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015491 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015492LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015493fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015494{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15495echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15496if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015497 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015498fi
15499 # BeOS
15500;;
15501esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015502
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015503{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15504echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015505
Martin v. Löwiseba40652007-08-30 20:10:57 +000015506# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015507if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015508 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015509{ echo "$as_me:$LINENO: result: $withval" >&5
15510echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015511LIBS="$withval $LIBS"
15512
15513else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015514 { echo "$as_me:$LINENO: result: no" >&5
15515echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015516fi
15517
Guido van Rossum7f43da71994-08-01 12:15:30 +000015518
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015519# Check for use of the system libffi library
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015520{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15521echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015522
Martin v. Löwiseba40652007-08-30 20:10:57 +000015523# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015524if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015525 withval=$with_system_ffi;
15526fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015527
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015528
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015529{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15530echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015531
Benjamin Peterson867475c2009-04-29 20:36:25 +000015532# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015533{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15534echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015535
15536# Check whether --with-dbmliborder was given.
15537if test "${with_dbmliborder+set}" = set; then
15538 withval=$with_dbmliborder;
15539if test x$with_dbmliborder = xyes
15540then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015541{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15542echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015543 { (exit 1); exit 1; }; }
15544else
15545 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15546 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15547 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015548 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15549echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015550 { (exit 1); exit 1; }; }
15551 fi
15552 done
15553fi
15554fi
15555
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015556{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15557echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015558
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015559# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015560
15561
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015562{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15563echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015564
Martin v. Löwiseba40652007-08-30 20:10:57 +000015565# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015566if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015567 withval=$with_signal_module;
15568fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015569
15570
15571if test -z "$with_signal_module"
15572then with_signal_module="yes"
15573fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015574{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15575echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015576
15577if test "${with_signal_module}" = "yes"; then
15578 USE_SIGNAL_MODULE=""
15579 SIGNAL_OBJS=""
15580else
15581 USE_SIGNAL_MODULE="#"
15582 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15583fi
15584
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015585# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015586
Barry Warsawc0d24d82000-06-29 16:12:00 +000015587USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015588
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015589{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15590echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015591
Guido van Rossumec2f0731997-01-22 20:54:01 +000015592
Martin v. Löwiseba40652007-08-30 20:10:57 +000015593# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015594if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015595 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015596{ echo "$as_me:$LINENO: result: $withval" >&5
15597echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015598LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015599if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015600 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015601fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015602else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015603 { echo "$as_me:$LINENO: result: no" >&5
15604echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015605fi
15606
Martin v. Löwis11437992002-04-12 09:54:03 +000015607
15608# Templates for things AC_DEFINEd more than once.
15609# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015610
15611
Martin v. Löwis11437992002-04-12 09:54:03 +000015612
15613
15614
15615
15616
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015617{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15618echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015619
Martin v. Löwiseba40652007-08-30 20:10:57 +000015620# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015621if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015622 withval=$with_threads;
15623fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015624
15625
Barry Warsawc0d24d82000-06-29 16:12:00 +000015626# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015627
Martin v. Löwiseba40652007-08-30 20:10:57 +000015628# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015629if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015630 withval=$with_thread; with_threads=$with_thread
15631fi
15632
Barry Warsawc0d24d82000-06-29 16:12:00 +000015633
15634if test -z "$with_threads"
15635then with_threads="yes"
15636fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015637{ echo "$as_me:$LINENO: result: $with_threads" >&5
15638echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015639
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015640
Barry Warsawc0d24d82000-06-29 16:12:00 +000015641if test "$with_threads" = "no"
15642then
15643 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015644elif test "$ac_cv_pthread_is_default" = yes
15645then
Martin v. Löwis11437992002-04-12 09:54:03 +000015646 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015647#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015648_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015649
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015650 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015651 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015652#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015653_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015654
15655 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015656 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015657elif test "$ac_cv_kpthread" = "yes"
15658then
15659 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015660 if test "$ac_cv_cxx_thread" = "yes"; then
15661 CXX="$CXX -Kpthread"
15662 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015663 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015664#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015665_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015666
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015667 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015668 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015669elif test "$ac_cv_kthread" = "yes"
15670then
15671 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015672 if test "$ac_cv_cxx_thread" = "yes"; then
15673 CXX="$CXX -Kthread"
15674 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015675 cat >>confdefs.h <<\_ACEOF
15676#define WITH_THREAD 1
15677_ACEOF
15678
15679 posix_threads=yes
15680 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015681elif test "$ac_cv_pthread" = "yes"
15682then
15683 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015684 if test "$ac_cv_cxx_thread" = "yes"; then
15685 CXX="$CXX -pthread"
15686 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015687 cat >>confdefs.h <<\_ACEOF
15688#define WITH_THREAD 1
15689_ACEOF
15690
15691 posix_threads=yes
15692 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015693else
15694 if test ! -z "$with_threads" -a -d "$with_threads"
15695 then LDFLAGS="$LDFLAGS -L$with_threads"
15696 fi
15697 if test ! -z "$withval" -a -d "$withval"
15698 then LDFLAGS="$LDFLAGS -L$withval"
15699 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015700
15701 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015702 # define _POSIX_THREADS in unistd.h. Some apparently don't
15703 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015704 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15705echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015707/* confdefs.h. */
15708_ACEOF
15709cat confdefs.h >>conftest.$ac_ext
15710cat >>conftest.$ac_ext <<_ACEOF
15711/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015712
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015713#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015714#ifdef _POSIX_THREADS
15715yes
15716#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015717
15718_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015719if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015720 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015721 unistd_defines_pthreads=yes
15722else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015723 unistd_defines_pthreads=no
15724fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000015725rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015726
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015727 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15728echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015729
Martin v. Löwis11437992002-04-12 09:54:03 +000015730 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015731#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015732_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015733
Martin v. Löwis11437992002-04-12 09:54:03 +000015734 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015735 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15736echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015737if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015738 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015739fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015740{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15741echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015742else
Martin v. Löwis11437992002-04-12 09:54:03 +000015743 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015744{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15745echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015746cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015747/* confdefs.h. */
15748_ACEOF
15749cat confdefs.h >>conftest.$ac_ext
15750cat >>conftest.$ac_ext <<_ACEOF
15751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015752$ac_includes_default
15753#include <cthreads.h>
15754_ACEOF
15755rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015756if { (ac_try="$ac_compile"
15757case "(($ac_try" in
15758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15759 *) ac_try_echo=$ac_try;;
15760esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015764 grep -v '^ *+' conftest.er1 >conftest.err
15765 rm -f conftest.er1
15766 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015768 (exit $ac_status); } && {
15769 test -z "$ac_c_werror_flag" ||
15770 test ! -s conftest.err
15771 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015772 ac_header_compiler=yes
15773else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015775sed 's/^/| /' conftest.$ac_ext >&5
15776
Martin v. Löwiseba40652007-08-30 20:10:57 +000015777 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015778fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015779
15780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015781{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15782echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015783
15784# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015785{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15786echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015787cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015788/* confdefs.h. */
15789_ACEOF
15790cat confdefs.h >>conftest.$ac_ext
15791cat >>conftest.$ac_ext <<_ACEOF
15792/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015793#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015794_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015795if { (ac_try="$ac_cpp conftest.$ac_ext"
15796case "(($ac_try" in
15797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15798 *) ac_try_echo=$ac_try;;
15799esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015801 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015802 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015803 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015804 rm -f conftest.er1
15805 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015807 (exit $ac_status); } >/dev/null && {
15808 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15809 test ! -s conftest.err
15810 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015811 ac_header_preproc=yes
15812else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015813 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015814sed 's/^/| /' conftest.$ac_ext >&5
15815
Martin v. Löwis11437992002-04-12 09:54:03 +000015816 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015817fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015818
Martin v. Löwis11437992002-04-12 09:54:03 +000015819rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015820{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15821echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015822
15823# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015824case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15825 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015826 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15827echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15828 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15829echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015830 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015831 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015832 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015833 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15834echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15835 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15836echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15837 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15838echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15839 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15840echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15841 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15842echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15843 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15844echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015845 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015846## -------------------------------------- ##
15847## Report this to http://bugs.python.org/ ##
15848## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015849_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015850 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015851 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015852esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015853{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15854echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015855if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015856 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015857else
15858 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015859fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015860{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15861echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015862
15863fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015864if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015865 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015866#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015867_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015868
Martin v. Löwis11437992002-04-12 09:54:03 +000015869 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015870#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015871_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015872
Martin v. Löwis11437992002-04-12 09:54:03 +000015873
15874cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015875#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015876_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015877
15878 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015879 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015880else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015881
Martin v. Löwis11437992002-04-12 09:54:03 +000015882 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015883 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15884echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015885if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015886 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015887fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015888{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15889echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015890else
Martin v. Löwis11437992002-04-12 09:54:03 +000015891 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015892{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15893echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015894cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015895/* confdefs.h. */
15896_ACEOF
15897cat confdefs.h >>conftest.$ac_ext
15898cat >>conftest.$ac_ext <<_ACEOF
15899/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015900$ac_includes_default
15901#include <mach/cthreads.h>
15902_ACEOF
15903rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015904if { (ac_try="$ac_compile"
15905case "(($ac_try" in
15906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15907 *) ac_try_echo=$ac_try;;
15908esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015912 grep -v '^ *+' conftest.er1 >conftest.err
15913 rm -f conftest.er1
15914 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015916 (exit $ac_status); } && {
15917 test -z "$ac_c_werror_flag" ||
15918 test ! -s conftest.err
15919 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015920 ac_header_compiler=yes
15921else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015923sed 's/^/| /' conftest.$ac_ext >&5
15924
Martin v. Löwiseba40652007-08-30 20:10:57 +000015925 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015927
15928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015929{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15930echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015931
15932# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015933{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15934echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015935cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015936/* confdefs.h. */
15937_ACEOF
15938cat confdefs.h >>conftest.$ac_ext
15939cat >>conftest.$ac_ext <<_ACEOF
15940/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015941#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015942_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015943if { (ac_try="$ac_cpp conftest.$ac_ext"
15944case "(($ac_try" in
15945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15946 *) ac_try_echo=$ac_try;;
15947esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015949 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015950 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015951 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015952 rm -f conftest.er1
15953 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015955 (exit $ac_status); } >/dev/null && {
15956 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15957 test ! -s conftest.err
15958 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015959 ac_header_preproc=yes
15960else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015962sed 's/^/| /' conftest.$ac_ext >&5
15963
Martin v. Löwis11437992002-04-12 09:54:03 +000015964 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015966
Martin v. Löwis11437992002-04-12 09:54:03 +000015967rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015968{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15969echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015970
15971# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015972case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15973 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015974 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15975echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15976 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15977echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015978 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015979 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015980 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015981 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15982echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15983 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15984echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15985 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15986echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15987 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15988echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15989 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15990echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15991 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15992echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015993 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015994## -------------------------------------- ##
15995## Report this to http://bugs.python.org/ ##
15996## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015997_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015998 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015999 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016000esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016001{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16002echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016003if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016004 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016005else
16006 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016007fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016008{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16009echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016010
16011fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016012if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016013 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016014#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016015_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016016
Martin v. Löwis11437992002-04-12 09:54:03 +000016017 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016018#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016019_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016020
Martin v. Löwis11437992002-04-12 09:54:03 +000016021
16022cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016023#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016024_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016025
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016026 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016027else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016028
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016029 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16030echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016031
Martin v. Löwiseba40652007-08-30 20:10:57 +000016032# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016033if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016034 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16035echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016036 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016037#define WITH_THREAD 1
16038_ACEOF
16039
16040
16041cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016042#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016043_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016044
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016045 LIBS="-lpth $LIBS"
16046 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016047else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016048 { echo "$as_me:$LINENO: result: no" >&5
16049echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016050
16051 # Just looking for pthread_create in libpthread is not enough:
16052 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16053 # So we really have to include pthread.h, and then link.
16054 _libs=$LIBS
16055 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016056 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16057echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016059/* confdefs.h. */
16060_ACEOF
16061cat confdefs.h >>conftest.$ac_ext
16062cat >>conftest.$ac_ext <<_ACEOF
16063/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016064#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016065
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016066void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016067int
16068main ()
16069{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016070
16071pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016072 ;
16073 return 0;
16074}
16075_ACEOF
16076rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016077if { (ac_try="$ac_link"
16078case "(($ac_try" in
16079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16080 *) ac_try_echo=$ac_try;;
16081esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016083 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016085 grep -v '^ *+' conftest.er1 >conftest.err
16086 rm -f conftest.er1
16087 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016089 (exit $ac_status); } && {
16090 test -z "$ac_c_werror_flag" ||
16091 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016092 } && test -s conftest$ac_exeext &&
16093 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016094
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016095 { echo "$as_me:$LINENO: result: yes" >&5
16096echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016097 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016098#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016099_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016100
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016101 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016102 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016103else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016105sed 's/^/| /' conftest.$ac_ext >&5
16106
Martin v. Löwis11437992002-04-12 09:54:03 +000016107
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016108 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016109 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16110echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016111if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016112 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016113else
Martin v. Löwis11437992002-04-12 09:54:03 +000016114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016115/* confdefs.h. */
16116_ACEOF
16117cat confdefs.h >>conftest.$ac_ext
16118cat >>conftest.$ac_ext <<_ACEOF
16119/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016120/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16121 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16122#define pthread_detach innocuous_pthread_detach
16123
Guido van Rossumad678af1998-10-02 14:42:15 +000016124/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016125 which can conflict with char pthread_detach (); below.
16126 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016127 <limits.h> exists even on freestanding compilers. */
16128
16129#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016130# include <limits.h>
16131#else
16132# include <assert.h>
16133#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016134
16135#undef pthread_detach
16136
Martin v. Löwiseba40652007-08-30 20:10:57 +000016137/* Override any GCC internal prototype to avoid an error.
16138 Use char because int might match the return type of a GCC
16139 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016140#ifdef __cplusplus
16141extern "C"
16142#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016143char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016144/* The GNU C library defines this for functions which it implements
16145 to always fail with ENOSYS. Some functions are actually named
16146 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016147#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016148choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016149#endif
16150
Skip Montanaro6dead952003-09-25 14:50:04 +000016151int
16152main ()
16153{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016154return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016155 ;
16156 return 0;
16157}
16158_ACEOF
16159rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016160if { (ac_try="$ac_link"
16161case "(($ac_try" in
16162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16163 *) ac_try_echo=$ac_try;;
16164esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016166 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016167 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016168 grep -v '^ *+' conftest.er1 >conftest.err
16169 rm -f conftest.er1
16170 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016172 (exit $ac_status); } && {
16173 test -z "$ac_c_werror_flag" ||
16174 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016175 } && test -s conftest$ac_exeext &&
16176 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016177 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016178else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016180sed 's/^/| /' conftest.$ac_ext >&5
16181
Martin v. Löwiseba40652007-08-30 20:10:57 +000016182 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016184
16185rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016186 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016187fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016188{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16189echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16190if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016191 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016192#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016193_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016194
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016195 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016196 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016197else
Guido van Rossumad678af1998-10-02 14:42:15 +000016198
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016199 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016200 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16201echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016202if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016203 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016204fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016205{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16206echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016207else
16208 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016209{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16210echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016211cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016212/* confdefs.h. */
16213_ACEOF
16214cat confdefs.h >>conftest.$ac_ext
16215cat >>conftest.$ac_ext <<_ACEOF
16216/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016217$ac_includes_default
16218#include <atheos/threads.h>
16219_ACEOF
16220rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016221if { (ac_try="$ac_compile"
16222case "(($ac_try" in
16223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16224 *) ac_try_echo=$ac_try;;
16225esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016229 grep -v '^ *+' conftest.er1 >conftest.err
16230 rm -f conftest.er1
16231 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016233 (exit $ac_status); } && {
16234 test -z "$ac_c_werror_flag" ||
16235 test ! -s conftest.err
16236 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016237 ac_header_compiler=yes
16238else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016240sed 's/^/| /' conftest.$ac_ext >&5
16241
Martin v. Löwiseba40652007-08-30 20:10:57 +000016242 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016244
16245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016246{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16247echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016248
16249# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016250{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16251echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016252cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016253/* confdefs.h. */
16254_ACEOF
16255cat confdefs.h >>conftest.$ac_ext
16256cat >>conftest.$ac_ext <<_ACEOF
16257/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016258#include <atheos/threads.h>
16259_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016260if { (ac_try="$ac_cpp conftest.$ac_ext"
16261case "(($ac_try" in
16262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16263 *) ac_try_echo=$ac_try;;
16264esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016266 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016267 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016268 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016269 rm -f conftest.er1
16270 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016272 (exit $ac_status); } >/dev/null && {
16273 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16274 test ! -s conftest.err
16275 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016276 ac_header_preproc=yes
16277else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016279sed 's/^/| /' conftest.$ac_ext >&5
16280
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016281 ac_header_preproc=no
16282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016283
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016284rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016285{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16286echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016287
16288# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016289case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16290 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016291 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16292echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16293 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16294echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016295 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016296 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016297 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016298 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16299echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16300 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16301echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16302 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16303echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16304 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16305echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16306 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16307echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16308 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16309echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016310 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016311## -------------------------------------- ##
16312## Report this to http://bugs.python.org/ ##
16313## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016314_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016315 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016316 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016317esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016318{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16319echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016320if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016321 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016322else
16323 ac_cv_header_atheos_threads_h=$ac_header_preproc
16324fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016325{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16326echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016327
16328fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016329if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016330 cat >>confdefs.h <<\_ACEOF
16331#define WITH_THREAD 1
16332_ACEOF
16333
16334
16335cat >>confdefs.h <<\_ACEOF
16336#define ATHEOS_THREADS 1
16337_ACEOF
16338
16339 THREADOBJ="Python/thread.o"
16340else
16341
Martin v. Löwis11437992002-04-12 09:54:03 +000016342 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016343 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16344echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016345if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016346 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016347fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016348{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16349echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016350else
Martin v. Löwis11437992002-04-12 09:54:03 +000016351 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016352{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16353echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016354cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016355/* confdefs.h. */
16356_ACEOF
16357cat confdefs.h >>conftest.$ac_ext
16358cat >>conftest.$ac_ext <<_ACEOF
16359/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016360$ac_includes_default
16361#include <kernel/OS.h>
16362_ACEOF
16363rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016364if { (ac_try="$ac_compile"
16365case "(($ac_try" in
16366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16367 *) ac_try_echo=$ac_try;;
16368esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016370 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016372 grep -v '^ *+' conftest.er1 >conftest.err
16373 rm -f conftest.er1
16374 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016376 (exit $ac_status); } && {
16377 test -z "$ac_c_werror_flag" ||
16378 test ! -s conftest.err
16379 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016380 ac_header_compiler=yes
16381else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016383sed 's/^/| /' conftest.$ac_ext >&5
16384
Martin v. Löwiseba40652007-08-30 20:10:57 +000016385 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016386fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016387
16388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016389{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16390echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016391
16392# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016393{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16394echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016395cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016396/* confdefs.h. */
16397_ACEOF
16398cat confdefs.h >>conftest.$ac_ext
16399cat >>conftest.$ac_ext <<_ACEOF
16400/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016401#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016402_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016403if { (ac_try="$ac_cpp conftest.$ac_ext"
16404case "(($ac_try" in
16405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16406 *) ac_try_echo=$ac_try;;
16407esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016409 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016410 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016411 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016412 rm -f conftest.er1
16413 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016415 (exit $ac_status); } >/dev/null && {
16416 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16417 test ! -s conftest.err
16418 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016419 ac_header_preproc=yes
16420else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016422sed 's/^/| /' conftest.$ac_ext >&5
16423
Martin v. Löwis11437992002-04-12 09:54:03 +000016424 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016426
Martin v. Löwis11437992002-04-12 09:54:03 +000016427rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016428{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16429echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016430
Martin v. Löwis11437992002-04-12 09:54:03 +000016431# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016432case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16433 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016434 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16435echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16436 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16437echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016438 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016439 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016440 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016441 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16442echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16443 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16444echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16445 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16446echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16447 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16448echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16449 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16450echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16451 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16452echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016453 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016454## -------------------------------------- ##
16455## Report this to http://bugs.python.org/ ##
16456## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016457_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016458 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016459 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016460esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016461{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16462echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016463if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016464 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016465else
16466 ac_cv_header_kernel_OS_h=$ac_header_preproc
16467fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016468{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16469echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016470
16471fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016472if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016473 cat >>confdefs.h <<\_ACEOF
16474#define WITH_THREAD 1
16475_ACEOF
16476
16477
16478cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016479#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016480_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016481
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016482 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016483else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016484
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016485 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16486echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016487if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016488 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016489else
Martin v. Löwis11437992002-04-12 09:54:03 +000016490 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016491LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016492cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016493/* confdefs.h. */
16494_ACEOF
16495cat confdefs.h >>conftest.$ac_ext
16496cat >>conftest.$ac_ext <<_ACEOF
16497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016498
Martin v. Löwiseba40652007-08-30 20:10:57 +000016499/* Override any GCC internal prototype to avoid an error.
16500 Use char because int might match the return type of a GCC
16501 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016502#ifdef __cplusplus
16503extern "C"
16504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016505char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016506int
16507main ()
16508{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016509return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016510 ;
16511 return 0;
16512}
16513_ACEOF
16514rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016515if { (ac_try="$ac_link"
16516case "(($ac_try" in
16517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16518 *) ac_try_echo=$ac_try;;
16519esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016521 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016522 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016523 grep -v '^ *+' conftest.er1 >conftest.err
16524 rm -f conftest.er1
16525 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016527 (exit $ac_status); } && {
16528 test -z "$ac_c_werror_flag" ||
16529 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016530 } && test -s conftest$ac_exeext &&
16531 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016532 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016533else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016535sed 's/^/| /' conftest.$ac_ext >&5
16536
Martin v. Löwiseba40652007-08-30 20:10:57 +000016537 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016539
16540rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016541 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016542LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016543fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016544{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16545echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16546if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016547 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016548#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016549_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016550
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016551 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016552 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016553 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016554else
Greg Steinadf63d62000-07-05 10:38:09 +000016555
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016556 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16557echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016558if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016559 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016560else
Martin v. Löwis11437992002-04-12 09:54:03 +000016561 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016562LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016563cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016564/* confdefs.h. */
16565_ACEOF
16566cat confdefs.h >>conftest.$ac_ext
16567cat >>conftest.$ac_ext <<_ACEOF
16568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016569
Martin v. Löwiseba40652007-08-30 20:10:57 +000016570/* Override any GCC internal prototype to avoid an error.
16571 Use char because int might match the return type of a GCC
16572 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016573#ifdef __cplusplus
16574extern "C"
16575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016576char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016577int
16578main ()
16579{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016580return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016581 ;
16582 return 0;
16583}
16584_ACEOF
16585rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016586if { (ac_try="$ac_link"
16587case "(($ac_try" in
16588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16589 *) ac_try_echo=$ac_try;;
16590esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016592 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016593 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016594 grep -v '^ *+' conftest.er1 >conftest.err
16595 rm -f conftest.er1
16596 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016598 (exit $ac_status); } && {
16599 test -z "$ac_c_werror_flag" ||
16600 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016601 } && test -s conftest$ac_exeext &&
16602 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016603 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016604else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016606sed 's/^/| /' conftest.$ac_ext >&5
16607
Martin v. Löwiseba40652007-08-30 20:10:57 +000016608 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016610
16611rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016612 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016613LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016614fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016615{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16616echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16617if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016618 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016619#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016620_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016621
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016622 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016623 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016624 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016625else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016626
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016627 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16628echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016629if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016630 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016631else
Martin v. Löwis11437992002-04-12 09:54:03 +000016632 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016633LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016634cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016635/* confdefs.h. */
16636_ACEOF
16637cat confdefs.h >>conftest.$ac_ext
16638cat >>conftest.$ac_ext <<_ACEOF
16639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016640
Martin v. Löwiseba40652007-08-30 20:10:57 +000016641/* Override any GCC internal prototype to avoid an error.
16642 Use char because int might match the return type of a GCC
16643 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016644#ifdef __cplusplus
16645extern "C"
16646#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016647char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016648int
16649main ()
16650{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016651return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016652 ;
16653 return 0;
16654}
16655_ACEOF
16656rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016657if { (ac_try="$ac_link"
16658case "(($ac_try" in
16659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16660 *) ac_try_echo=$ac_try;;
16661esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016663 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016665 grep -v '^ *+' conftest.er1 >conftest.err
16666 rm -f conftest.er1
16667 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016669 (exit $ac_status); } && {
16670 test -z "$ac_c_werror_flag" ||
16671 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016672 } && test -s conftest$ac_exeext &&
16673 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016674 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016675else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016677sed 's/^/| /' conftest.$ac_ext >&5
16678
Martin v. Löwiseba40652007-08-30 20:10:57 +000016679 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016681
16682rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016683 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016684LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016685fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016686{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16687echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16688if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016689 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016690#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016691_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016692
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016693 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016694 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016695 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016696else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016697
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016698 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16699echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016700if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016701 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016702else
Martin v. Löwis11437992002-04-12 09:54:03 +000016703 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016704LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016705cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016706/* confdefs.h. */
16707_ACEOF
16708cat confdefs.h >>conftest.$ac_ext
16709cat >>conftest.$ac_ext <<_ACEOF
16710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016711
Martin v. Löwiseba40652007-08-30 20:10:57 +000016712/* Override any GCC internal prototype to avoid an error.
16713 Use char because int might match the return type of a GCC
16714 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016715#ifdef __cplusplus
16716extern "C"
16717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016718char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016719int
16720main ()
16721{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016722return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016723 ;
16724 return 0;
16725}
16726_ACEOF
16727rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016728if { (ac_try="$ac_link"
16729case "(($ac_try" in
16730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16731 *) ac_try_echo=$ac_try;;
16732esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016734 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016736 grep -v '^ *+' conftest.er1 >conftest.err
16737 rm -f conftest.er1
16738 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016740 (exit $ac_status); } && {
16741 test -z "$ac_c_werror_flag" ||
16742 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016743 } && test -s conftest$ac_exeext &&
16744 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016745 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016746else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016748sed 's/^/| /' conftest.$ac_ext >&5
16749
Martin v. Löwiseba40652007-08-30 20:10:57 +000016750 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016752
16753rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016754 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016755LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016756fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016757{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16758echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16759if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016760 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016761#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016762_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016763
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016764 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016765 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016766 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016767else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016768
Martin v. Löwis130fb172001-07-19 11:00:41 +000016769 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016770fi
16771
Guido van Rossum627b2d71993-12-24 10:39:16 +000016772
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016773fi
16774
Guido van Rossum0be3e491997-05-22 20:33:33 +000016775fi
16776
Guido van Rossum49545951997-12-02 19:28:29 +000016777fi
16778
Guido van Rossumb93a8621998-05-07 13:27:32 +000016779fi
16780
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016781
Michael W. Hudson54241132001-12-07 15:38:26 +000016782fi
16783
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016784
16785fi
16786
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016787fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016788
16789rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016790 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016791fi
16792
Martin v. Löwis11437992002-04-12 09:54:03 +000016793fi
16794
16795
16796fi
16797
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016798
Michael W. Hudson54241132001-12-07 15:38:26 +000016799
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016800 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16801echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016802if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016803 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016804else
Martin v. Löwis11437992002-04-12 09:54:03 +000016805 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016806LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016807cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016808/* confdefs.h. */
16809_ACEOF
16810cat confdefs.h >>conftest.$ac_ext
16811cat >>conftest.$ac_ext <<_ACEOF
16812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016813
Martin v. Löwiseba40652007-08-30 20:10:57 +000016814/* Override any GCC internal prototype to avoid an error.
16815 Use char because int might match the return type of a GCC
16816 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016817#ifdef __cplusplus
16818extern "C"
16819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016820char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016821int
16822main ()
16823{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016824return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016825 ;
16826 return 0;
16827}
16828_ACEOF
16829rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016830if { (ac_try="$ac_link"
16831case "(($ac_try" in
16832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16833 *) ac_try_echo=$ac_try;;
16834esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016836 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016838 grep -v '^ *+' conftest.er1 >conftest.err
16839 rm -f conftest.er1
16840 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016842 (exit $ac_status); } && {
16843 test -z "$ac_c_werror_flag" ||
16844 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016845 } && test -s conftest$ac_exeext &&
16846 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016847 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016848else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016850sed 's/^/| /' conftest.$ac_ext >&5
16851
Martin v. Löwiseba40652007-08-30 20:10:57 +000016852 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016854
16855rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016856 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016857LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016858fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016859{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16860echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16861if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016862 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016863#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016864_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016865
Martin v. Löwis130fb172001-07-19 11:00:41 +000016866 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016867 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016868 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016869fi
16870
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016871
Neal Norwitza978ab02002-11-02 16:58:05 +000016872 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016873 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16874echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016875if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016876 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016877else
Martin v. Löwis11437992002-04-12 09:54:03 +000016878 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016879LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016880cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016881/* confdefs.h. */
16882_ACEOF
16883cat confdefs.h >>conftest.$ac_ext
16884cat >>conftest.$ac_ext <<_ACEOF
16885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016886
Martin v. Löwiseba40652007-08-30 20:10:57 +000016887/* Override any GCC internal prototype to avoid an error.
16888 Use char because int might match the return type of a GCC
16889 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016890#ifdef __cplusplus
16891extern "C"
16892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016893char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016894int
16895main ()
16896{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016897return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016898 ;
16899 return 0;
16900}
16901_ACEOF
16902rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016903if { (ac_try="$ac_link"
16904case "(($ac_try" in
16905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16906 *) ac_try_echo=$ac_try;;
16907esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016909 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016911 grep -v '^ *+' conftest.er1 >conftest.err
16912 rm -f conftest.er1
16913 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016915 (exit $ac_status); } && {
16916 test -z "$ac_c_werror_flag" ||
16917 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016918 } && test -s conftest$ac_exeext &&
16919 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016920 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016921else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016923sed 's/^/| /' conftest.$ac_ext >&5
16924
Martin v. Löwiseba40652007-08-30 20:10:57 +000016925 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016927
16928rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016929 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016930LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016931fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016932{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16933echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16934if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016935 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016936#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016937_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016938
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016939 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016940 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016941 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016942fi
16943
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016944 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016945
Martin v. Löwis130fb172001-07-19 11:00:41 +000016946 if test "$USE_THREAD_MODULE" != "#"
16947 then
16948 # If the above checks didn't disable threads, (at least) OSF1
16949 # needs this '-threads' argument during linking.
16950 case $ac_sys_system in
16951 OSF1) LDLAST=-threads;;
16952 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016953 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016954fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016955
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016956if test "$posix_threads" = "yes"; then
16957 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016958
16959cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016960#define _POSIX_THREADS 1
16961_ACEOF
16962
16963 fi
16964
16965 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16966 case $ac_sys_system/$ac_sys_release in
16967 SunOS/5.6)
16968cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016969#define HAVE_PTHREAD_DESTRUCTOR 1
16970_ACEOF
16971
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016972 ;;
16973 SunOS/5.8)
16974cat >>confdefs.h <<\_ACEOF
16975#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16976_ACEOF
16977
16978 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000016979 AIX/5)
16980cat >>confdefs.h <<\_ACEOF
16981#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16982_ACEOF
16983
16984 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016985 esac
16986
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016987 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16988echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016989 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016990 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016991else
16992 if test "$cross_compiling" = yes; then
16993 ac_cv_pthread_system_supported=no
16994else
16995 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016996/* confdefs.h. */
16997_ACEOF
16998cat confdefs.h >>conftest.$ac_ext
16999cat >>conftest.$ac_ext <<_ACEOF
17000/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017001#include <pthread.h>
17002 void *foo(void *parm) {
17003 return NULL;
17004 }
17005 main() {
17006 pthread_attr_t attr;
17007 pthread_t id;
17008 if (pthread_attr_init(&attr)) exit(-1);
17009 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17010 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17011 exit(0);
17012 }
17013_ACEOF
17014rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017015if { (ac_try="$ac_link"
17016case "(($ac_try" in
17017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17018 *) ac_try_echo=$ac_try;;
17019esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017021 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017022 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017024 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017025 { (case "(($ac_try" in
17026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17027 *) ac_try_echo=$ac_try;;
17028esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017030 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017031 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017033 (exit $ac_status); }; }; then
17034 ac_cv_pthread_system_supported=yes
17035else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017036 echo "$as_me: program exited with status $ac_status" >&5
17037echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017038sed 's/^/| /' conftest.$ac_ext >&5
17039
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017040( exit $ac_status )
17041ac_cv_pthread_system_supported=no
17042fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017043rm -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 +000017044fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017045
Martin v. Löwiseba40652007-08-30 20:10:57 +000017046
17047
Guido van Rossum627b2d71993-12-24 10:39:16 +000017048fi
17049
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017050 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17051echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017052 if test "$ac_cv_pthread_system_supported" = "yes"; then
17053
17054cat >>confdefs.h <<\_ACEOF
17055#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17056_ACEOF
17057
17058 fi
17059
17060for ac_func in pthread_sigmask
17061do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017062as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17063{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17064echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017065if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017066 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017067else
17068 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017069/* confdefs.h. */
17070_ACEOF
17071cat confdefs.h >>conftest.$ac_ext
17072cat >>conftest.$ac_ext <<_ACEOF
17073/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017074/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17075 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17076#define $ac_func innocuous_$ac_func
17077
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017078/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017079 which can conflict with char $ac_func (); below.
17080 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017081 <limits.h> exists even on freestanding compilers. */
17082
17083#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017084# include <limits.h>
17085#else
17086# include <assert.h>
17087#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017088
17089#undef $ac_func
17090
Martin v. Löwiseba40652007-08-30 20:10:57 +000017091/* Override any GCC internal prototype to avoid an error.
17092 Use char because int might match the return type of a GCC
17093 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017094#ifdef __cplusplus
17095extern "C"
17096#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017097char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017098/* The GNU C library defines this for functions which it implements
17099 to always fail with ENOSYS. Some functions are actually named
17100 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017101#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017102choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017103#endif
17104
Skip Montanaro6dead952003-09-25 14:50:04 +000017105int
17106main ()
17107{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017108return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017109 ;
17110 return 0;
17111}
17112_ACEOF
17113rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017114if { (ac_try="$ac_link"
17115case "(($ac_try" in
17116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17117 *) ac_try_echo=$ac_try;;
17118esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017120 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017121 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017122 grep -v '^ *+' conftest.er1 >conftest.err
17123 rm -f conftest.er1
17124 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017126 (exit $ac_status); } && {
17127 test -z "$ac_c_werror_flag" ||
17128 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017129 } && test -s conftest$ac_exeext &&
17130 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017131 eval "$as_ac_var=yes"
17132else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017134sed 's/^/| /' conftest.$ac_ext >&5
17135
Martin v. Löwiseba40652007-08-30 20:10:57 +000017136 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017137fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017138
17139rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017140 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017141fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017142ac_res=`eval echo '${'$as_ac_var'}'`
17143 { echo "$as_me:$LINENO: result: $ac_res" >&5
17144echo "${ECHO_T}$ac_res" >&6; }
17145if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017146 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017147#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017148_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017149 case $ac_sys_system in
17150 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017151
Jason Tishlerfac083d2003-07-22 15:20:49 +000017152cat >>confdefs.h <<\_ACEOF
17153#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17154_ACEOF
17155
17156 ;;
17157 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017158fi
17159done
17160
17161fi
17162
17163
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017164# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017165
17166
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017167{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17168echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017169# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017170if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017171 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017172 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017173 { echo "$as_me:$LINENO: result: no" >&5
17174echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017175 ipv6=no
17176 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017177 *) { echo "$as_me:$LINENO: result: yes" >&5
17178echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017179 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017180#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017181_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017182
17183 ipv6=yes
17184 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017185 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017186else
Martin v. Löwis11437992002-04-12 09:54:03 +000017187
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017188 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017189 { echo "$as_me:$LINENO: result: no" >&5
17190echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017191 ipv6=no
17192
17193else
Martin v. Löwis11437992002-04-12 09:54:03 +000017194 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017195/* confdefs.h. */
17196_ACEOF
17197cat confdefs.h >>conftest.$ac_ext
17198cat >>conftest.$ac_ext <<_ACEOF
17199/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017200 /* AF_INET6 available check */
17201#include <sys/types.h>
17202#include <sys/socket.h>
17203main()
17204{
17205 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17206 exit(1);
17207 else
17208 exit(0);
17209}
17210
Martin v. Löwis11437992002-04-12 09:54:03 +000017211_ACEOF
17212rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017213if { (ac_try="$ac_link"
17214case "(($ac_try" in
17215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17216 *) ac_try_echo=$ac_try;;
17217esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017219 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017220 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017222 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017223 { (case "(($ac_try" in
17224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17225 *) ac_try_echo=$ac_try;;
17226esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017228 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017229 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017231 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017232 { echo "$as_me:$LINENO: result: yes" >&5
17233echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017234 ipv6=yes
17235else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017236 echo "$as_me: program exited with status $ac_status" >&5
17237echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017238sed 's/^/| /' conftest.$ac_ext >&5
17239
Martin v. Löwis11437992002-04-12 09:54:03 +000017240( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017241{ echo "$as_me:$LINENO: result: no" >&5
17242echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017243 ipv6=no
17244fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017245rm -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 +000017246fi
17247
Martin v. Löwiseba40652007-08-30 20:10:57 +000017248
17249
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017250if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017251 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17252echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017254/* confdefs.h. */
17255_ACEOF
17256cat confdefs.h >>conftest.$ac_ext
17257cat >>conftest.$ac_ext <<_ACEOF
17258/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017259#include <sys/types.h>
17260#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017261int
17262main ()
17263{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017264struct sockaddr_in6 x;
17265x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017266 ;
17267 return 0;
17268}
17269_ACEOF
17270rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017271if { (ac_try="$ac_compile"
17272case "(($ac_try" in
17273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17274 *) ac_try_echo=$ac_try;;
17275esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017277 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017278 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017279 grep -v '^ *+' conftest.er1 >conftest.err
17280 rm -f conftest.er1
17281 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017283 (exit $ac_status); } && {
17284 test -z "$ac_c_werror_flag" ||
17285 test ! -s conftest.err
17286 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017287 { echo "$as_me:$LINENO: result: yes" >&5
17288echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017289 ipv6=yes
17290else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017292sed 's/^/| /' conftest.$ac_ext >&5
17293
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017294 { echo "$as_me:$LINENO: result: no" >&5
17295echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017296 ipv6=no
17297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017298
17299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017300fi
17301
17302if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017303 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017304#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017305_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017306
17307fi
17308
Martin v. Löwiseba40652007-08-30 20:10:57 +000017309fi
17310
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017311
17312ipv6type=unknown
17313ipv6lib=none
17314ipv6trylibc=no
17315
17316if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017317 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17318echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017319 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17320 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017321 case $i in
17322 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017323 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017324/* confdefs.h. */
17325_ACEOF
17326cat confdefs.h >>conftest.$ac_ext
17327cat >>conftest.$ac_ext <<_ACEOF
17328/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017329
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017330#include <netinet/in.h>
17331#ifdef IPV6_INRIA_VERSION
17332yes
17333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017334_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017335if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017336 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017337 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017338fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000017339rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017340
17341 ;;
17342 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017343 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017344/* confdefs.h. */
17345_ACEOF
17346cat confdefs.h >>conftest.$ac_ext
17347cat >>conftest.$ac_ext <<_ACEOF
17348/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017349
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017350#include <netinet/in.h>
17351#ifdef __KAME__
17352yes
17353#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017354_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017355if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017356 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017357 ipv6type=$i;
17358 ipv6lib=inet6
17359 ipv6libdir=/usr/local/v6/lib
17360 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017361fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000017362rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017363
17364 ;;
17365 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017366 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017367/* confdefs.h. */
17368_ACEOF
17369cat confdefs.h >>conftest.$ac_ext
17370cat >>conftest.$ac_ext <<_ACEOF
17371/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017372
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017373#include <features.h>
17374#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17375yes
17376#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017377_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017379 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017380 ipv6type=$i;
17381 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017382fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000017383rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017384
17385 ;;
17386 linux-inet6)
17387 if test -d /usr/inet6; then
17388 ipv6type=$i
17389 ipv6lib=inet6
17390 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017391 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017392 fi
17393 ;;
17394 solaris)
17395 if test -f /etc/netconfig; then
17396 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17397 ipv6type=$i
17398 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017399 fi
17400 fi
17401 ;;
17402 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017403 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017404/* confdefs.h. */
17405_ACEOF
17406cat confdefs.h >>conftest.$ac_ext
17407cat >>conftest.$ac_ext <<_ACEOF
17408/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017409
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017410#include <sys/param.h>
17411#ifdef _TOSHIBA_INET6
17412yes
17413#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017414_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017415if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017416 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017417 ipv6type=$i;
17418 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017419 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017420fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000017421rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017422
17423 ;;
17424 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017425 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017426/* confdefs.h. */
17427_ACEOF
17428cat confdefs.h >>conftest.$ac_ext
17429cat >>conftest.$ac_ext <<_ACEOF
17430/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017431
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017432#include </usr/local/v6/include/sys/v6config.h>
17433#ifdef __V6D__
17434yes
17435#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017436_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017437if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017438 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017439 ipv6type=$i;
17440 ipv6lib=v6;
17441 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017442 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017443fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000017444rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017445
17446 ;;
17447 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017448 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017449/* confdefs.h. */
17450_ACEOF
17451cat confdefs.h >>conftest.$ac_ext
17452cat >>conftest.$ac_ext <<_ACEOF
17453/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017454
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017455#include <sys/param.h>
17456#ifdef _ZETA_MINAMI_INET6
17457yes
17458#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017459_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017460if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017461 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017462 ipv6type=$i;
17463 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017464 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017465fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000017466rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017467
17468 ;;
17469 esac
17470 if test "$ipv6type" != "unknown"; then
17471 break
17472 fi
17473 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017474 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17475echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017476fi
17477
17478if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17479 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17480 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17481 echo "using lib$ipv6lib"
17482 else
17483 if test $ipv6trylibc = "yes"; then
17484 echo "using libc"
17485 else
17486 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17487 echo "You need to fetch lib$ipv6lib.a from appropriate"
17488 echo 'ipv6 kit and compile beforehand.'
17489 exit 1
17490 fi
17491 fi
17492fi
17493
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017494{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17495echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017496cat >conftest.$ac_ext <<_ACEOF
17497/* confdefs.h. */
17498_ACEOF
17499cat confdefs.h >>conftest.$ac_ext
17500cat >>conftest.$ac_ext <<_ACEOF
17501/* end confdefs.h. */
17502#include <Carbon/Carbon.h>
17503int
17504main ()
17505{
17506FSIORefNum fRef = 0
17507 ;
17508 return 0;
17509}
17510_ACEOF
17511rm -f conftest.$ac_objext
17512if { (ac_try="$ac_compile"
17513case "(($ac_try" in
17514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17515 *) ac_try_echo=$ac_try;;
17516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017518 (eval "$ac_compile") 2>conftest.er1
17519 ac_status=$?
17520 grep -v '^ *+' conftest.er1 >conftest.err
17521 rm -f conftest.er1
17522 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017524 (exit $ac_status); } && {
17525 test -z "$ac_c_werror_flag" ||
17526 test ! -s conftest.err
17527 } && test -s conftest.$ac_objext; then
17528
17529cat >>confdefs.h <<\_ACEOF
17530#define HAVE_OSX105_SDK 1
17531_ACEOF
17532
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017533 { echo "$as_me:$LINENO: result: yes" >&5
17534echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017535else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017536 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017537sed 's/^/| /' conftest.$ac_ext >&5
17538
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017539 { echo "$as_me:$LINENO: result: no" >&5
17540echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017541
17542fi
17543
17544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17545
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017546# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017547{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17548echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017549
Martin v. Löwiseba40652007-08-30 20:10:57 +000017550# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017551if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017552 withval=$with_doc_strings;
17553fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017554
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017555
17556if test -z "$with_doc_strings"
17557then with_doc_strings="yes"
17558fi
17559if test "$with_doc_strings" != "no"
17560then
17561
17562cat >>confdefs.h <<\_ACEOF
17563#define WITH_DOC_STRINGS 1
17564_ACEOF
17565
17566fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017567{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17568echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017569
Neil Schemenauera35c6882001-02-27 04:45:05 +000017570# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017571{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17572echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017573
Martin v. Löwiseba40652007-08-30 20:10:57 +000017574# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017575if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017576 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017577if test "$withval" != no
17578then
17579
17580cat >>confdefs.h <<\_ACEOF
17581#define WITH_TSC 1
17582_ACEOF
17583
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017584 { echo "$as_me:$LINENO: result: yes" >&5
17585echo "${ECHO_T}yes" >&6; }
17586else { echo "$as_me:$LINENO: result: no" >&5
17587echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017588fi
17589else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017590 { echo "$as_me:$LINENO: result: no" >&5
17591echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017592fi
17593
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017594
17595# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017596{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17597echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017598
Martin v. Löwiseba40652007-08-30 20:10:57 +000017599# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017600if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017601 withval=$with_pymalloc;
17602fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017603
Neil Schemenauera35c6882001-02-27 04:45:05 +000017604
Neil Schemenauer16c22972002-03-22 15:34:49 +000017605if test -z "$with_pymalloc"
17606then with_pymalloc="yes"
17607fi
17608if test "$with_pymalloc" != "no"
17609then
Martin v. Löwis11437992002-04-12 09:54:03 +000017610
17611cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017612#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017613_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017614
17615fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017616{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17617echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017618
Barry Warsawef82cd72000-06-30 16:21:01 +000017619# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017620{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17621echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017622
Martin v. Löwiseba40652007-08-30 20:10:57 +000017623# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017624if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017625 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017626if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017627then
17628
17629cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017630#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017631_ACEOF
17632
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017633 { echo "$as_me:$LINENO: result: yes" >&5
17634echo "${ECHO_T}yes" >&6; }
17635else { echo "$as_me:$LINENO: result: no" >&5
17636echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017637fi
17638else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017639 { echo "$as_me:$LINENO: result: no" >&5
17640echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017641fi
17642
Barry Warsawef82cd72000-06-30 16:21:01 +000017643
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017644# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017645
Guido van Rossum98935bf2001-09-05 19:13:16 +000017646DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017647
Guido van Rossume97ee181999-12-20 21:27:22 +000017648# the dlopen() function means we might want to use dynload_shlib.o. some
17649# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017650
Thomas Wouters3a584202000-08-05 23:28:51 +000017651for ac_func in dlopen
17652do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017653as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17654{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17655echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017656if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017657 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017658else
Martin v. Löwis11437992002-04-12 09:54:03 +000017659 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017660/* confdefs.h. */
17661_ACEOF
17662cat confdefs.h >>conftest.$ac_ext
17663cat >>conftest.$ac_ext <<_ACEOF
17664/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017665/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17666 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17667#define $ac_func innocuous_$ac_func
17668
Guido van Rossume97ee181999-12-20 21:27:22 +000017669/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017670 which can conflict with char $ac_func (); below.
17671 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017672 <limits.h> exists even on freestanding compilers. */
17673
17674#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017675# include <limits.h>
17676#else
17677# include <assert.h>
17678#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017679
17680#undef $ac_func
17681
Martin v. Löwiseba40652007-08-30 20:10:57 +000017682/* Override any GCC internal prototype to avoid an error.
17683 Use char because int might match the return type of a GCC
17684 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017685#ifdef __cplusplus
17686extern "C"
17687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017688char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017689/* The GNU C library defines this for functions which it implements
17690 to always fail with ENOSYS. Some functions are actually named
17691 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017692#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017693choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017694#endif
17695
Skip Montanaro6dead952003-09-25 14:50:04 +000017696int
17697main ()
17698{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017699return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017700 ;
17701 return 0;
17702}
17703_ACEOF
17704rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017705if { (ac_try="$ac_link"
17706case "(($ac_try" in
17707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17708 *) ac_try_echo=$ac_try;;
17709esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017711 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017712 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017713 grep -v '^ *+' conftest.er1 >conftest.err
17714 rm -f conftest.er1
17715 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017717 (exit $ac_status); } && {
17718 test -z "$ac_c_werror_flag" ||
17719 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017720 } && test -s conftest$ac_exeext &&
17721 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017722 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017723else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017724 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017725sed 's/^/| /' conftest.$ac_ext >&5
17726
Martin v. Löwiseba40652007-08-30 20:10:57 +000017727 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017729
17730rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017731 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017732fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017733ac_res=`eval echo '${'$as_ac_var'}'`
17734 { echo "$as_me:$LINENO: result: $ac_res" >&5
17735echo "${ECHO_T}$ac_res" >&6; }
17736if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017737 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017738#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017739_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017740
Guido van Rossume97ee181999-12-20 21:27:22 +000017741fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017742done
Guido van Rossume97ee181999-12-20 21:27:22 +000017743
Michael W. Hudson54241132001-12-07 15:38:26 +000017744
Guido van Rossume97ee181999-12-20 21:27:22 +000017745# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17746# loading of modules.
17747
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017748{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17749echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017750if test -z "$DYNLOADFILE"
17751then
17752 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017753 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17754 if test "$ac_cv_func_dlopen" = yes
17755 then DYNLOADFILE="dynload_shlib.o"
17756 else DYNLOADFILE="dynload_aix.o"
17757 fi
17758 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017759 BeOS*) DYNLOADFILE="dynload_beos.o";;
17760 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000017761 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17762 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017763 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017764 *)
17765 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17766 # out any dynamic loading
17767 if test "$ac_cv_func_dlopen" = yes
17768 then DYNLOADFILE="dynload_shlib.o"
17769 else DYNLOADFILE="dynload_stub.o"
17770 fi
17771 ;;
17772 esac
17773fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017774{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17775echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017776if test "$DYNLOADFILE" != "dynload_stub.o"
17777then
Martin v. Löwis11437992002-04-12 09:54:03 +000017778
17779cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017780#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017781_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017782
17783fi
17784
Neil Schemenauer4e425612001-06-19 15:44:15 +000017785# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17786
Michael W. Hudson54241132001-12-07 15:38:26 +000017787
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017788{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17789echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017790if test -z "$MACHDEP_OBJS"
17791then
Jack Jansene578a632001-08-15 01:27:14 +000017792 MACHDEP_OBJS=$extra_machdep_objs
17793else
17794 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017795fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017796{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17797echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017798
Guido van Rossum627b2d71993-12-24 10:39:16 +000017799# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
Martin v. Löwisd6320502004-08-12 13:45:08 +000017871
Martin v. Löwisc3001752005-01-23 09:27:24 +000017872
17873
Neal Norwitz05a45592006-03-20 06:30:08 +000017874
17875
Martin v. Löwis382abef2007-02-19 10:55:19 +000017876
17877
Christian Heimes36281872007-11-30 21:11:28 +000017878
Martin v. Löwisaef18b12008-03-24 13:31:16 +000017879
17880
Jesse Noller355b1262009-04-02 00:03:28 +000017881
17882
17883
17884
Martin v. Löwisaef18b12008-03-24 13:31:16 +000017885for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17886 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017887 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000017888 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017889 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017890 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017891 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000017892 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17893 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000017894 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000017895 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017896 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000017897 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017898do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017899as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17900{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17901echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017902if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017903 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017904else
Martin v. Löwis11437992002-04-12 09:54:03 +000017905 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017906/* confdefs.h. */
17907_ACEOF
17908cat confdefs.h >>conftest.$ac_ext
17909cat >>conftest.$ac_ext <<_ACEOF
17910/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017911/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17912 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17913#define $ac_func innocuous_$ac_func
17914
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017915/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017916 which can conflict with char $ac_func (); below.
17917 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017918 <limits.h> exists even on freestanding compilers. */
17919
17920#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017921# include <limits.h>
17922#else
17923# include <assert.h>
17924#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017925
17926#undef $ac_func
17927
Martin v. Löwiseba40652007-08-30 20:10:57 +000017928/* Override any GCC internal prototype to avoid an error.
17929 Use char because int might match the return type of a GCC
17930 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017931#ifdef __cplusplus
17932extern "C"
17933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017934char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017935/* The GNU C library defines this for functions which it implements
17936 to always fail with ENOSYS. Some functions are actually named
17937 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017938#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017939choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017940#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017941
Skip Montanaro6dead952003-09-25 14:50:04 +000017942int
17943main ()
17944{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017945return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017946 ;
17947 return 0;
17948}
17949_ACEOF
17950rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017951if { (ac_try="$ac_link"
17952case "(($ac_try" in
17953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17954 *) ac_try_echo=$ac_try;;
17955esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017957 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017959 grep -v '^ *+' conftest.er1 >conftest.err
17960 rm -f conftest.er1
17961 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017963 (exit $ac_status); } && {
17964 test -z "$ac_c_werror_flag" ||
17965 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017966 } && test -s conftest$ac_exeext &&
17967 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017968 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017969else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017971sed 's/^/| /' conftest.$ac_ext >&5
17972
Martin v. Löwiseba40652007-08-30 20:10:57 +000017973 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017974fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017975
17976rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017977 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017978fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017979ac_res=`eval echo '${'$as_ac_var'}'`
17980 { echo "$as_me:$LINENO: result: $ac_res" >&5
17981echo "${ECHO_T}$ac_res" >&6; }
17982if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017983 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017984#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017985_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017986
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017987fi
17988done
17989
Michael W. Hudson54241132001-12-07 15:38:26 +000017990
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017991# For some functions, having a definition is not sufficient, since
17992# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017993{ echo "$as_me:$LINENO: checking for chroot" >&5
17994echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017995cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017996/* confdefs.h. */
17997_ACEOF
17998cat confdefs.h >>conftest.$ac_ext
17999cat >>conftest.$ac_ext <<_ACEOF
18000/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018001#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018002int
18003main ()
18004{
18005void *x=chroot
18006 ;
18007 return 0;
18008}
18009_ACEOF
18010rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018011if { (ac_try="$ac_compile"
18012case "(($ac_try" in
18013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18014 *) ac_try_echo=$ac_try;;
18015esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018017 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018019 grep -v '^ *+' conftest.er1 >conftest.err
18020 rm -f conftest.er1
18021 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018023 (exit $ac_status); } && {
18024 test -z "$ac_c_werror_flag" ||
18025 test ! -s conftest.err
18026 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018027
18028cat >>confdefs.h <<\_ACEOF
18029#define HAVE_CHROOT 1
18030_ACEOF
18031
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018032 { echo "$as_me:$LINENO: result: yes" >&5
18033echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018034else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018035 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018036sed 's/^/| /' conftest.$ac_ext >&5
18037
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018038 { echo "$as_me:$LINENO: result: no" >&5
18039echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018040
18041fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018042
18043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018044{ echo "$as_me:$LINENO: checking for link" >&5
18045echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018046cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018047/* confdefs.h. */
18048_ACEOF
18049cat confdefs.h >>conftest.$ac_ext
18050cat >>conftest.$ac_ext <<_ACEOF
18051/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018052#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018053int
18054main ()
18055{
18056void *x=link
18057 ;
18058 return 0;
18059}
18060_ACEOF
18061rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018062if { (ac_try="$ac_compile"
18063case "(($ac_try" in
18064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18065 *) ac_try_echo=$ac_try;;
18066esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018068 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018069 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018070 grep -v '^ *+' conftest.er1 >conftest.err
18071 rm -f conftest.er1
18072 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018074 (exit $ac_status); } && {
18075 test -z "$ac_c_werror_flag" ||
18076 test ! -s conftest.err
18077 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018078
18079cat >>confdefs.h <<\_ACEOF
18080#define HAVE_LINK 1
18081_ACEOF
18082
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018083 { echo "$as_me:$LINENO: result: yes" >&5
18084echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018085else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018087sed 's/^/| /' conftest.$ac_ext >&5
18088
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018089 { echo "$as_me:$LINENO: result: no" >&5
18090echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018091
18092fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018093
18094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018095{ echo "$as_me:$LINENO: checking for symlink" >&5
18096echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018097cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018098/* confdefs.h. */
18099_ACEOF
18100cat confdefs.h >>conftest.$ac_ext
18101cat >>conftest.$ac_ext <<_ACEOF
18102/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018103#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018104int
18105main ()
18106{
18107void *x=symlink
18108 ;
18109 return 0;
18110}
18111_ACEOF
18112rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018113if { (ac_try="$ac_compile"
18114case "(($ac_try" in
18115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18116 *) ac_try_echo=$ac_try;;
18117esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018119 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018120 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018121 grep -v '^ *+' conftest.er1 >conftest.err
18122 rm -f conftest.er1
18123 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018125 (exit $ac_status); } && {
18126 test -z "$ac_c_werror_flag" ||
18127 test ! -s conftest.err
18128 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018129
18130cat >>confdefs.h <<\_ACEOF
18131#define HAVE_SYMLINK 1
18132_ACEOF
18133
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018134 { echo "$as_me:$LINENO: result: yes" >&5
18135echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018136else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018137 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018138sed 's/^/| /' conftest.$ac_ext >&5
18139
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018140 { echo "$as_me:$LINENO: result: no" >&5
18141echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018142
18143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018144
18145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018146{ echo "$as_me:$LINENO: checking for fchdir" >&5
18147echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018148cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018149/* confdefs.h. */
18150_ACEOF
18151cat confdefs.h >>conftest.$ac_ext
18152cat >>conftest.$ac_ext <<_ACEOF
18153/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018154#include <unistd.h>
18155int
18156main ()
18157{
18158void *x=fchdir
18159 ;
18160 return 0;
18161}
18162_ACEOF
18163rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018164if { (ac_try="$ac_compile"
18165case "(($ac_try" in
18166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18167 *) ac_try_echo=$ac_try;;
18168esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018170 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018172 grep -v '^ *+' conftest.er1 >conftest.err
18173 rm -f conftest.er1
18174 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018176 (exit $ac_status); } && {
18177 test -z "$ac_c_werror_flag" ||
18178 test ! -s conftest.err
18179 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018180
18181cat >>confdefs.h <<\_ACEOF
18182#define HAVE_FCHDIR 1
18183_ACEOF
18184
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018185 { echo "$as_me:$LINENO: result: yes" >&5
18186echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018187else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018189sed 's/^/| /' conftest.$ac_ext >&5
18190
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018191 { echo "$as_me:$LINENO: result: no" >&5
18192echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018193
18194fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018195
18196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018197{ echo "$as_me:$LINENO: checking for fsync" >&5
18198echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018199cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018200/* confdefs.h. */
18201_ACEOF
18202cat confdefs.h >>conftest.$ac_ext
18203cat >>conftest.$ac_ext <<_ACEOF
18204/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018205#include <unistd.h>
18206int
18207main ()
18208{
18209void *x=fsync
18210 ;
18211 return 0;
18212}
18213_ACEOF
18214rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018215if { (ac_try="$ac_compile"
18216case "(($ac_try" in
18217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18218 *) ac_try_echo=$ac_try;;
18219esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018221 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018222 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018223 grep -v '^ *+' conftest.er1 >conftest.err
18224 rm -f conftest.er1
18225 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018227 (exit $ac_status); } && {
18228 test -z "$ac_c_werror_flag" ||
18229 test ! -s conftest.err
18230 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018231
18232cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018233#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018234_ACEOF
18235
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018236 { echo "$as_me:$LINENO: result: yes" >&5
18237echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018238else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018240sed 's/^/| /' conftest.$ac_ext >&5
18241
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018242 { echo "$as_me:$LINENO: result: no" >&5
18243echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018244
18245fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018246
18247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018248{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18249echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018250cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018251/* confdefs.h. */
18252_ACEOF
18253cat confdefs.h >>conftest.$ac_ext
18254cat >>conftest.$ac_ext <<_ACEOF
18255/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018256#include <unistd.h>
18257int
18258main ()
18259{
18260void *x=fdatasync
18261 ;
18262 return 0;
18263}
18264_ACEOF
18265rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018266if { (ac_try="$ac_compile"
18267case "(($ac_try" in
18268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18269 *) ac_try_echo=$ac_try;;
18270esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018272 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018273 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018274 grep -v '^ *+' conftest.er1 >conftest.err
18275 rm -f conftest.er1
18276 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018278 (exit $ac_status); } && {
18279 test -z "$ac_c_werror_flag" ||
18280 test ! -s conftest.err
18281 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018282
18283cat >>confdefs.h <<\_ACEOF
18284#define HAVE_FDATASYNC 1
18285_ACEOF
18286
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018287 { echo "$as_me:$LINENO: result: yes" >&5
18288echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018289else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018291sed 's/^/| /' conftest.$ac_ext >&5
18292
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018293 { echo "$as_me:$LINENO: result: no" >&5
18294echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018295
18296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018297
18298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018299{ echo "$as_me:$LINENO: checking for epoll" >&5
18300echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018301cat >conftest.$ac_ext <<_ACEOF
18302/* confdefs.h. */
18303_ACEOF
18304cat confdefs.h >>conftest.$ac_ext
18305cat >>conftest.$ac_ext <<_ACEOF
18306/* end confdefs.h. */
18307#include <sys/epoll.h>
18308int
18309main ()
18310{
18311void *x=epoll_create
18312 ;
18313 return 0;
18314}
18315_ACEOF
18316rm -f conftest.$ac_objext
18317if { (ac_try="$ac_compile"
18318case "(($ac_try" in
18319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18320 *) ac_try_echo=$ac_try;;
18321esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018323 (eval "$ac_compile") 2>conftest.er1
18324 ac_status=$?
18325 grep -v '^ *+' conftest.er1 >conftest.err
18326 rm -f conftest.er1
18327 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018329 (exit $ac_status); } && {
18330 test -z "$ac_c_werror_flag" ||
18331 test ! -s conftest.err
18332 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018333
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018334cat >>confdefs.h <<\_ACEOF
18335#define HAVE_EPOLL 1
18336_ACEOF
18337
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018338 { echo "$as_me:$LINENO: result: yes" >&5
18339echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018340else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018341 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018342sed 's/^/| /' conftest.$ac_ext >&5
18343
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018344 { echo "$as_me:$LINENO: result: no" >&5
18345echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018346
18347fi
18348
18349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018350{ echo "$as_me:$LINENO: checking for kqueue" >&5
18351echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018352cat >conftest.$ac_ext <<_ACEOF
18353/* confdefs.h. */
18354_ACEOF
18355cat confdefs.h >>conftest.$ac_ext
18356cat >>conftest.$ac_ext <<_ACEOF
18357/* end confdefs.h. */
18358
18359#include <sys/types.h>
18360#include <sys/event.h>
18361
18362int
18363main ()
18364{
18365int x=kqueue()
18366 ;
18367 return 0;
18368}
18369_ACEOF
18370rm -f conftest.$ac_objext
18371if { (ac_try="$ac_compile"
18372case "(($ac_try" in
18373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18374 *) ac_try_echo=$ac_try;;
18375esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018377 (eval "$ac_compile") 2>conftest.er1
18378 ac_status=$?
18379 grep -v '^ *+' conftest.er1 >conftest.err
18380 rm -f conftest.er1
18381 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018383 (exit $ac_status); } && {
18384 test -z "$ac_c_werror_flag" ||
18385 test ! -s conftest.err
18386 } && test -s conftest.$ac_objext; then
18387
18388cat >>confdefs.h <<\_ACEOF
18389#define HAVE_KQUEUE 1
18390_ACEOF
18391
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018392 { echo "$as_me:$LINENO: result: yes" >&5
18393echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018394else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018395 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018396sed 's/^/| /' conftest.$ac_ext >&5
18397
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018398 { echo "$as_me:$LINENO: result: no" >&5
18399echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018400
18401fi
18402
18403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018404# On some systems (eg. FreeBSD 5), we would find a definition of the
18405# functions ctermid_r, setgroups in the library, but no prototype
18406# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18407# address to avoid compiler warnings and potential miscompilations
18408# because of the missing prototypes.
18409
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018410{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18411echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018412cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018413/* confdefs.h. */
18414_ACEOF
18415cat confdefs.h >>conftest.$ac_ext
18416cat >>conftest.$ac_ext <<_ACEOF
18417/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018418
18419#include "confdefs.h"
18420#include <stdio.h>
18421
Martin v. Löwisd5843682002-11-21 20:41:28 +000018422int
18423main ()
18424{
18425void* p = ctermid_r
18426 ;
18427 return 0;
18428}
18429_ACEOF
18430rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018431if { (ac_try="$ac_compile"
18432case "(($ac_try" in
18433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18434 *) ac_try_echo=$ac_try;;
18435esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018437 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018439 grep -v '^ *+' conftest.er1 >conftest.err
18440 rm -f conftest.er1
18441 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018443 (exit $ac_status); } && {
18444 test -z "$ac_c_werror_flag" ||
18445 test ! -s conftest.err
18446 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018447
18448cat >>confdefs.h <<\_ACEOF
18449#define HAVE_CTERMID_R 1
18450_ACEOF
18451
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018452 { echo "$as_me:$LINENO: result: yes" >&5
18453echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018454else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018456sed 's/^/| /' conftest.$ac_ext >&5
18457
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018458 { echo "$as_me:$LINENO: result: no" >&5
18459echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018460
18461fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018462
Martin v. Löwiseba40652007-08-30 20:10:57 +000018463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18464
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018465{ echo "$as_me:$LINENO: checking for flock" >&5
18466echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018467cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018468/* confdefs.h. */
18469_ACEOF
18470cat confdefs.h >>conftest.$ac_ext
18471cat >>conftest.$ac_ext <<_ACEOF
18472/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018473
18474#include "confdefs.h"
18475#include <sys/file.h>
18476
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018477int
18478main ()
18479{
18480void* p = flock
18481 ;
18482 return 0;
18483}
18484_ACEOF
18485rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018486if { (ac_try="$ac_compile"
18487case "(($ac_try" in
18488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18489 *) ac_try_echo=$ac_try;;
18490esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018492 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018493 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018494 grep -v '^ *+' conftest.er1 >conftest.err
18495 rm -f conftest.er1
18496 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018498 (exit $ac_status); } && {
18499 test -z "$ac_c_werror_flag" ||
18500 test ! -s conftest.err
18501 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018502
18503cat >>confdefs.h <<\_ACEOF
18504#define HAVE_FLOCK 1
18505_ACEOF
18506
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018507 { echo "$as_me:$LINENO: result: yes" >&5
18508echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018509else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018511sed 's/^/| /' conftest.$ac_ext >&5
18512
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018513 { echo "$as_me:$LINENO: result: no" >&5
18514echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018515
18516fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018517
Martin v. Löwiseba40652007-08-30 20:10:57 +000018518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18519
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018520{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18521echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018522cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018523/* confdefs.h. */
18524_ACEOF
18525cat confdefs.h >>conftest.$ac_ext
18526cat >>conftest.$ac_ext <<_ACEOF
18527/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018528
18529#include "confdefs.h"
18530#include <unistd.h>
18531
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018532int
18533main ()
18534{
18535void* p = getpagesize
18536 ;
18537 return 0;
18538}
18539_ACEOF
18540rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018541if { (ac_try="$ac_compile"
18542case "(($ac_try" in
18543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18544 *) ac_try_echo=$ac_try;;
18545esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018547 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018548 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018549 grep -v '^ *+' conftest.er1 >conftest.err
18550 rm -f conftest.er1
18551 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018553 (exit $ac_status); } && {
18554 test -z "$ac_c_werror_flag" ||
18555 test ! -s conftest.err
18556 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018557
18558cat >>confdefs.h <<\_ACEOF
18559#define HAVE_GETPAGESIZE 1
18560_ACEOF
18561
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018562 { echo "$as_me:$LINENO: result: yes" >&5
18563echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018564else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018566sed 's/^/| /' conftest.$ac_ext >&5
18567
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018568 { echo "$as_me:$LINENO: result: no" >&5
18569echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018570
18571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018572
18573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018574
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018575for ac_prog in true
18576do
18577 # Extract the first word of "$ac_prog", so it can be a program name with args.
18578set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018579{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18580echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018581if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018582 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018583else
18584 if test -n "$TRUE"; then
18585 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18586else
18587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18588for as_dir in $PATH
18589do
18590 IFS=$as_save_IFS
18591 test -z "$as_dir" && as_dir=.
18592 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018593 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 +000018594 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018595 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018596 break 2
18597 fi
18598done
18599done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018600IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018601
18602fi
18603fi
18604TRUE=$ac_cv_prog_TRUE
18605if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018606 { echo "$as_me:$LINENO: result: $TRUE" >&5
18607echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018608else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018609 { echo "$as_me:$LINENO: result: no" >&5
18610echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018611fi
18612
Martin v. Löwiseba40652007-08-30 20:10:57 +000018613
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018614 test -n "$TRUE" && break
18615done
18616test -n "$TRUE" || TRUE="/bin/true"
18617
18618
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018619{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18620echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018621if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018622 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018623else
18624 ac_check_lib_save_LIBS=$LIBS
18625LIBS="-lc $LIBS"
18626cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018627/* confdefs.h. */
18628_ACEOF
18629cat confdefs.h >>conftest.$ac_ext
18630cat >>conftest.$ac_ext <<_ACEOF
18631/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018632
Martin v. Löwiseba40652007-08-30 20:10:57 +000018633/* Override any GCC internal prototype to avoid an error.
18634 Use char because int might match the return type of a GCC
18635 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018636#ifdef __cplusplus
18637extern "C"
18638#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018639char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018640int
18641main ()
18642{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018643return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018644 ;
18645 return 0;
18646}
18647_ACEOF
18648rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018649if { (ac_try="$ac_link"
18650case "(($ac_try" in
18651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18652 *) ac_try_echo=$ac_try;;
18653esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018655 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018657 grep -v '^ *+' conftest.er1 >conftest.err
18658 rm -f conftest.er1
18659 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018661 (exit $ac_status); } && {
18662 test -z "$ac_c_werror_flag" ||
18663 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018664 } && test -s conftest$ac_exeext &&
18665 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018666 ac_cv_lib_c_inet_aton=yes
18667else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018669sed 's/^/| /' conftest.$ac_ext >&5
18670
Martin v. Löwiseba40652007-08-30 20:10:57 +000018671 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018672fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018673
18674rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018675 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018676LIBS=$ac_check_lib_save_LIBS
18677fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018678{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18679echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18680if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018681 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018682else
18683
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018684{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18685echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018686if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018687 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018688else
18689 ac_check_lib_save_LIBS=$LIBS
18690LIBS="-lresolv $LIBS"
18691cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018692/* confdefs.h. */
18693_ACEOF
18694cat confdefs.h >>conftest.$ac_ext
18695cat >>conftest.$ac_ext <<_ACEOF
18696/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018697
Martin v. Löwiseba40652007-08-30 20:10:57 +000018698/* Override any GCC internal prototype to avoid an error.
18699 Use char because int might match the return type of a GCC
18700 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018701#ifdef __cplusplus
18702extern "C"
18703#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018704char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018705int
18706main ()
18707{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018708return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018709 ;
18710 return 0;
18711}
18712_ACEOF
18713rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018714if { (ac_try="$ac_link"
18715case "(($ac_try" in
18716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18717 *) ac_try_echo=$ac_try;;
18718esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018720 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018721 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018722 grep -v '^ *+' conftest.er1 >conftest.err
18723 rm -f conftest.er1
18724 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018726 (exit $ac_status); } && {
18727 test -z "$ac_c_werror_flag" ||
18728 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018729 } && test -s conftest$ac_exeext &&
18730 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018731 ac_cv_lib_resolv_inet_aton=yes
18732else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018734sed 's/^/| /' conftest.$ac_ext >&5
18735
Martin v. Löwiseba40652007-08-30 20:10:57 +000018736 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018737fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018738
18739rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018740 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018741LIBS=$ac_check_lib_save_LIBS
18742fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018743{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18744echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18745if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018746 cat >>confdefs.h <<_ACEOF
18747#define HAVE_LIBRESOLV 1
18748_ACEOF
18749
18750 LIBS="-lresolv $LIBS"
18751
18752fi
18753
18754
18755fi
18756
18757
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018758# On Tru64, chflags seems to be present, but calling it will
18759# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018760{ echo "$as_me:$LINENO: checking for chflags" >&5
18761echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018762if test "${ac_cv_have_chflags+set}" = set; then
18763 echo $ECHO_N "(cached) $ECHO_C" >&6
18764else
18765 if test "$cross_compiling" = yes; then
18766 ac_cv_have_chflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018767else
18768 cat >conftest.$ac_ext <<_ACEOF
18769/* confdefs.h. */
18770_ACEOF
18771cat confdefs.h >>conftest.$ac_ext
18772cat >>conftest.$ac_ext <<_ACEOF
18773/* end confdefs.h. */
18774
18775#include <sys/stat.h>
18776#include <unistd.h>
18777int main(int argc, char*argv[])
18778{
18779 if(chflags(argv[0], 0) != 0)
18780 return 1;
18781 return 0;
18782}
18783
18784_ACEOF
18785rm -f conftest$ac_exeext
18786if { (ac_try="$ac_link"
18787case "(($ac_try" in
18788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18789 *) ac_try_echo=$ac_try;;
18790esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018792 (eval "$ac_link") 2>&5
18793 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018795 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18796 { (case "(($ac_try" in
18797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18798 *) ac_try_echo=$ac_try;;
18799esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018801 (eval "$ac_try") 2>&5
18802 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018804 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018805 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018806else
18807 echo "$as_me: program exited with status $ac_status" >&5
18808echo "$as_me: failed program was:" >&5
18809sed 's/^/| /' conftest.$ac_ext >&5
18810
18811( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018812ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018813fi
18814rm -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 +000018815fi
18816
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018817
18818
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018819fi
18820
18821{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18822echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
18823if test $ac_cv_have_chflags = yes
18824then
18825
18826cat >>confdefs.h <<\_ACEOF
18827#define HAVE_CHFLAGS 1
18828_ACEOF
18829
18830fi
18831
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018832{ echo "$as_me:$LINENO: checking for lchflags" >&5
18833echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018834if test "${ac_cv_have_lchflags+set}" = set; then
18835 echo $ECHO_N "(cached) $ECHO_C" >&6
18836else
18837 if test "$cross_compiling" = yes; then
18838 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018839else
18840 cat >conftest.$ac_ext <<_ACEOF
18841/* confdefs.h. */
18842_ACEOF
18843cat confdefs.h >>conftest.$ac_ext
18844cat >>conftest.$ac_ext <<_ACEOF
18845/* end confdefs.h. */
18846
18847#include <sys/stat.h>
18848#include <unistd.h>
18849int main(int argc, char*argv[])
18850{
18851 if(lchflags(argv[0], 0) != 0)
18852 return 1;
18853 return 0;
18854}
18855
18856_ACEOF
18857rm -f conftest$ac_exeext
18858if { (ac_try="$ac_link"
18859case "(($ac_try" in
18860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18861 *) ac_try_echo=$ac_try;;
18862esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018864 (eval "$ac_link") 2>&5
18865 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018867 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18868 { (case "(($ac_try" in
18869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18870 *) ac_try_echo=$ac_try;;
18871esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018873 (eval "$ac_try") 2>&5
18874 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018876 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018877 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018878else
18879 echo "$as_me: program exited with status $ac_status" >&5
18880echo "$as_me: failed program was:" >&5
18881sed 's/^/| /' conftest.$ac_ext >&5
18882
18883( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018884ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018885fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018886rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18887fi
18888
18889
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018890
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018891fi
18892
18893{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18894echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
18895if test $ac_cv_have_lchflags = yes
18896then
18897
18898cat >>confdefs.h <<\_ACEOF
18899#define HAVE_LCHFLAGS 1
18900_ACEOF
18901
18902fi
18903
Ronald Oussorenf8752642006-07-06 10:13:35 +000018904case $ac_sys_system/$ac_sys_release in
18905Darwin/*)
18906 _CUR_CFLAGS="${CFLAGS}"
18907 _CUR_LDFLAGS="${LDFLAGS}"
18908 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18909 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18910 ;;
18911esac
18912
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018913{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18914echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018915if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018916 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018917else
18918 ac_check_lib_save_LIBS=$LIBS
18919LIBS="-lz $LIBS"
18920cat >conftest.$ac_ext <<_ACEOF
18921/* confdefs.h. */
18922_ACEOF
18923cat confdefs.h >>conftest.$ac_ext
18924cat >>conftest.$ac_ext <<_ACEOF
18925/* end confdefs.h. */
18926
Martin v. Löwiseba40652007-08-30 20:10:57 +000018927/* Override any GCC internal prototype to avoid an error.
18928 Use char because int might match the return type of a GCC
18929 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018930#ifdef __cplusplus
18931extern "C"
18932#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018933char inflateCopy ();
18934int
18935main ()
18936{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018937return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018938 ;
18939 return 0;
18940}
18941_ACEOF
18942rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018943if { (ac_try="$ac_link"
18944case "(($ac_try" in
18945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18946 *) ac_try_echo=$ac_try;;
18947esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018949 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018950 ac_status=$?
18951 grep -v '^ *+' conftest.er1 >conftest.err
18952 rm -f conftest.er1
18953 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018955 (exit $ac_status); } && {
18956 test -z "$ac_c_werror_flag" ||
18957 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018958 } && test -s conftest$ac_exeext &&
18959 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018960 ac_cv_lib_z_inflateCopy=yes
18961else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018962 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018963sed 's/^/| /' conftest.$ac_ext >&5
18964
Martin v. Löwiseba40652007-08-30 20:10:57 +000018965 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018967
18968rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018969 conftest$ac_exeext conftest.$ac_ext
18970LIBS=$ac_check_lib_save_LIBS
18971fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018972{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18973echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18974if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018975
18976cat >>confdefs.h <<\_ACEOF
18977#define HAVE_ZLIB_COPY 1
18978_ACEOF
18979
18980fi
18981
18982
Ronald Oussorenf8752642006-07-06 10:13:35 +000018983case $ac_sys_system/$ac_sys_release in
18984Darwin/*)
18985 CFLAGS="${_CUR_CFLAGS}"
18986 LDFLAGS="${_CUR_LDFLAGS}"
18987 ;;
18988esac
18989
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018990{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18991echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018992cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018993/* confdefs.h. */
18994_ACEOF
18995cat confdefs.h >>conftest.$ac_ext
18996cat >>conftest.$ac_ext <<_ACEOF
18997/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018998
18999#include "confdefs.h"
19000#include <netdb.h>
19001
Martin v. Löwise9416172003-05-03 10:12:45 +000019002int
19003main ()
19004{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019005void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019006 ;
19007 return 0;
19008}
19009_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019010rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019011if { (ac_try="$ac_link"
19012case "(($ac_try" in
19013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19014 *) ac_try_echo=$ac_try;;
19015esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019017 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019019 grep -v '^ *+' conftest.er1 >conftest.err
19020 rm -f conftest.er1
19021 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019023 (exit $ac_status); } && {
19024 test -z "$ac_c_werror_flag" ||
19025 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019026 } && test -s conftest$ac_exeext &&
19027 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019028
19029cat >>confdefs.h <<\_ACEOF
19030#define HAVE_HSTRERROR 1
19031_ACEOF
19032
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019033 { echo "$as_me:$LINENO: result: yes" >&5
19034echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019035else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019037sed 's/^/| /' conftest.$ac_ext >&5
19038
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019039 { echo "$as_me:$LINENO: result: no" >&5
19040echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019041
19042fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019043
19044rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019045 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019046
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019047{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19048echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019049cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019050/* confdefs.h. */
19051_ACEOF
19052cat confdefs.h >>conftest.$ac_ext
19053cat >>conftest.$ac_ext <<_ACEOF
19054/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019055
19056#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019057#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019058#include <sys/socket.h>
19059#include <netinet/in.h>
19060#include <arpa/inet.h>
19061
Martin v. Löwise9416172003-05-03 10:12:45 +000019062int
19063main ()
19064{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019065void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019066 ;
19067 return 0;
19068}
19069_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019070rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019071if { (ac_try="$ac_link"
19072case "(($ac_try" in
19073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19074 *) ac_try_echo=$ac_try;;
19075esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019077 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019078 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019079 grep -v '^ *+' conftest.er1 >conftest.err
19080 rm -f conftest.er1
19081 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019083 (exit $ac_status); } && {
19084 test -z "$ac_c_werror_flag" ||
19085 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019086 } && test -s conftest$ac_exeext &&
19087 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019088
19089cat >>confdefs.h <<\_ACEOF
19090#define HAVE_INET_ATON 1
19091_ACEOF
19092
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019093 { echo "$as_me:$LINENO: result: yes" >&5
19094echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019095else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019096 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019097sed 's/^/| /' conftest.$ac_ext >&5
19098
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019099 { echo "$as_me:$LINENO: result: no" >&5
19100echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019101
19102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019103
19104rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019105 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019106
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019107{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19108echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019109cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019110/* confdefs.h. */
19111_ACEOF
19112cat confdefs.h >>conftest.$ac_ext
19113cat >>conftest.$ac_ext <<_ACEOF
19114/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019115
19116#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019117#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019118#include <sys/socket.h>
19119#include <netinet/in.h>
19120#include <arpa/inet.h>
19121
Martin v. Löwise9416172003-05-03 10:12:45 +000019122int
19123main ()
19124{
19125void* p = inet_pton
19126 ;
19127 return 0;
19128}
19129_ACEOF
19130rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019131if { (ac_try="$ac_compile"
19132case "(($ac_try" in
19133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19134 *) ac_try_echo=$ac_try;;
19135esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019137 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019138 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019139 grep -v '^ *+' conftest.er1 >conftest.err
19140 rm -f conftest.er1
19141 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019143 (exit $ac_status); } && {
19144 test -z "$ac_c_werror_flag" ||
19145 test ! -s conftest.err
19146 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019147
19148cat >>confdefs.h <<\_ACEOF
19149#define HAVE_INET_PTON 1
19150_ACEOF
19151
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019152 { echo "$as_me:$LINENO: result: yes" >&5
19153echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019154else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019156sed 's/^/| /' conftest.$ac_ext >&5
19157
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019158 { echo "$as_me:$LINENO: result: no" >&5
19159echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019160
19161fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019162
19163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019164
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019165# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019166{ echo "$as_me:$LINENO: checking for setgroups" >&5
19167echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019168cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019169/* confdefs.h. */
19170_ACEOF
19171cat confdefs.h >>conftest.$ac_ext
19172cat >>conftest.$ac_ext <<_ACEOF
19173/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019174
19175#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019176#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019177#ifdef HAVE_GRP_H
19178#include <grp.h>
19179#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019180
Martin v. Löwisd5843682002-11-21 20:41:28 +000019181int
19182main ()
19183{
19184void* p = setgroups
19185 ;
19186 return 0;
19187}
19188_ACEOF
19189rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019190if { (ac_try="$ac_compile"
19191case "(($ac_try" in
19192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19193 *) ac_try_echo=$ac_try;;
19194esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019196 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019198 grep -v '^ *+' conftest.er1 >conftest.err
19199 rm -f conftest.er1
19200 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019202 (exit $ac_status); } && {
19203 test -z "$ac_c_werror_flag" ||
19204 test ! -s conftest.err
19205 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019206
19207cat >>confdefs.h <<\_ACEOF
19208#define HAVE_SETGROUPS 1
19209_ACEOF
19210
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019211 { echo "$as_me:$LINENO: result: yes" >&5
19212echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019213else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019215sed 's/^/| /' conftest.$ac_ext >&5
19216
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019217 { echo "$as_me:$LINENO: result: no" >&5
19218echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019219
19220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019221
19222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019223
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019224# check for openpty and forkpty
19225
Martin v. Löwis11437992002-04-12 09:54:03 +000019226
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019227for ac_func in openpty
19228do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019229as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19230{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19231echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019232if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019233 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019234else
Martin v. Löwis11437992002-04-12 09:54:03 +000019235 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019236/* confdefs.h. */
19237_ACEOF
19238cat confdefs.h >>conftest.$ac_ext
19239cat >>conftest.$ac_ext <<_ACEOF
19240/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019241/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19242 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19243#define $ac_func innocuous_$ac_func
19244
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019245/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019246 which can conflict with char $ac_func (); below.
19247 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019248 <limits.h> exists even on freestanding compilers. */
19249
19250#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019251# include <limits.h>
19252#else
19253# include <assert.h>
19254#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019255
19256#undef $ac_func
19257
Martin v. Löwiseba40652007-08-30 20:10:57 +000019258/* Override any GCC internal prototype to avoid an error.
19259 Use char because int might match the return type of a GCC
19260 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019261#ifdef __cplusplus
19262extern "C"
19263#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019264char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019265/* The GNU C library defines this for functions which it implements
19266 to always fail with ENOSYS. Some functions are actually named
19267 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019268#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019269choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019270#endif
19271
Skip Montanaro6dead952003-09-25 14:50:04 +000019272int
19273main ()
19274{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019275return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019276 ;
19277 return 0;
19278}
19279_ACEOF
19280rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019281if { (ac_try="$ac_link"
19282case "(($ac_try" in
19283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19284 *) ac_try_echo=$ac_try;;
19285esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019287 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019288 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019289 grep -v '^ *+' conftest.er1 >conftest.err
19290 rm -f conftest.er1
19291 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019293 (exit $ac_status); } && {
19294 test -z "$ac_c_werror_flag" ||
19295 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019296 } && test -s conftest$ac_exeext &&
19297 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019298 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019299else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019300 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019301sed 's/^/| /' conftest.$ac_ext >&5
19302
Martin v. Löwiseba40652007-08-30 20:10:57 +000019303 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019304fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019305
19306rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019307 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019308fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019309ac_res=`eval echo '${'$as_ac_var'}'`
19310 { echo "$as_me:$LINENO: result: $ac_res" >&5
19311echo "${ECHO_T}$ac_res" >&6; }
19312if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019313 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019314#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019315_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019316
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019317else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019318 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19319echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019320if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019321 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019322else
Martin v. Löwis11437992002-04-12 09:54:03 +000019323 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019324LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019325cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019326/* confdefs.h. */
19327_ACEOF
19328cat confdefs.h >>conftest.$ac_ext
19329cat >>conftest.$ac_ext <<_ACEOF
19330/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019331
Martin v. Löwiseba40652007-08-30 20:10:57 +000019332/* Override any GCC internal prototype to avoid an error.
19333 Use char because int might match the return type of a GCC
19334 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019335#ifdef __cplusplus
19336extern "C"
19337#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019338char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019339int
19340main ()
19341{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019342return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019343 ;
19344 return 0;
19345}
19346_ACEOF
19347rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019348if { (ac_try="$ac_link"
19349case "(($ac_try" in
19350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19351 *) ac_try_echo=$ac_try;;
19352esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019354 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019355 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019356 grep -v '^ *+' conftest.er1 >conftest.err
19357 rm -f conftest.er1
19358 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019360 (exit $ac_status); } && {
19361 test -z "$ac_c_werror_flag" ||
19362 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019363 } && test -s conftest$ac_exeext &&
19364 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019365 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019366else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019368sed 's/^/| /' conftest.$ac_ext >&5
19369
Martin v. Löwiseba40652007-08-30 20:10:57 +000019370 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019371fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019372
19373rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019374 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019375LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019376fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019377{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19378echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19379if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019380 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019381#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019382_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019383 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019384else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019385 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19386echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019387if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019388 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019389else
19390 ac_check_lib_save_LIBS=$LIBS
19391LIBS="-lbsd $LIBS"
19392cat >conftest.$ac_ext <<_ACEOF
19393/* confdefs.h. */
19394_ACEOF
19395cat confdefs.h >>conftest.$ac_ext
19396cat >>conftest.$ac_ext <<_ACEOF
19397/* end confdefs.h. */
19398
Martin v. Löwiseba40652007-08-30 20:10:57 +000019399/* Override any GCC internal prototype to avoid an error.
19400 Use char because int might match the return type of a GCC
19401 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019402#ifdef __cplusplus
19403extern "C"
19404#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019405char openpty ();
19406int
19407main ()
19408{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019409return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019410 ;
19411 return 0;
19412}
19413_ACEOF
19414rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019415if { (ac_try="$ac_link"
19416case "(($ac_try" in
19417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19418 *) ac_try_echo=$ac_try;;
19419esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019421 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019422 ac_status=$?
19423 grep -v '^ *+' conftest.er1 >conftest.err
19424 rm -f conftest.er1
19425 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019427 (exit $ac_status); } && {
19428 test -z "$ac_c_werror_flag" ||
19429 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019430 } && test -s conftest$ac_exeext &&
19431 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019432 ac_cv_lib_bsd_openpty=yes
19433else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019434 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019435sed 's/^/| /' conftest.$ac_ext >&5
19436
Martin v. Löwiseba40652007-08-30 20:10:57 +000019437 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019438fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019439
19440rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019441 conftest$ac_exeext conftest.$ac_ext
19442LIBS=$ac_check_lib_save_LIBS
19443fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019444{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19445echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19446if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019447 cat >>confdefs.h <<\_ACEOF
19448#define HAVE_OPENPTY 1
19449_ACEOF
19450 LIBS="$LIBS -lbsd"
19451fi
19452
19453
19454fi
19455
Fred Drake8cef4cf2000-06-28 16:40:38 +000019456
19457fi
19458done
19459
Martin v. Löwis11437992002-04-12 09:54:03 +000019460
Fred Drake8cef4cf2000-06-28 16:40:38 +000019461for ac_func in forkpty
19462do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019463as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19464{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19465echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019466if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019467 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019468else
Martin v. Löwis11437992002-04-12 09:54:03 +000019469 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019470/* confdefs.h. */
19471_ACEOF
19472cat confdefs.h >>conftest.$ac_ext
19473cat >>conftest.$ac_ext <<_ACEOF
19474/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019475/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19476 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19477#define $ac_func innocuous_$ac_func
19478
Fred Drake8cef4cf2000-06-28 16:40:38 +000019479/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019480 which can conflict with char $ac_func (); below.
19481 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019482 <limits.h> exists even on freestanding compilers. */
19483
19484#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019485# include <limits.h>
19486#else
19487# include <assert.h>
19488#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019489
19490#undef $ac_func
19491
Martin v. Löwiseba40652007-08-30 20:10:57 +000019492/* Override any GCC internal prototype to avoid an error.
19493 Use char because int might match the return type of a GCC
19494 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019495#ifdef __cplusplus
19496extern "C"
19497#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019498char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019499/* The GNU C library defines this for functions which it implements
19500 to always fail with ENOSYS. Some functions are actually named
19501 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019502#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019503choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019504#endif
19505
Skip Montanaro6dead952003-09-25 14:50:04 +000019506int
19507main ()
19508{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019509return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019510 ;
19511 return 0;
19512}
19513_ACEOF
19514rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019515if { (ac_try="$ac_link"
19516case "(($ac_try" in
19517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19518 *) ac_try_echo=$ac_try;;
19519esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019521 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019522 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019523 grep -v '^ *+' conftest.er1 >conftest.err
19524 rm -f conftest.er1
19525 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019527 (exit $ac_status); } && {
19528 test -z "$ac_c_werror_flag" ||
19529 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019530 } && test -s conftest$ac_exeext &&
19531 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019532 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019533else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019535sed 's/^/| /' conftest.$ac_ext >&5
19536
Martin v. Löwiseba40652007-08-30 20:10:57 +000019537 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019539
19540rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019541 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019542fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019543ac_res=`eval echo '${'$as_ac_var'}'`
19544 { echo "$as_me:$LINENO: result: $ac_res" >&5
19545echo "${ECHO_T}$ac_res" >&6; }
19546if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019547 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019548#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019549_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019550
Fred Drake8cef4cf2000-06-28 16:40:38 +000019551else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019552 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19553echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019554if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019555 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019556else
Martin v. Löwis11437992002-04-12 09:54:03 +000019557 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019558LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019559cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019560/* confdefs.h. */
19561_ACEOF
19562cat confdefs.h >>conftest.$ac_ext
19563cat >>conftest.$ac_ext <<_ACEOF
19564/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019565
Martin v. Löwiseba40652007-08-30 20:10:57 +000019566/* Override any GCC internal prototype to avoid an error.
19567 Use char because int might match the return type of a GCC
19568 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019569#ifdef __cplusplus
19570extern "C"
19571#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019572char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019573int
19574main ()
19575{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019576return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019577 ;
19578 return 0;
19579}
19580_ACEOF
19581rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019582if { (ac_try="$ac_link"
19583case "(($ac_try" in
19584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19585 *) ac_try_echo=$ac_try;;
19586esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019588 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019589 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019590 grep -v '^ *+' conftest.er1 >conftest.err
19591 rm -f conftest.er1
19592 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019594 (exit $ac_status); } && {
19595 test -z "$ac_c_werror_flag" ||
19596 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019597 } && test -s conftest$ac_exeext &&
19598 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019599 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019600else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019601 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019602sed 's/^/| /' conftest.$ac_ext >&5
19603
Martin v. Löwiseba40652007-08-30 20:10:57 +000019604 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019605fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019606
19607rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019608 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019609LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019610fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019611{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19612echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19613if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019614 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019615#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019616_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019617 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019618else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019619 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19620echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019621if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019622 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019623else
19624 ac_check_lib_save_LIBS=$LIBS
19625LIBS="-lbsd $LIBS"
19626cat >conftest.$ac_ext <<_ACEOF
19627/* confdefs.h. */
19628_ACEOF
19629cat confdefs.h >>conftest.$ac_ext
19630cat >>conftest.$ac_ext <<_ACEOF
19631/* end confdefs.h. */
19632
Martin v. Löwiseba40652007-08-30 20:10:57 +000019633/* Override any GCC internal prototype to avoid an error.
19634 Use char because int might match the return type of a GCC
19635 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019636#ifdef __cplusplus
19637extern "C"
19638#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019639char forkpty ();
19640int
19641main ()
19642{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019643return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019644 ;
19645 return 0;
19646}
19647_ACEOF
19648rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019649if { (ac_try="$ac_link"
19650case "(($ac_try" in
19651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19652 *) ac_try_echo=$ac_try;;
19653esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019655 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019656 ac_status=$?
19657 grep -v '^ *+' conftest.er1 >conftest.err
19658 rm -f conftest.er1
19659 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019661 (exit $ac_status); } && {
19662 test -z "$ac_c_werror_flag" ||
19663 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019664 } && test -s conftest$ac_exeext &&
19665 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019666 ac_cv_lib_bsd_forkpty=yes
19667else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019668 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019669sed 's/^/| /' conftest.$ac_ext >&5
19670
Martin v. Löwiseba40652007-08-30 20:10:57 +000019671 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019672fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019673
19674rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019675 conftest$ac_exeext conftest.$ac_ext
19676LIBS=$ac_check_lib_save_LIBS
19677fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019678{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19679echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19680if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019681 cat >>confdefs.h <<\_ACEOF
19682#define HAVE_FORKPTY 1
19683_ACEOF
19684 LIBS="$LIBS -lbsd"
19685fi
19686
19687
19688fi
19689
Fred Drake8cef4cf2000-06-28 16:40:38 +000019690
19691fi
19692done
19693
Jack Jansendd19cf82001-12-06 22:36:17 +000019694
Brett Cannonaa5778d2008-03-18 04:09:00 +000019695# Stuff for expat.
19696
19697for ac_func in memmove
19698do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019699as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19700{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19701echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000019702if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019703 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000019704else
19705 cat >conftest.$ac_ext <<_ACEOF
19706/* confdefs.h. */
19707_ACEOF
19708cat confdefs.h >>conftest.$ac_ext
19709cat >>conftest.$ac_ext <<_ACEOF
19710/* end confdefs.h. */
19711/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19712 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19713#define $ac_func innocuous_$ac_func
19714
19715/* System header to define __stub macros and hopefully few prototypes,
19716 which can conflict with char $ac_func (); below.
19717 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19718 <limits.h> exists even on freestanding compilers. */
19719
19720#ifdef __STDC__
19721# include <limits.h>
19722#else
19723# include <assert.h>
19724#endif
19725
19726#undef $ac_func
19727
19728/* Override any GCC internal prototype to avoid an error.
19729 Use char because int might match the return type of a GCC
19730 builtin and then its argument prototype would still apply. */
19731#ifdef __cplusplus
19732extern "C"
19733#endif
19734char $ac_func ();
19735/* The GNU C library defines this for functions which it implements
19736 to always fail with ENOSYS. Some functions are actually named
19737 something starting with __ and the normal name is an alias. */
19738#if defined __stub_$ac_func || defined __stub___$ac_func
19739choke me
19740#endif
19741
19742int
19743main ()
19744{
19745return $ac_func ();
19746 ;
19747 return 0;
19748}
19749_ACEOF
19750rm -f conftest.$ac_objext conftest$ac_exeext
19751if { (ac_try="$ac_link"
19752case "(($ac_try" in
19753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19754 *) ac_try_echo=$ac_try;;
19755esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019757 (eval "$ac_link") 2>conftest.er1
19758 ac_status=$?
19759 grep -v '^ *+' conftest.er1 >conftest.err
19760 rm -f conftest.er1
19761 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019763 (exit $ac_status); } && {
19764 test -z "$ac_c_werror_flag" ||
19765 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019766 } && test -s conftest$ac_exeext &&
19767 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000019768 eval "$as_ac_var=yes"
19769else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019770 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019771sed 's/^/| /' conftest.$ac_ext >&5
19772
19773 eval "$as_ac_var=no"
19774fi
19775
19776rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19777 conftest$ac_exeext conftest.$ac_ext
19778fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019779ac_res=`eval echo '${'$as_ac_var'}'`
19780 { echo "$as_me:$LINENO: result: $ac_res" >&5
19781echo "${ECHO_T}$ac_res" >&6; }
19782if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000019783 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019784#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000019785_ACEOF
19786
19787fi
19788done
19789
19790
Michael W. Hudson54241132001-12-07 15:38:26 +000019791# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019792
19793
19794
19795
19796
19797
Fred Drake8cef4cf2000-06-28 16:40:38 +000019798for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19799do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019800as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19801{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19802echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019803if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019804 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019805else
Martin v. Löwis11437992002-04-12 09:54:03 +000019806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019807/* confdefs.h. */
19808_ACEOF
19809cat confdefs.h >>conftest.$ac_ext
19810cat >>conftest.$ac_ext <<_ACEOF
19811/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019812/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19813 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19814#define $ac_func innocuous_$ac_func
19815
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019816/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019817 which can conflict with char $ac_func (); below.
19818 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019819 <limits.h> exists even on freestanding compilers. */
19820
19821#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019822# include <limits.h>
19823#else
19824# include <assert.h>
19825#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019826
19827#undef $ac_func
19828
Martin v. Löwiseba40652007-08-30 20:10:57 +000019829/* Override any GCC internal prototype to avoid an error.
19830 Use char because int might match the return type of a GCC
19831 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019832#ifdef __cplusplus
19833extern "C"
19834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019835char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019836/* The GNU C library defines this for functions which it implements
19837 to always fail with ENOSYS. Some functions are actually named
19838 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019839#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019840choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019841#endif
19842
Skip Montanaro6dead952003-09-25 14:50:04 +000019843int
19844main ()
19845{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019846return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019847 ;
19848 return 0;
19849}
19850_ACEOF
19851rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019852if { (ac_try="$ac_link"
19853case "(($ac_try" in
19854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19855 *) ac_try_echo=$ac_try;;
19856esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019858 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019859 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019860 grep -v '^ *+' conftest.er1 >conftest.err
19861 rm -f conftest.er1
19862 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019864 (exit $ac_status); } && {
19865 test -z "$ac_c_werror_flag" ||
19866 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019867 } && test -s conftest$ac_exeext &&
19868 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019869 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019870else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019872sed 's/^/| /' conftest.$ac_ext >&5
19873
Martin v. Löwiseba40652007-08-30 20:10:57 +000019874 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019875fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019876
19877rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019878 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019879fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019880ac_res=`eval echo '${'$as_ac_var'}'`
19881 { echo "$as_me:$LINENO: result: $ac_res" >&5
19882echo "${ECHO_T}$ac_res" >&6; }
19883if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019884 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019885#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019886_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019887
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019888fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019889done
19890
Michael W. Hudson54241132001-12-07 15:38:26 +000019891
Martin v. Löwis11437992002-04-12 09:54:03 +000019892
19893
19894
Brett Cannonaa5778d2008-03-18 04:09:00 +000019895for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019896do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019897as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19898{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19899echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019900if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019901 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019902else
Martin v. Löwis11437992002-04-12 09:54:03 +000019903 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019904/* confdefs.h. */
19905_ACEOF
19906cat confdefs.h >>conftest.$ac_ext
19907cat >>conftest.$ac_ext <<_ACEOF
19908/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019909/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19910 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19911#define $ac_func innocuous_$ac_func
19912
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019913/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019914 which can conflict with char $ac_func (); below.
19915 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019916 <limits.h> exists even on freestanding compilers. */
19917
19918#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019919# include <limits.h>
19920#else
19921# include <assert.h>
19922#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019923
19924#undef $ac_func
19925
Martin v. Löwiseba40652007-08-30 20:10:57 +000019926/* Override any GCC internal prototype to avoid an error.
19927 Use char because int might match the return type of a GCC
19928 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019929#ifdef __cplusplus
19930extern "C"
19931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019932char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019933/* The GNU C library defines this for functions which it implements
19934 to always fail with ENOSYS. Some functions are actually named
19935 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019936#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019937choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019938#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019939
Skip Montanaro6dead952003-09-25 14:50:04 +000019940int
19941main ()
19942{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019943return $ac_func ();
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 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +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 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +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öwis1142de32002-03-29 16:28:31 +000019976fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019977ac_res=`eval echo '${'$as_ac_var'}'`
19978 { echo "$as_me:$LINENO: result: $ac_res" >&5
19979echo "${ECHO_T}$ac_res" >&6; }
19980if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019981 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019982#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019983_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019984
Martin v. Löwis1142de32002-03-29 16:28:31 +000019985else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019986 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019987 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019988 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19989 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019990esac
19991
Martin v. Löwis1142de32002-03-29 16:28:31 +000019992fi
19993done
19994
19995
Martin v. Löwis11437992002-04-12 09:54:03 +000019996
Martin v. Löwis1142de32002-03-29 16:28:31 +000019997for ac_func in getpgrp
19998do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019999as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20000{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20001echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020002if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020003 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020004else
Martin v. Löwis11437992002-04-12 09:54:03 +000020005 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020006/* confdefs.h. */
20007_ACEOF
20008cat confdefs.h >>conftest.$ac_ext
20009cat >>conftest.$ac_ext <<_ACEOF
20010/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020011/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20012 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20013#define $ac_func innocuous_$ac_func
20014
Martin v. Löwis1142de32002-03-29 16:28:31 +000020015/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020016 which can conflict with char $ac_func (); below.
20017 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020018 <limits.h> exists even on freestanding compilers. */
20019
20020#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020021# include <limits.h>
20022#else
20023# include <assert.h>
20024#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020025
20026#undef $ac_func
20027
Martin v. Löwiseba40652007-08-30 20:10:57 +000020028/* Override any GCC internal prototype to avoid an error.
20029 Use char because int might match the return type of a GCC
20030 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020031#ifdef __cplusplus
20032extern "C"
20033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020034char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020035/* The GNU C library defines this for functions which it implements
20036 to always fail with ENOSYS. Some functions are actually named
20037 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020038#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020039choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020040#endif
20041
Skip Montanaro6dead952003-09-25 14:50:04 +000020042int
20043main ()
20044{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020045return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020046 ;
20047 return 0;
20048}
20049_ACEOF
20050rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020051if { (ac_try="$ac_link"
20052case "(($ac_try" in
20053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20054 *) ac_try_echo=$ac_try;;
20055esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020057 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020059 grep -v '^ *+' conftest.er1 >conftest.err
20060 rm -f conftest.er1
20061 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020063 (exit $ac_status); } && {
20064 test -z "$ac_c_werror_flag" ||
20065 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020066 } && test -s conftest$ac_exeext &&
20067 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020068 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020069else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020070 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020071sed 's/^/| /' conftest.$ac_ext >&5
20072
Martin v. Löwiseba40652007-08-30 20:10:57 +000020073 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020075
20076rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020077 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020078fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020079ac_res=`eval echo '${'$as_ac_var'}'`
20080 { echo "$as_me:$LINENO: result: $ac_res" >&5
20081echo "${ECHO_T}$ac_res" >&6; }
20082if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020083 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020084#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020085_ACEOF
20086 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020087/* confdefs.h. */
20088_ACEOF
20089cat confdefs.h >>conftest.$ac_ext
20090cat >>conftest.$ac_ext <<_ACEOF
20091/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020092#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020093int
20094main ()
20095{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020096getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020097 ;
20098 return 0;
20099}
20100_ACEOF
20101rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020102if { (ac_try="$ac_compile"
20103case "(($ac_try" in
20104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20105 *) ac_try_echo=$ac_try;;
20106esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020108 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020110 grep -v '^ *+' conftest.er1 >conftest.err
20111 rm -f conftest.er1
20112 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020114 (exit $ac_status); } && {
20115 test -z "$ac_c_werror_flag" ||
20116 test ! -s conftest.err
20117 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020118
20119cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020120#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020121_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020122
Martin v. Löwis11437992002-04-12 09:54:03 +000020123
Guido van Rossumf78abae1997-01-21 22:02:36 +000020124else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020125 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020126sed 's/^/| /' conftest.$ac_ext >&5
20127
Martin v. Löwiseba40652007-08-30 20:10:57 +000020128
Guido van Rossum627b2d71993-12-24 10:39:16 +000020129fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020130
20131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020132
Guido van Rossum627b2d71993-12-24 10:39:16 +000020133fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020134done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020135
Jack Jansen150753c2003-03-29 22:07:47 +000020136
20137for ac_func in setpgrp
20138do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020139as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20140{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20141echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020142if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020143 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020144else
Martin v. Löwis11437992002-04-12 09:54:03 +000020145 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020146/* confdefs.h. */
20147_ACEOF
20148cat confdefs.h >>conftest.$ac_ext
20149cat >>conftest.$ac_ext <<_ACEOF
20150/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020151/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20152 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20153#define $ac_func innocuous_$ac_func
20154
Jack Jansen150753c2003-03-29 22:07:47 +000020155/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020156 which can conflict with char $ac_func (); below.
20157 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020158 <limits.h> exists even on freestanding compilers. */
20159
20160#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020161# include <limits.h>
20162#else
20163# include <assert.h>
20164#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020165
20166#undef $ac_func
20167
Martin v. Löwiseba40652007-08-30 20:10:57 +000020168/* Override any GCC internal prototype to avoid an error.
20169 Use char because int might match the return type of a GCC
20170 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020171#ifdef __cplusplus
20172extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020173#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020174char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020175/* The GNU C library defines this for functions which it implements
20176 to always fail with ENOSYS. Some functions are actually named
20177 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020178#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020179choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020180#endif
20181
Skip Montanaro6dead952003-09-25 14:50:04 +000020182int
20183main ()
20184{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020185return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020186 ;
20187 return 0;
20188}
20189_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020190rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020191if { (ac_try="$ac_link"
20192case "(($ac_try" in
20193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20194 *) ac_try_echo=$ac_try;;
20195esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020197 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020198 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020199 grep -v '^ *+' conftest.er1 >conftest.err
20200 rm -f conftest.er1
20201 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020203 (exit $ac_status); } && {
20204 test -z "$ac_c_werror_flag" ||
20205 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020206 } && test -s conftest$ac_exeext &&
20207 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020208 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020209else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020211sed 's/^/| /' conftest.$ac_ext >&5
20212
Martin v. Löwiseba40652007-08-30 20:10:57 +000020213 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020215
20216rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020217 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020218fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020219ac_res=`eval echo '${'$as_ac_var'}'`
20220 { echo "$as_me:$LINENO: result: $ac_res" >&5
20221echo "${ECHO_T}$ac_res" >&6; }
20222if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020223 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020224#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020225_ACEOF
20226 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020227/* confdefs.h. */
20228_ACEOF
20229cat confdefs.h >>conftest.$ac_ext
20230cat >>conftest.$ac_ext <<_ACEOF
20231/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020232#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020233int
20234main ()
20235{
20236setpgrp(0,0);
20237 ;
20238 return 0;
20239}
20240_ACEOF
20241rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020242if { (ac_try="$ac_compile"
20243case "(($ac_try" in
20244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20245 *) ac_try_echo=$ac_try;;
20246esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020248 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020249 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020250 grep -v '^ *+' conftest.er1 >conftest.err
20251 rm -f conftest.er1
20252 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020254 (exit $ac_status); } && {
20255 test -z "$ac_c_werror_flag" ||
20256 test ! -s conftest.err
20257 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020258
20259cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020260#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020261_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020262
Jack Jansen150753c2003-03-29 22:07:47 +000020263
20264else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020266sed 's/^/| /' conftest.$ac_ext >&5
20267
Martin v. Löwiseba40652007-08-30 20:10:57 +000020268
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020270
20271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020272
20273fi
20274done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020275
Martin v. Löwis11437992002-04-12 09:54:03 +000020276
Thomas Wouters3a584202000-08-05 23:28:51 +000020277for ac_func in gettimeofday
20278do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020279as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20280{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20281echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020282if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020283 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020284else
Martin v. Löwis11437992002-04-12 09:54:03 +000020285 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020286/* confdefs.h. */
20287_ACEOF
20288cat confdefs.h >>conftest.$ac_ext
20289cat >>conftest.$ac_ext <<_ACEOF
20290/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020291/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20292 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20293#define $ac_func innocuous_$ac_func
20294
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020295/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020296 which can conflict with char $ac_func (); below.
20297 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020298 <limits.h> exists even on freestanding compilers. */
20299
20300#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020301# include <limits.h>
20302#else
20303# include <assert.h>
20304#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020305
20306#undef $ac_func
20307
Martin v. Löwiseba40652007-08-30 20:10:57 +000020308/* Override any GCC internal prototype to avoid an error.
20309 Use char because int might match the return type of a GCC
20310 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020311#ifdef __cplusplus
20312extern "C"
20313#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020314char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020315/* The GNU C library defines this for functions which it implements
20316 to always fail with ENOSYS. Some functions are actually named
20317 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020318#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020319choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020320#endif
20321
Skip Montanaro6dead952003-09-25 14:50:04 +000020322int
20323main ()
20324{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020325return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020326 ;
20327 return 0;
20328}
20329_ACEOF
20330rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020331if { (ac_try="$ac_link"
20332case "(($ac_try" in
20333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20334 *) ac_try_echo=$ac_try;;
20335esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020337 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020339 grep -v '^ *+' conftest.er1 >conftest.err
20340 rm -f conftest.er1
20341 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020343 (exit $ac_status); } && {
20344 test -z "$ac_c_werror_flag" ||
20345 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020346 } && test -s conftest$ac_exeext &&
20347 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020348 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020349else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020351sed 's/^/| /' conftest.$ac_ext >&5
20352
Martin v. Löwiseba40652007-08-30 20:10:57 +000020353 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020355
20356rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020357 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020358fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020359ac_res=`eval echo '${'$as_ac_var'}'`
20360 { echo "$as_me:$LINENO: result: $ac_res" >&5
20361echo "${ECHO_T}$ac_res" >&6; }
20362if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020363 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020364#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020365_ACEOF
20366 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020367/* confdefs.h. */
20368_ACEOF
20369cat confdefs.h >>conftest.$ac_ext
20370cat >>conftest.$ac_ext <<_ACEOF
20371/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020372#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020373int
20374main ()
20375{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020376gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020377 ;
20378 return 0;
20379}
20380_ACEOF
20381rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020382if { (ac_try="$ac_compile"
20383case "(($ac_try" in
20384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20385 *) ac_try_echo=$ac_try;;
20386esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020390 grep -v '^ *+' conftest.er1 >conftest.err
20391 rm -f conftest.er1
20392 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020394 (exit $ac_status); } && {
20395 test -z "$ac_c_werror_flag" ||
20396 test ! -s conftest.err
20397 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020398 :
20399else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020401sed 's/^/| /' conftest.$ac_ext >&5
20402
Martin v. Löwis11437992002-04-12 09:54:03 +000020403
20404cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020405#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020406_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020407
Martin v. Löwis11437992002-04-12 09:54:03 +000020408
Guido van Rossum627b2d71993-12-24 10:39:16 +000020409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020410
20411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020412
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020413fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020414done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020415
Michael W. Hudson54241132001-12-07 15:38:26 +000020416
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020417{ echo "$as_me:$LINENO: checking for major" >&5
20418echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020419cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020420/* confdefs.h. */
20421_ACEOF
20422cat confdefs.h >>conftest.$ac_ext
20423cat >>conftest.$ac_ext <<_ACEOF
20424/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020425
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020426#if defined(MAJOR_IN_MKDEV)
20427#include <sys/mkdev.h>
20428#elif defined(MAJOR_IN_SYSMACROS)
20429#include <sys/sysmacros.h>
20430#else
20431#include <sys/types.h>
20432#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020433
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020434int
20435main ()
20436{
20437
20438 makedev(major(0),minor(0));
20439
20440 ;
20441 return 0;
20442}
20443_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020444rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020445if { (ac_try="$ac_link"
20446case "(($ac_try" in
20447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20448 *) ac_try_echo=$ac_try;;
20449esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020451 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020452 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020453 grep -v '^ *+' conftest.er1 >conftest.err
20454 rm -f conftest.er1
20455 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020457 (exit $ac_status); } && {
20458 test -z "$ac_c_werror_flag" ||
20459 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020460 } && test -s conftest$ac_exeext &&
20461 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020462
20463
20464cat >>confdefs.h <<\_ACEOF
20465#define HAVE_DEVICE_MACROS 1
20466_ACEOF
20467
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020468 { echo "$as_me:$LINENO: result: yes" >&5
20469echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020470
20471else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020473sed 's/^/| /' conftest.$ac_ext >&5
20474
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020475
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020476 { echo "$as_me:$LINENO: result: no" >&5
20477echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020478
20479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020480
20481rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020482 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020483
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020484# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020485# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020486{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20487echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020488cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020489/* confdefs.h. */
20490_ACEOF
20491cat confdefs.h >>conftest.$ac_ext
20492cat >>conftest.$ac_ext <<_ACEOF
20493/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020494
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020495#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020496#include <sys/socket.h>
20497#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020498#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020499
Martin v. Löwis11437992002-04-12 09:54:03 +000020500int
20501main ()
20502{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020503getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020504 ;
20505 return 0;
20506}
20507_ACEOF
20508rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020509if { (ac_try="$ac_link"
20510case "(($ac_try" in
20511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20512 *) ac_try_echo=$ac_try;;
20513esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020515 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020516 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020517 grep -v '^ *+' conftest.er1 >conftest.err
20518 rm -f conftest.er1
20519 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020521 (exit $ac_status); } && {
20522 test -z "$ac_c_werror_flag" ||
20523 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020524 } && test -s conftest$ac_exeext &&
20525 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020526 have_getaddrinfo=yes
20527else
20528 echo "$as_me: failed program was:" >&5
20529sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020530
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020531 have_getaddrinfo=no
20532fi
20533
20534rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20535 conftest$ac_exeext conftest.$ac_ext
20536{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20537echo "${ECHO_T}$have_getaddrinfo" >&6; }
20538if test $have_getaddrinfo = yes
20539then
20540 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020541echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020542 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
20543 echo $ECHO_N "(cached) $ECHO_C" >&6
20544else
20545 if test "$cross_compiling" = yes; then
20546 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020547else
Martin v. Löwis11437992002-04-12 09:54:03 +000020548 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020549/* confdefs.h. */
20550_ACEOF
20551cat confdefs.h >>conftest.$ac_ext
20552cat >>conftest.$ac_ext <<_ACEOF
20553/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020554
20555#include <sys/types.h>
20556#include <netdb.h>
20557#include <string.h>
20558#include <sys/socket.h>
20559#include <netinet/in.h>
20560
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020561int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020562{
20563 int passive, gaierr, inet4 = 0, inet6 = 0;
20564 struct addrinfo hints, *ai, *aitop;
20565 char straddr[INET6_ADDRSTRLEN], strport[16];
20566
20567 for (passive = 0; passive <= 1; passive++) {
20568 memset(&hints, 0, sizeof(hints));
20569 hints.ai_family = AF_UNSPEC;
20570 hints.ai_flags = passive ? AI_PASSIVE : 0;
20571 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020572 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020573 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20574 (void)gai_strerror(gaierr);
20575 goto bad;
20576 }
20577 for (ai = aitop; ai; ai = ai->ai_next) {
20578 if (ai->ai_addr == NULL ||
20579 ai->ai_addrlen == 0 ||
20580 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20581 straddr, sizeof(straddr), strport, sizeof(strport),
20582 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20583 goto bad;
20584 }
20585 switch (ai->ai_family) {
20586 case AF_INET:
20587 if (strcmp(strport, "54321") != 0) {
20588 goto bad;
20589 }
20590 if (passive) {
20591 if (strcmp(straddr, "0.0.0.0") != 0) {
20592 goto bad;
20593 }
20594 } else {
20595 if (strcmp(straddr, "127.0.0.1") != 0) {
20596 goto bad;
20597 }
20598 }
20599 inet4++;
20600 break;
20601 case AF_INET6:
20602 if (strcmp(strport, "54321") != 0) {
20603 goto bad;
20604 }
20605 if (passive) {
20606 if (strcmp(straddr, "::") != 0) {
20607 goto bad;
20608 }
20609 } else {
20610 if (strcmp(straddr, "::1") != 0) {
20611 goto bad;
20612 }
20613 }
20614 inet6++;
20615 break;
20616 case AF_UNSPEC:
20617 goto bad;
20618 break;
20619 default:
20620 /* another family support? */
20621 break;
20622 }
20623 }
20624 }
20625
20626 if (!(inet4 == 0 || inet4 == 2))
20627 goto bad;
20628 if (!(inet6 == 0 || inet6 == 2))
20629 goto bad;
20630
20631 if (aitop)
20632 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020633 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020634
20635 bad:
20636 if (aitop)
20637 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020638 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020639}
20640
Martin v. Löwis11437992002-04-12 09:54:03 +000020641_ACEOF
20642rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020643if { (ac_try="$ac_link"
20644case "(($ac_try" in
20645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20646 *) ac_try_echo=$ac_try;;
20647esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020649 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020650 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020652 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000020653 { (case "(($ac_try" in
20654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20655 *) ac_try_echo=$ac_try;;
20656esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020658 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020659 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020661 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020662 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020663else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020664 echo "$as_me: program exited with status $ac_status" >&5
20665echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020666sed 's/^/| /' conftest.$ac_ext >&5
20667
Martin v. Löwis11437992002-04-12 09:54:03 +000020668( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020669ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020670fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020671rm -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 +000020672fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020673
20674
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020675fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020676
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020677fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020678
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020679if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20680then
20681 if test $ipv6 = yes
20682 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020683 echo 'Fatal: You must get working getaddrinfo() function.'
20684 echo ' or you can specify "--disable-ipv6"'.
20685 exit 1
20686 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020687else
Martin v. Löwis11437992002-04-12 09:54:03 +000020688
20689cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020690#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020691_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020692
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020693fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020694
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020695for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020696do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020697as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20698{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20699echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020700if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020701 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020702else
Martin v. Löwis11437992002-04-12 09:54:03 +000020703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020704/* confdefs.h. */
20705_ACEOF
20706cat confdefs.h >>conftest.$ac_ext
20707cat >>conftest.$ac_ext <<_ACEOF
20708/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020709/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20710 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20711#define $ac_func innocuous_$ac_func
20712
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020713/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020714 which can conflict with char $ac_func (); below.
20715 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020716 <limits.h> exists even on freestanding compilers. */
20717
20718#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020719# include <limits.h>
20720#else
20721# include <assert.h>
20722#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020723
20724#undef $ac_func
20725
Martin v. Löwiseba40652007-08-30 20:10:57 +000020726/* Override any GCC internal prototype to avoid an error.
20727 Use char because int might match the return type of a GCC
20728 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020729#ifdef __cplusplus
20730extern "C"
20731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020732char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020733/* The GNU C library defines this for functions which it implements
20734 to always fail with ENOSYS. Some functions are actually named
20735 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020736#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020737choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020738#endif
20739
Skip Montanaro6dead952003-09-25 14:50:04 +000020740int
20741main ()
20742{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020743return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020744 ;
20745 return 0;
20746}
20747_ACEOF
20748rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020749if { (ac_try="$ac_link"
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_link") 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
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020764 } && test -s conftest$ac_exeext &&
20765 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020766 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020767else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020769sed 's/^/| /' conftest.$ac_ext >&5
20770
Martin v. Löwiseba40652007-08-30 20:10:57 +000020771 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020772fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020773
20774rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020775 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020776fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020777ac_res=`eval echo '${'$as_ac_var'}'`
20778 { echo "$as_me:$LINENO: result: $ac_res" >&5
20779echo "${ECHO_T}$ac_res" >&6; }
20780if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020781 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020782#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020783_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020784
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020785fi
20786done
20787
Michael W. Hudson54241132001-12-07 15:38:26 +000020788
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020789# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020790{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20791echo $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 +000020792if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020793 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020794else
Martin v. Löwis11437992002-04-12 09:54:03 +000020795 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020796/* confdefs.h. */
20797_ACEOF
20798cat confdefs.h >>conftest.$ac_ext
20799cat >>conftest.$ac_ext <<_ACEOF
20800/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020801#include <sys/types.h>
20802#include <sys/time.h>
20803#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020804
Martin v. Löwis11437992002-04-12 09:54:03 +000020805int
20806main ()
20807{
20808if ((struct tm *) 0)
20809return 0;
20810 ;
20811 return 0;
20812}
20813_ACEOF
20814rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020815if { (ac_try="$ac_compile"
20816case "(($ac_try" in
20817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20818 *) ac_try_echo=$ac_try;;
20819esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020821 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020822 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020823 grep -v '^ *+' conftest.er1 >conftest.err
20824 rm -f conftest.er1
20825 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020827 (exit $ac_status); } && {
20828 test -z "$ac_c_werror_flag" ||
20829 test ! -s conftest.err
20830 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020831 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020832else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020833 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020834sed 's/^/| /' conftest.$ac_ext >&5
20835
Martin v. Löwiseba40652007-08-30 20:10:57 +000020836 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020837fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020838
20839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020840fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020841{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20842echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020843if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020844
20845cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020846#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020847_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020848
20849fi
20850
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020851{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20852echo $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 +000020853if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020854 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020855else
Martin v. Löwis11437992002-04-12 09:54:03 +000020856 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020857/* confdefs.h. */
20858_ACEOF
20859cat confdefs.h >>conftest.$ac_ext
20860cat >>conftest.$ac_ext <<_ACEOF
20861/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020862#include <sys/types.h>
20863#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020864
Martin v. Löwis11437992002-04-12 09:54:03 +000020865int
20866main ()
20867{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020868struct tm tm;
20869 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020870 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020871 ;
20872 return 0;
20873}
20874_ACEOF
20875rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020876if { (ac_try="$ac_compile"
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_compile") 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
20891 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020892 ac_cv_struct_tm=time.h
20893else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020895sed 's/^/| /' conftest.$ac_ext >&5
20896
Martin v. Löwiseba40652007-08-30 20:10:57 +000020897 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020898fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020899
20900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020901fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020902{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20903echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020904if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020905
20906cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020907#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020908_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020909
20910fi
20911
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020912{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20913echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020914if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020915 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020916else
Martin v. Löwis11437992002-04-12 09:54:03 +000020917 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020918/* confdefs.h. */
20919_ACEOF
20920cat confdefs.h >>conftest.$ac_ext
20921cat >>conftest.$ac_ext <<_ACEOF
20922/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020923#include <sys/types.h>
20924#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020925
20926
Martin v. Löwis11437992002-04-12 09:54:03 +000020927int
20928main ()
20929{
20930static struct tm ac_aggr;
20931if (ac_aggr.tm_zone)
20932return 0;
20933 ;
20934 return 0;
20935}
20936_ACEOF
20937rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020938if { (ac_try="$ac_compile"
20939case "(($ac_try" in
20940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20941 *) ac_try_echo=$ac_try;;
20942esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020944 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020945 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020946 grep -v '^ *+' conftest.er1 >conftest.err
20947 rm -f conftest.er1
20948 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020950 (exit $ac_status); } && {
20951 test -z "$ac_c_werror_flag" ||
20952 test ! -s conftest.err
20953 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020954 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020955else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020956 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020957sed 's/^/| /' conftest.$ac_ext >&5
20958
Martin v. Löwiseba40652007-08-30 20:10:57 +000020959 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020960/* confdefs.h. */
20961_ACEOF
20962cat confdefs.h >>conftest.$ac_ext
20963cat >>conftest.$ac_ext <<_ACEOF
20964/* end confdefs.h. */
20965#include <sys/types.h>
20966#include <$ac_cv_struct_tm>
20967
20968
20969int
20970main ()
20971{
20972static struct tm ac_aggr;
20973if (sizeof ac_aggr.tm_zone)
20974return 0;
20975 ;
20976 return 0;
20977}
20978_ACEOF
20979rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020980if { (ac_try="$ac_compile"
20981case "(($ac_try" in
20982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20983 *) ac_try_echo=$ac_try;;
20984esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020986 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020987 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020988 grep -v '^ *+' conftest.er1 >conftest.err
20989 rm -f conftest.er1
20990 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020992 (exit $ac_status); } && {
20993 test -z "$ac_c_werror_flag" ||
20994 test ! -s conftest.err
20995 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020996 ac_cv_member_struct_tm_tm_zone=yes
20997else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020998 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020999sed 's/^/| /' conftest.$ac_ext >&5
21000
Martin v. Löwiseba40652007-08-30 20:10:57 +000021001 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021003
21004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021005fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021006
21007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021008fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021009{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21010echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21011if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021012
21013cat >>confdefs.h <<_ACEOF
21014#define HAVE_STRUCT_TM_TM_ZONE 1
21015_ACEOF
21016
21017
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021018fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021019
Martin v. Löwis11437992002-04-12 09:54:03 +000021020if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21021
21022cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021023#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021024_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021025
21026else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021027 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21028echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021029if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021030 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021031else
21032 cat >conftest.$ac_ext <<_ACEOF
21033/* confdefs.h. */
21034_ACEOF
21035cat confdefs.h >>conftest.$ac_ext
21036cat >>conftest.$ac_ext <<_ACEOF
21037/* end confdefs.h. */
21038#include <time.h>
21039
21040int
21041main ()
21042{
21043#ifndef tzname
21044 (void) tzname;
21045#endif
21046
21047 ;
21048 return 0;
21049}
21050_ACEOF
21051rm -f conftest.$ac_objext
21052if { (ac_try="$ac_compile"
21053case "(($ac_try" in
21054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21055 *) ac_try_echo=$ac_try;;
21056esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021058 (eval "$ac_compile") 2>conftest.er1
21059 ac_status=$?
21060 grep -v '^ *+' conftest.er1 >conftest.err
21061 rm -f conftest.er1
21062 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021064 (exit $ac_status); } && {
21065 test -z "$ac_c_werror_flag" ||
21066 test ! -s conftest.err
21067 } && test -s conftest.$ac_objext; then
21068 ac_cv_have_decl_tzname=yes
21069else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021070 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021071sed 's/^/| /' conftest.$ac_ext >&5
21072
21073 ac_cv_have_decl_tzname=no
21074fi
21075
21076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21077fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021078{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21079echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21080if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021081
21082cat >>confdefs.h <<_ACEOF
21083#define HAVE_DECL_TZNAME 1
21084_ACEOF
21085
21086
21087else
21088 cat >>confdefs.h <<_ACEOF
21089#define HAVE_DECL_TZNAME 0
21090_ACEOF
21091
21092
21093fi
21094
21095
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021096 { echo "$as_me:$LINENO: checking for tzname" >&5
21097echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021098if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021099 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021100else
Martin v. Löwis11437992002-04-12 09:54:03 +000021101 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021102/* confdefs.h. */
21103_ACEOF
21104cat confdefs.h >>conftest.$ac_ext
21105cat >>conftest.$ac_ext <<_ACEOF
21106/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021107#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021108#if !HAVE_DECL_TZNAME
21109extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021110#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021111
Martin v. Löwis11437992002-04-12 09:54:03 +000021112int
21113main ()
21114{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021115return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021116 ;
21117 return 0;
21118}
21119_ACEOF
21120rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021121if { (ac_try="$ac_link"
21122case "(($ac_try" in
21123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21124 *) ac_try_echo=$ac_try;;
21125esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021127 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021128 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021129 grep -v '^ *+' conftest.er1 >conftest.err
21130 rm -f conftest.er1
21131 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021133 (exit $ac_status); } && {
21134 test -z "$ac_c_werror_flag" ||
21135 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021136 } && test -s conftest$ac_exeext &&
21137 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021138 ac_cv_var_tzname=yes
21139else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021140 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021141sed 's/^/| /' conftest.$ac_ext >&5
21142
Martin v. Löwiseba40652007-08-30 20:10:57 +000021143 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021144fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021145
21146rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021147 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021148fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021149{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21150echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021151 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021152
21153cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021154#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021155_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021156
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021157 fi
21158fi
21159
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021160{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21161echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021162if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021163 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021164else
21165 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021166/* confdefs.h. */
21167_ACEOF
21168cat confdefs.h >>conftest.$ac_ext
21169cat >>conftest.$ac_ext <<_ACEOF
21170/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021171$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021172int
21173main ()
21174{
21175static struct stat ac_aggr;
21176if (ac_aggr.st_rdev)
21177return 0;
21178 ;
21179 return 0;
21180}
21181_ACEOF
21182rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021183if { (ac_try="$ac_compile"
21184case "(($ac_try" in
21185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21186 *) ac_try_echo=$ac_try;;
21187esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021189 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021190 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021191 grep -v '^ *+' conftest.er1 >conftest.err
21192 rm -f conftest.er1
21193 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021195 (exit $ac_status); } && {
21196 test -z "$ac_c_werror_flag" ||
21197 test ! -s conftest.err
21198 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021199 ac_cv_member_struct_stat_st_rdev=yes
21200else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021201 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021202sed 's/^/| /' conftest.$ac_ext >&5
21203
Martin v. Löwiseba40652007-08-30 20:10:57 +000021204 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021205/* confdefs.h. */
21206_ACEOF
21207cat confdefs.h >>conftest.$ac_ext
21208cat >>conftest.$ac_ext <<_ACEOF
21209/* end confdefs.h. */
21210$ac_includes_default
21211int
21212main ()
21213{
21214static struct stat ac_aggr;
21215if (sizeof ac_aggr.st_rdev)
21216return 0;
21217 ;
21218 return 0;
21219}
21220_ACEOF
21221rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021222if { (ac_try="$ac_compile"
21223case "(($ac_try" in
21224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21225 *) ac_try_echo=$ac_try;;
21226esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021228 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021229 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021230 grep -v '^ *+' conftest.er1 >conftest.err
21231 rm -f conftest.er1
21232 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021234 (exit $ac_status); } && {
21235 test -z "$ac_c_werror_flag" ||
21236 test ! -s conftest.err
21237 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021238 ac_cv_member_struct_stat_st_rdev=yes
21239else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021240 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021241sed 's/^/| /' conftest.$ac_ext >&5
21242
Martin v. Löwiseba40652007-08-30 20:10:57 +000021243 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021244fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021245
21246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021247fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021248
21249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021250fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021251{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21252echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21253if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021254
21255cat >>confdefs.h <<_ACEOF
21256#define HAVE_STRUCT_STAT_ST_RDEV 1
21257_ACEOF
21258
21259
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021260fi
21261
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021262{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21263echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021264if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021265 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021266else
Martin v. Löwis11437992002-04-12 09:54:03 +000021267 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021268/* confdefs.h. */
21269_ACEOF
21270cat confdefs.h >>conftest.$ac_ext
21271cat >>conftest.$ac_ext <<_ACEOF
21272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021273$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021274int
21275main ()
21276{
21277static struct stat ac_aggr;
21278if (ac_aggr.st_blksize)
21279return 0;
21280 ;
21281 return 0;
21282}
21283_ACEOF
21284rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021285if { (ac_try="$ac_compile"
21286case "(($ac_try" in
21287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21288 *) ac_try_echo=$ac_try;;
21289esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021291 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021293 grep -v '^ *+' conftest.er1 >conftest.err
21294 rm -f conftest.er1
21295 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021297 (exit $ac_status); } && {
21298 test -z "$ac_c_werror_flag" ||
21299 test ! -s conftest.err
21300 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021301 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021302else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021304sed 's/^/| /' conftest.$ac_ext >&5
21305
Martin v. Löwiseba40652007-08-30 20:10:57 +000021306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021307/* confdefs.h. */
21308_ACEOF
21309cat confdefs.h >>conftest.$ac_ext
21310cat >>conftest.$ac_ext <<_ACEOF
21311/* end confdefs.h. */
21312$ac_includes_default
21313int
21314main ()
21315{
21316static struct stat ac_aggr;
21317if (sizeof ac_aggr.st_blksize)
21318return 0;
21319 ;
21320 return 0;
21321}
21322_ACEOF
21323rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021324if { (ac_try="$ac_compile"
21325case "(($ac_try" in
21326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21327 *) ac_try_echo=$ac_try;;
21328esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021330 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021331 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021332 grep -v '^ *+' conftest.er1 >conftest.err
21333 rm -f conftest.er1
21334 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021336 (exit $ac_status); } && {
21337 test -z "$ac_c_werror_flag" ||
21338 test ! -s conftest.err
21339 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021340 ac_cv_member_struct_stat_st_blksize=yes
21341else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021342 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021343sed 's/^/| /' conftest.$ac_ext >&5
21344
Martin v. Löwiseba40652007-08-30 20:10:57 +000021345 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021347
21348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021350
21351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021352fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021353{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21354echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21355if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021356
Martin v. Löwis11437992002-04-12 09:54:03 +000021357cat >>confdefs.h <<_ACEOF
21358#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21359_ACEOF
21360
21361
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021362fi
21363
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021364{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21365echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021366if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021367 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021368else
21369 cat >conftest.$ac_ext <<_ACEOF
21370/* confdefs.h. */
21371_ACEOF
21372cat confdefs.h >>conftest.$ac_ext
21373cat >>conftest.$ac_ext <<_ACEOF
21374/* end confdefs.h. */
21375$ac_includes_default
21376int
21377main ()
21378{
21379static struct stat ac_aggr;
21380if (ac_aggr.st_flags)
21381return 0;
21382 ;
21383 return 0;
21384}
21385_ACEOF
21386rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021387if { (ac_try="$ac_compile"
21388case "(($ac_try" in
21389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21390 *) ac_try_echo=$ac_try;;
21391esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021393 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021394 ac_status=$?
21395 grep -v '^ *+' conftest.er1 >conftest.err
21396 rm -f conftest.er1
21397 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021399 (exit $ac_status); } && {
21400 test -z "$ac_c_werror_flag" ||
21401 test ! -s conftest.err
21402 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021403 ac_cv_member_struct_stat_st_flags=yes
21404else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021405 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021406sed 's/^/| /' conftest.$ac_ext >&5
21407
Martin v. Löwiseba40652007-08-30 20:10:57 +000021408 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021409/* confdefs.h. */
21410_ACEOF
21411cat confdefs.h >>conftest.$ac_ext
21412cat >>conftest.$ac_ext <<_ACEOF
21413/* end confdefs.h. */
21414$ac_includes_default
21415int
21416main ()
21417{
21418static struct stat ac_aggr;
21419if (sizeof ac_aggr.st_flags)
21420return 0;
21421 ;
21422 return 0;
21423}
21424_ACEOF
21425rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021426if { (ac_try="$ac_compile"
21427case "(($ac_try" in
21428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21429 *) ac_try_echo=$ac_try;;
21430esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021432 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021433 ac_status=$?
21434 grep -v '^ *+' conftest.er1 >conftest.err
21435 rm -f conftest.er1
21436 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021438 (exit $ac_status); } && {
21439 test -z "$ac_c_werror_flag" ||
21440 test ! -s conftest.err
21441 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021442 ac_cv_member_struct_stat_st_flags=yes
21443else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021444 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021445sed 's/^/| /' conftest.$ac_ext >&5
21446
Martin v. Löwiseba40652007-08-30 20:10:57 +000021447 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021449
21450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021452
21453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021454fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021455{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21456echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21457if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021458
21459cat >>confdefs.h <<_ACEOF
21460#define HAVE_STRUCT_STAT_ST_FLAGS 1
21461_ACEOF
21462
21463
21464fi
21465
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021466{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21467echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021468if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021469 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021470else
21471 cat >conftest.$ac_ext <<_ACEOF
21472/* confdefs.h. */
21473_ACEOF
21474cat confdefs.h >>conftest.$ac_ext
21475cat >>conftest.$ac_ext <<_ACEOF
21476/* end confdefs.h. */
21477$ac_includes_default
21478int
21479main ()
21480{
21481static struct stat ac_aggr;
21482if (ac_aggr.st_gen)
21483return 0;
21484 ;
21485 return 0;
21486}
21487_ACEOF
21488rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021489if { (ac_try="$ac_compile"
21490case "(($ac_try" in
21491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21492 *) ac_try_echo=$ac_try;;
21493esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021495 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021496 ac_status=$?
21497 grep -v '^ *+' conftest.er1 >conftest.err
21498 rm -f conftest.er1
21499 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021501 (exit $ac_status); } && {
21502 test -z "$ac_c_werror_flag" ||
21503 test ! -s conftest.err
21504 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021505 ac_cv_member_struct_stat_st_gen=yes
21506else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021507 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021508sed 's/^/| /' conftest.$ac_ext >&5
21509
Martin v. Löwiseba40652007-08-30 20:10:57 +000021510 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021511/* confdefs.h. */
21512_ACEOF
21513cat confdefs.h >>conftest.$ac_ext
21514cat >>conftest.$ac_ext <<_ACEOF
21515/* end confdefs.h. */
21516$ac_includes_default
21517int
21518main ()
21519{
21520static struct stat ac_aggr;
21521if (sizeof ac_aggr.st_gen)
21522return 0;
21523 ;
21524 return 0;
21525}
21526_ACEOF
21527rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021528if { (ac_try="$ac_compile"
21529case "(($ac_try" in
21530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21531 *) ac_try_echo=$ac_try;;
21532esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021534 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021535 ac_status=$?
21536 grep -v '^ *+' conftest.er1 >conftest.err
21537 rm -f conftest.er1
21538 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021540 (exit $ac_status); } && {
21541 test -z "$ac_c_werror_flag" ||
21542 test ! -s conftest.err
21543 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021544 ac_cv_member_struct_stat_st_gen=yes
21545else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021546 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021547sed 's/^/| /' conftest.$ac_ext >&5
21548
Martin v. Löwiseba40652007-08-30 20:10:57 +000021549 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021550fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021551
21552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021554
21555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021556fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021557{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21558echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21559if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021560
21561cat >>confdefs.h <<_ACEOF
21562#define HAVE_STRUCT_STAT_ST_GEN 1
21563_ACEOF
21564
21565
21566fi
21567
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021568{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21569echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021570if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021571 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021572else
21573 cat >conftest.$ac_ext <<_ACEOF
21574/* confdefs.h. */
21575_ACEOF
21576cat confdefs.h >>conftest.$ac_ext
21577cat >>conftest.$ac_ext <<_ACEOF
21578/* end confdefs.h. */
21579$ac_includes_default
21580int
21581main ()
21582{
21583static struct stat ac_aggr;
21584if (ac_aggr.st_birthtime)
21585return 0;
21586 ;
21587 return 0;
21588}
21589_ACEOF
21590rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021591if { (ac_try="$ac_compile"
21592case "(($ac_try" in
21593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21594 *) ac_try_echo=$ac_try;;
21595esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021597 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021598 ac_status=$?
21599 grep -v '^ *+' conftest.er1 >conftest.err
21600 rm -f conftest.er1
21601 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021603 (exit $ac_status); } && {
21604 test -z "$ac_c_werror_flag" ||
21605 test ! -s conftest.err
21606 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021607 ac_cv_member_struct_stat_st_birthtime=yes
21608else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021609 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021610sed 's/^/| /' conftest.$ac_ext >&5
21611
Martin v. Löwiseba40652007-08-30 20:10:57 +000021612 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021613/* confdefs.h. */
21614_ACEOF
21615cat confdefs.h >>conftest.$ac_ext
21616cat >>conftest.$ac_ext <<_ACEOF
21617/* end confdefs.h. */
21618$ac_includes_default
21619int
21620main ()
21621{
21622static struct stat ac_aggr;
21623if (sizeof ac_aggr.st_birthtime)
21624return 0;
21625 ;
21626 return 0;
21627}
21628_ACEOF
21629rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021630if { (ac_try="$ac_compile"
21631case "(($ac_try" in
21632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21633 *) ac_try_echo=$ac_try;;
21634esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021636 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021637 ac_status=$?
21638 grep -v '^ *+' conftest.er1 >conftest.err
21639 rm -f conftest.er1
21640 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021642 (exit $ac_status); } && {
21643 test -z "$ac_c_werror_flag" ||
21644 test ! -s conftest.err
21645 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021646 ac_cv_member_struct_stat_st_birthtime=yes
21647else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021648 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021649sed 's/^/| /' conftest.$ac_ext >&5
21650
Martin v. Löwiseba40652007-08-30 20:10:57 +000021651 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021653
21654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021656
21657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021658fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021659{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21660echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21661if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021662
21663cat >>confdefs.h <<_ACEOF
21664#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21665_ACEOF
21666
21667
21668fi
21669
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021670{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21671echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021672if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021673 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021674else
Martin v. Löwis11437992002-04-12 09:54:03 +000021675 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021676/* confdefs.h. */
21677_ACEOF
21678cat confdefs.h >>conftest.$ac_ext
21679cat >>conftest.$ac_ext <<_ACEOF
21680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021681$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021682int
21683main ()
21684{
21685static struct stat ac_aggr;
21686if (ac_aggr.st_blocks)
21687return 0;
21688 ;
21689 return 0;
21690}
21691_ACEOF
21692rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021693if { (ac_try="$ac_compile"
21694case "(($ac_try" in
21695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21696 *) ac_try_echo=$ac_try;;
21697esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021699 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021701 grep -v '^ *+' conftest.er1 >conftest.err
21702 rm -f conftest.er1
21703 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021705 (exit $ac_status); } && {
21706 test -z "$ac_c_werror_flag" ||
21707 test ! -s conftest.err
21708 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021709 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021710else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021712sed 's/^/| /' conftest.$ac_ext >&5
21713
Martin v. Löwiseba40652007-08-30 20:10:57 +000021714 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021715/* confdefs.h. */
21716_ACEOF
21717cat confdefs.h >>conftest.$ac_ext
21718cat >>conftest.$ac_ext <<_ACEOF
21719/* end confdefs.h. */
21720$ac_includes_default
21721int
21722main ()
21723{
21724static struct stat ac_aggr;
21725if (sizeof ac_aggr.st_blocks)
21726return 0;
21727 ;
21728 return 0;
21729}
21730_ACEOF
21731rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021732if { (ac_try="$ac_compile"
21733case "(($ac_try" in
21734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21735 *) ac_try_echo=$ac_try;;
21736esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021738 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021740 grep -v '^ *+' conftest.er1 >conftest.err
21741 rm -f conftest.er1
21742 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021744 (exit $ac_status); } && {
21745 test -z "$ac_c_werror_flag" ||
21746 test ! -s conftest.err
21747 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021748 ac_cv_member_struct_stat_st_blocks=yes
21749else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021750 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021751sed 's/^/| /' conftest.$ac_ext >&5
21752
Martin v. Löwiseba40652007-08-30 20:10:57 +000021753 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021754fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021755
21756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021757fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021758
21759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021760fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021761{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21762echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21763if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021764
Martin v. Löwis11437992002-04-12 09:54:03 +000021765cat >>confdefs.h <<_ACEOF
21766#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21767_ACEOF
21768
21769
21770cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021771#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021772_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021773
21774else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021775 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021776 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021777 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21778 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021779esac
21780
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021781fi
21782
Michael W. Hudson54241132001-12-07 15:38:26 +000021783
Martin v. Löwis11437992002-04-12 09:54:03 +000021784
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021785{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21786echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021787if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021788 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021789else
Martin v. Löwis11437992002-04-12 09:54:03 +000021790 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021791/* confdefs.h. */
21792_ACEOF
21793cat confdefs.h >>conftest.$ac_ext
21794cat >>conftest.$ac_ext <<_ACEOF
21795/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021796#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021797int
21798main ()
21799{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021800return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021801 ;
21802 return 0;
21803}
21804_ACEOF
21805rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021806if { (ac_try="$ac_compile"
21807case "(($ac_try" in
21808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21809 *) ac_try_echo=$ac_try;;
21810esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021812 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021813 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021814 grep -v '^ *+' conftest.er1 >conftest.err
21815 rm -f conftest.er1
21816 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021818 (exit $ac_status); } && {
21819 test -z "$ac_c_werror_flag" ||
21820 test ! -s conftest.err
21821 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021822 ac_cv_header_time_altzone=yes
21823else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021825sed 's/^/| /' conftest.$ac_ext >&5
21826
Martin v. Löwiseba40652007-08-30 20:10:57 +000021827 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021828fi
21829
Martin v. Löwiseba40652007-08-30 20:10:57 +000021830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21831fi
21832
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021833{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21834echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021835if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021836
21837cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021838#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021839_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021840
21841fi
21842
Guido van Rossumda88dad1995-01-26 00:46:29 +000021843was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021844{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21845echo $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 +000021846cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021847/* confdefs.h. */
21848_ACEOF
21849cat confdefs.h >>conftest.$ac_ext
21850cat >>conftest.$ac_ext <<_ACEOF
21851/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021852
21853#include <sys/types.h>
21854#include <sys/select.h>
21855#include <sys/time.h>
21856
Martin v. Löwis11437992002-04-12 09:54:03 +000021857int
21858main ()
21859{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021860;
Martin v. Löwis11437992002-04-12 09:54:03 +000021861 ;
21862 return 0;
21863}
21864_ACEOF
21865rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021866if { (ac_try="$ac_compile"
21867case "(($ac_try" in
21868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21869 *) ac_try_echo=$ac_try;;
21870esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021872 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021873 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021874 grep -v '^ *+' conftest.er1 >conftest.err
21875 rm -f conftest.er1
21876 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021878 (exit $ac_status); } && {
21879 test -z "$ac_c_werror_flag" ||
21880 test ! -s conftest.err
21881 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021882
21883
21884cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021885#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021886_ACEOF
21887
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021888 was_it_defined=yes
21889
Guido van Rossumf78abae1997-01-21 22:02:36 +000021890else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021891 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021892sed 's/^/| /' conftest.$ac_ext >&5
21893
Brett Cannon19fab762007-06-02 03:02:29 +000021894
Martin v. Löwiseba40652007-08-30 20:10:57 +000021895fi
21896
21897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021898{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21899echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021900
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021901{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21902echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021903if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021904 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021905else
Martin v. Löwis11437992002-04-12 09:54:03 +000021906 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021907/* confdefs.h. */
21908_ACEOF
21909cat confdefs.h >>conftest.$ac_ext
21910cat >>conftest.$ac_ext <<_ACEOF
21911/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021912
21913# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021914int
21915main ()
21916{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021917struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021918 ;
21919 return 0;
21920}
21921_ACEOF
21922rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021923if { (ac_try="$ac_compile"
21924case "(($ac_try" in
21925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21926 *) ac_try_echo=$ac_try;;
21927esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021929 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021930 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021931 grep -v '^ *+' conftest.er1 >conftest.err
21932 rm -f conftest.er1
21933 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021935 (exit $ac_status); } && {
21936 test -z "$ac_c_werror_flag" ||
21937 test ! -s conftest.err
21938 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021939 ac_cv_struct_addrinfo=yes
21940else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021942sed 's/^/| /' conftest.$ac_ext >&5
21943
Martin v. Löwiseba40652007-08-30 20:10:57 +000021944 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021945fi
21946
Martin v. Löwiseba40652007-08-30 20:10:57 +000021947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21948fi
21949
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021950{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21951echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021952if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021953
21954cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021955#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021956_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021957
21958fi
21959
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021960{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21961echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021962if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021963 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021964else
Martin v. Löwis11437992002-04-12 09:54:03 +000021965 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021966/* confdefs.h. */
21967_ACEOF
21968cat confdefs.h >>conftest.$ac_ext
21969cat >>conftest.$ac_ext <<_ACEOF
21970/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021971
21972# include <sys/types.h>
21973# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021974int
21975main ()
21976{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021977struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021978 ;
21979 return 0;
21980}
21981_ACEOF
21982rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021983if { (ac_try="$ac_compile"
21984case "(($ac_try" in
21985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21986 *) ac_try_echo=$ac_try;;
21987esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021989 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021990 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021991 grep -v '^ *+' conftest.er1 >conftest.err
21992 rm -f conftest.er1
21993 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021995 (exit $ac_status); } && {
21996 test -z "$ac_c_werror_flag" ||
21997 test ! -s conftest.err
21998 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021999 ac_cv_struct_sockaddr_storage=yes
22000else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022002sed 's/^/| /' conftest.$ac_ext >&5
22003
Martin v. Löwiseba40652007-08-30 20:10:57 +000022004 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022005fi
22006
Martin v. Löwiseba40652007-08-30 20:10:57 +000022007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22008fi
22009
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022010{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22011echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022012if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022013
22014cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022015#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022016_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022017
22018fi
22019
Guido van Rossum627b2d71993-12-24 10:39:16 +000022020# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022021
Michael W. Hudson54241132001-12-07 15:38:26 +000022022
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022023{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22024echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022025if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022026 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022027else
Martin v. Löwis11437992002-04-12 09:54:03 +000022028 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022029/* confdefs.h. */
22030_ACEOF
22031cat confdefs.h >>conftest.$ac_ext
22032cat >>conftest.$ac_ext <<_ACEOF
22033/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022034$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022035int
22036main ()
22037{
22038static int test_array [1 - 2 * !(((char) -1) < 0)];
22039test_array [0] = 0
22040
22041 ;
22042 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022043}
Martin v. Löwis11437992002-04-12 09:54:03 +000022044_ACEOF
22045rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022046if { (ac_try="$ac_compile"
22047case "(($ac_try" in
22048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22049 *) ac_try_echo=$ac_try;;
22050esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022052 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022054 grep -v '^ *+' conftest.er1 >conftest.err
22055 rm -f conftest.er1
22056 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022058 (exit $ac_status); } && {
22059 test -z "$ac_c_werror_flag" ||
22060 test ! -s conftest.err
22061 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022062 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022063else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022065sed 's/^/| /' conftest.$ac_ext >&5
22066
Martin v. Löwiseba40652007-08-30 20:10:57 +000022067 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022068fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022069
22070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022071fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022072{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22073echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022074if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022075 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022076#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022077_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022078
22079fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022080
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022081{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22082echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022083if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022084 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022085else
22086 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022087/* confdefs.h. */
22088_ACEOF
22089cat confdefs.h >>conftest.$ac_ext
22090cat >>conftest.$ac_ext <<_ACEOF
22091/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022092
Martin v. Löwis11437992002-04-12 09:54:03 +000022093int
22094main ()
22095{
22096/* FIXME: Include the comments suggested by Paul. */
22097#ifndef __cplusplus
22098 /* Ultrix mips cc rejects this. */
22099 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022100 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022101 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022102 char const *const *pcpcc;
22103 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022104 /* NEC SVR4.0.2 mips cc rejects this. */
22105 struct point {int x, y;};
22106 static struct point const zero = {0,0};
22107 /* AIX XL C 1.02.0.0 rejects this.
22108 It does not let you subtract one const X* pointer from another in
22109 an arm of an if-expression whose if-part is not a constant
22110 expression */
22111 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022112 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022113 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022114 ++pcpcc;
22115 ppc = (char**) pcpcc;
22116 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022117 { /* SCO 3.2v4 cc rejects this. */
22118 char *t;
22119 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022120
Martin v. Löwis11437992002-04-12 09:54:03 +000022121 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022122 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022123 }
22124 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22125 int x[] = {25, 17};
22126 const int *foo = &x[0];
22127 ++foo;
22128 }
22129 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22130 typedef const int *iptr;
22131 iptr p = 0;
22132 ++p;
22133 }
22134 { /* AIX XL C 1.02.0.0 rejects this saying
22135 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22136 struct s { int j; const int *ap[3]; };
22137 struct s *b; b->j = 5;
22138 }
22139 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22140 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022141 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022142 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022143 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022144#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022145
Martin v. Löwis11437992002-04-12 09:54:03 +000022146 ;
22147 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022148}
Martin v. Löwis11437992002-04-12 09:54:03 +000022149_ACEOF
22150rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022151if { (ac_try="$ac_compile"
22152case "(($ac_try" in
22153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22154 *) ac_try_echo=$ac_try;;
22155esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022157 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022159 grep -v '^ *+' conftest.er1 >conftest.err
22160 rm -f conftest.er1
22161 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022163 (exit $ac_status); } && {
22164 test -z "$ac_c_werror_flag" ||
22165 test ! -s conftest.err
22166 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022167 ac_cv_c_const=yes
22168else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022170sed 's/^/| /' conftest.$ac_ext >&5
22171
Martin v. Löwiseba40652007-08-30 20:10:57 +000022172 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022174
22175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022176fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022177{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22178echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022179if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022180
22181cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022182#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022183_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022184
22185fi
22186
Michael W. Hudson54241132001-12-07 15:38:26 +000022187
Guido van Rossumda88dad1995-01-26 00:46:29 +000022188works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022189{ echo "$as_me:$LINENO: checking for working volatile" >&5
22190echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022191cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022192/* confdefs.h. */
22193_ACEOF
22194cat confdefs.h >>conftest.$ac_ext
22195cat >>conftest.$ac_ext <<_ACEOF
22196/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022197
Martin v. Löwis11437992002-04-12 09:54:03 +000022198int
22199main ()
22200{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022201volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022202 ;
22203 return 0;
22204}
22205_ACEOF
22206rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022207if { (ac_try="$ac_compile"
22208case "(($ac_try" in
22209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22210 *) ac_try_echo=$ac_try;;
22211esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022213 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022214 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022215 grep -v '^ *+' conftest.er1 >conftest.err
22216 rm -f conftest.er1
22217 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022219 (exit $ac_status); } && {
22220 test -z "$ac_c_werror_flag" ||
22221 test ! -s conftest.err
22222 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022223 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022224else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022226sed 's/^/| /' conftest.$ac_ext >&5
22227
Martin v. Löwis11437992002-04-12 09:54:03 +000022228
22229cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022230#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022231_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022232
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022233
Guido van Rossum627b2d71993-12-24 10:39:16 +000022234fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022235
22236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022237{ echo "$as_me:$LINENO: result: $works" >&5
22238echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022239
Guido van Rossumda88dad1995-01-26 00:46:29 +000022240works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022241{ echo "$as_me:$LINENO: checking for working signed char" >&5
22242echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022243cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022244/* confdefs.h. */
22245_ACEOF
22246cat confdefs.h >>conftest.$ac_ext
22247cat >>conftest.$ac_ext <<_ACEOF
22248/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022249
Martin v. Löwis11437992002-04-12 09:54:03 +000022250int
22251main ()
22252{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022253signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022254 ;
22255 return 0;
22256}
22257_ACEOF
22258rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022259if { (ac_try="$ac_compile"
22260case "(($ac_try" in
22261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22262 *) ac_try_echo=$ac_try;;
22263esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022265 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022267 grep -v '^ *+' conftest.er1 >conftest.err
22268 rm -f conftest.er1
22269 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022271 (exit $ac_status); } && {
22272 test -z "$ac_c_werror_flag" ||
22273 test ! -s conftest.err
22274 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022275 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022276else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022278sed 's/^/| /' conftest.$ac_ext >&5
22279
Martin v. Löwis11437992002-04-12 09:54:03 +000022280
22281cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022282#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022283_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022284
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022285
Guido van Rossum7f43da71994-08-01 12:15:30 +000022286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022287
22288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022289{ echo "$as_me:$LINENO: result: $works" >&5
22290echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022291
Guido van Rossumda88dad1995-01-26 00:46:29 +000022292have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022293{ echo "$as_me:$LINENO: checking for prototypes" >&5
22294echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022295cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022296/* confdefs.h. */
22297_ACEOF
22298cat confdefs.h >>conftest.$ac_ext
22299cat >>conftest.$ac_ext <<_ACEOF
22300/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022301int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022302int
22303main ()
22304{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022305return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022306 ;
22307 return 0;
22308}
22309_ACEOF
22310rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022311if { (ac_try="$ac_compile"
22312case "(($ac_try" in
22313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22314 *) ac_try_echo=$ac_try;;
22315esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022317 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022319 grep -v '^ *+' conftest.er1 >conftest.err
22320 rm -f conftest.er1
22321 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022323 (exit $ac_status); } && {
22324 test -z "$ac_c_werror_flag" ||
22325 test ! -s conftest.err
22326 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022327
22328
22329cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022330#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022331_ACEOF
22332
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022333 have_prototypes=yes
22334
Guido van Rossumf78abae1997-01-21 22:02:36 +000022335else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022336 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022337sed 's/^/| /' conftest.$ac_ext >&5
22338
Martin v. Löwiseba40652007-08-30 20:10:57 +000022339
Guido van Rossum7f43da71994-08-01 12:15:30 +000022340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022341
22342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022343{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22344echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022345
Guido van Rossumda88dad1995-01-26 00:46:29 +000022346works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022347{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22348echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022349cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022350/* confdefs.h. */
22351_ACEOF
22352cat confdefs.h >>conftest.$ac_ext
22353cat >>conftest.$ac_ext <<_ACEOF
22354/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022355
22356#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022357int foo(int x, ...) {
22358 va_list va;
22359 va_start(va, x);
22360 va_arg(va, int);
22361 va_arg(va, char *);
22362 va_arg(va, double);
22363 return 0;
22364}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022365
Martin v. Löwis11437992002-04-12 09:54:03 +000022366int
22367main ()
22368{
Guido van Rossum90eea071996-08-30 20:58:57 +000022369return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022370 ;
22371 return 0;
22372}
22373_ACEOF
22374rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022375if { (ac_try="$ac_compile"
22376case "(($ac_try" in
22377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22378 *) ac_try_echo=$ac_try;;
22379esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022381 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022382 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022383 grep -v '^ *+' conftest.er1 >conftest.err
22384 rm -f conftest.er1
22385 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022387 (exit $ac_status); } && {
22388 test -z "$ac_c_werror_flag" ||
22389 test ! -s conftest.err
22390 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022391
22392
22393cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022394#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022395_ACEOF
22396
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022397 works=yes
22398
Guido van Rossumf78abae1997-01-21 22:02:36 +000022399else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022401sed 's/^/| /' conftest.$ac_ext >&5
22402
Martin v. Löwiseba40652007-08-30 20:10:57 +000022403
Guido van Rossum627b2d71993-12-24 10:39:16 +000022404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022405
22406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022407{ echo "$as_me:$LINENO: result: $works" >&5
22408echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022409
Martin v. Löwisd6320502004-08-12 13:45:08 +000022410# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022411{ echo "$as_me:$LINENO: checking for socketpair" >&5
22412echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022413cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022414/* confdefs.h. */
22415_ACEOF
22416cat confdefs.h >>conftest.$ac_ext
22417cat >>conftest.$ac_ext <<_ACEOF
22418/* end confdefs.h. */
22419
22420#include <sys/types.h>
22421#include <sys/socket.h>
22422
22423int
22424main ()
22425{
22426void *x=socketpair
22427 ;
22428 return 0;
22429}
22430_ACEOF
22431rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022432if { (ac_try="$ac_compile"
22433case "(($ac_try" in
22434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22435 *) ac_try_echo=$ac_try;;
22436esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022438 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022439 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022440 grep -v '^ *+' conftest.er1 >conftest.err
22441 rm -f conftest.er1
22442 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022444 (exit $ac_status); } && {
22445 test -z "$ac_c_werror_flag" ||
22446 test ! -s conftest.err
22447 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022448
22449cat >>confdefs.h <<\_ACEOF
22450#define HAVE_SOCKETPAIR 1
22451_ACEOF
22452
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022453 { echo "$as_me:$LINENO: result: yes" >&5
22454echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022455else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022456 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022457sed 's/^/| /' conftest.$ac_ext >&5
22458
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022459 { echo "$as_me:$LINENO: result: no" >&5
22460echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022461
22462fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022463
22464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022465
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022466# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022467{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22468echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022469cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022470/* confdefs.h. */
22471_ACEOF
22472cat confdefs.h >>conftest.$ac_ext
22473cat >>conftest.$ac_ext <<_ACEOF
22474/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022475#include <sys/types.h>
22476#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022477int
22478main ()
22479{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022480struct sockaddr x;
22481x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022482 ;
22483 return 0;
22484}
22485_ACEOF
22486rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022487if { (ac_try="$ac_compile"
22488case "(($ac_try" in
22489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22490 *) ac_try_echo=$ac_try;;
22491esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022493 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022494 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022495 grep -v '^ *+' conftest.er1 >conftest.err
22496 rm -f conftest.er1
22497 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022499 (exit $ac_status); } && {
22500 test -z "$ac_c_werror_flag" ||
22501 test ! -s conftest.err
22502 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022503 { echo "$as_me:$LINENO: result: yes" >&5
22504echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022505
22506cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022507#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022508_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022509
22510else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022512sed 's/^/| /' conftest.$ac_ext >&5
22513
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022514 { echo "$as_me:$LINENO: result: no" >&5
22515echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022516fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022517
22518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022519
Guido van Rossumda88dad1995-01-26 00:46:29 +000022520va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022521{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22522echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022523cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022524/* confdefs.h. */
22525_ACEOF
22526cat confdefs.h >>conftest.$ac_ext
22527cat >>conftest.$ac_ext <<_ACEOF
22528/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022529
22530#ifdef HAVE_STDARG_PROTOTYPES
22531#include <stdarg.h>
22532#else
22533#include <varargs.h>
22534#endif
22535
Martin v. Löwis11437992002-04-12 09:54:03 +000022536int
22537main ()
22538{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022539va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022540 ;
22541 return 0;
22542}
22543_ACEOF
22544rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022545if { (ac_try="$ac_compile"
22546case "(($ac_try" in
22547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22548 *) ac_try_echo=$ac_try;;
22549esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022551 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022553 grep -v '^ *+' conftest.er1 >conftest.err
22554 rm -f conftest.er1
22555 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022557 (exit $ac_status); } && {
22558 test -z "$ac_c_werror_flag" ||
22559 test ! -s conftest.err
22560 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022561 :
22562else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022564sed 's/^/| /' conftest.$ac_ext >&5
22565
Martin v. Löwis11437992002-04-12 09:54:03 +000022566
22567
22568cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022569#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022570_ACEOF
22571
Guido van Rossumda88dad1995-01-26 00:46:29 +000022572 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022573
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022575
22576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022577{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22578echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022579
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022580# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022581
22582
22583
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022584{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22585echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022586if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022587 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022588else
Martin v. Löwis11437992002-04-12 09:54:03 +000022589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022590/* confdefs.h. */
22591_ACEOF
22592cat confdefs.h >>conftest.$ac_ext
22593cat >>conftest.$ac_ext <<_ACEOF
22594/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022595/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22596 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22597#define gethostbyname_r innocuous_gethostbyname_r
22598
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022599/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022600 which can conflict with char gethostbyname_r (); below.
22601 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022602 <limits.h> exists even on freestanding compilers. */
22603
22604#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022605# include <limits.h>
22606#else
22607# include <assert.h>
22608#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022609
22610#undef gethostbyname_r
22611
Martin v. Löwiseba40652007-08-30 20:10:57 +000022612/* Override any GCC internal prototype to avoid an error.
22613 Use char because int might match the return type of a GCC
22614 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022615#ifdef __cplusplus
22616extern "C"
22617#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022618char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022619/* The GNU C library defines this for functions which it implements
22620 to always fail with ENOSYS. Some functions are actually named
22621 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022622#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022623choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022624#endif
22625
Skip Montanaro6dead952003-09-25 14:50:04 +000022626int
22627main ()
22628{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022629return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022630 ;
22631 return 0;
22632}
22633_ACEOF
22634rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022635if { (ac_try="$ac_link"
22636case "(($ac_try" in
22637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22638 *) ac_try_echo=$ac_try;;
22639esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022641 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022643 grep -v '^ *+' conftest.er1 >conftest.err
22644 rm -f conftest.er1
22645 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022647 (exit $ac_status); } && {
22648 test -z "$ac_c_werror_flag" ||
22649 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022650 } && test -s conftest$ac_exeext &&
22651 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022652 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022653else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022654 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022655sed 's/^/| /' conftest.$ac_ext >&5
22656
Martin v. Löwiseba40652007-08-30 20:10:57 +000022657 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022658fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022659
22660rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022661 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022662fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022663{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22664echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22665if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022666
Martin v. Löwis11437992002-04-12 09:54:03 +000022667 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022668#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022669_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022670
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022671 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22672echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022673 OLD_CFLAGS=$CFLAGS
22674 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022675 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022676/* confdefs.h. */
22677_ACEOF
22678cat confdefs.h >>conftest.$ac_ext
22679cat >>conftest.$ac_ext <<_ACEOF
22680/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022681
22682# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022683
Martin v. Löwis11437992002-04-12 09:54:03 +000022684int
22685main ()
22686{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022687
22688 char *name;
22689 struct hostent *he, *res;
22690 char buffer[2048];
22691 int buflen = 2048;
22692 int h_errnop;
22693
22694 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022695
22696 ;
22697 return 0;
22698}
22699_ACEOF
22700rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022701if { (ac_try="$ac_compile"
22702case "(($ac_try" in
22703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22704 *) ac_try_echo=$ac_try;;
22705esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022707 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022709 grep -v '^ *+' conftest.er1 >conftest.err
22710 rm -f conftest.er1
22711 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022713 (exit $ac_status); } && {
22714 test -z "$ac_c_werror_flag" ||
22715 test ! -s conftest.err
22716 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022717
22718 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022719#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022720_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022721
Martin v. Löwis11437992002-04-12 09:54:03 +000022722
22723cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022724#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022725_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022726
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022727 { echo "$as_me:$LINENO: result: yes" >&5
22728echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022729
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022730else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022731 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022732sed 's/^/| /' conftest.$ac_ext >&5
22733
Martin v. Löwis11437992002-04-12 09:54:03 +000022734
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022735 { echo "$as_me:$LINENO: result: no" >&5
22736echo "${ECHO_T}no" >&6; }
22737 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22738echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022739 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022740/* confdefs.h. */
22741_ACEOF
22742cat confdefs.h >>conftest.$ac_ext
22743cat >>conftest.$ac_ext <<_ACEOF
22744/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022745
22746# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022747
Martin v. Löwis11437992002-04-12 09:54:03 +000022748int
22749main ()
22750{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022751
22752 char *name;
22753 struct hostent *he;
22754 char buffer[2048];
22755 int buflen = 2048;
22756 int h_errnop;
22757
22758 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022759
22760 ;
22761 return 0;
22762}
22763_ACEOF
22764rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022765if { (ac_try="$ac_compile"
22766case "(($ac_try" in
22767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22768 *) ac_try_echo=$ac_try;;
22769esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022771 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022773 grep -v '^ *+' conftest.er1 >conftest.err
22774 rm -f conftest.er1
22775 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022777 (exit $ac_status); } && {
22778 test -z "$ac_c_werror_flag" ||
22779 test ! -s conftest.err
22780 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022781
22782 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022783#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022784_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022785
Martin v. Löwis11437992002-04-12 09:54:03 +000022786
22787cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022788#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022789_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022790
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022791 { echo "$as_me:$LINENO: result: yes" >&5
22792echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022793
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022794else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022796sed 's/^/| /' conftest.$ac_ext >&5
22797
Martin v. Löwis11437992002-04-12 09:54:03 +000022798
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022799 { echo "$as_me:$LINENO: result: no" >&5
22800echo "${ECHO_T}no" >&6; }
22801 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22802echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022803 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022804/* confdefs.h. */
22805_ACEOF
22806cat confdefs.h >>conftest.$ac_ext
22807cat >>conftest.$ac_ext <<_ACEOF
22808/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022809
22810# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022811
Martin v. Löwis11437992002-04-12 09:54:03 +000022812int
22813main ()
22814{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022815
22816 char *name;
22817 struct hostent *he;
22818 struct hostent_data data;
22819
22820 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022821
22822 ;
22823 return 0;
22824}
22825_ACEOF
22826rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022827if { (ac_try="$ac_compile"
22828case "(($ac_try" in
22829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22830 *) ac_try_echo=$ac_try;;
22831esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022833 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022835 grep -v '^ *+' conftest.er1 >conftest.err
22836 rm -f conftest.er1
22837 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022839 (exit $ac_status); } && {
22840 test -z "$ac_c_werror_flag" ||
22841 test ! -s conftest.err
22842 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022843
22844 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022845#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022846_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022847
Martin v. Löwis11437992002-04-12 09:54:03 +000022848
22849cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022850#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022851_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022852
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022853 { echo "$as_me:$LINENO: result: yes" >&5
22854echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022855
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022856else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022858sed 's/^/| /' conftest.$ac_ext >&5
22859
Martin v. Löwis11437992002-04-12 09:54:03 +000022860
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022861 { echo "$as_me:$LINENO: result: no" >&5
22862echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022863
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022865
22866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022867
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022869
22870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022871
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022872fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022873
22874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022875 CFLAGS=$OLD_CFLAGS
22876
22877else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022878
Martin v. Löwis11437992002-04-12 09:54:03 +000022879
22880for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022881do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022882as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22883{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22884echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022885if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022886 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022887else
Martin v. Löwis11437992002-04-12 09:54:03 +000022888 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022889/* confdefs.h. */
22890_ACEOF
22891cat confdefs.h >>conftest.$ac_ext
22892cat >>conftest.$ac_ext <<_ACEOF
22893/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022894/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22895 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22896#define $ac_func innocuous_$ac_func
22897
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022898/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022899 which can conflict with char $ac_func (); below.
22900 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022901 <limits.h> exists even on freestanding compilers. */
22902
22903#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022904# include <limits.h>
22905#else
22906# include <assert.h>
22907#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022908
22909#undef $ac_func
22910
Martin v. Löwiseba40652007-08-30 20:10:57 +000022911/* Override any GCC internal prototype to avoid an error.
22912 Use char because int might match the return type of a GCC
22913 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022914#ifdef __cplusplus
22915extern "C"
22916#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022917char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022918/* The GNU C library defines this for functions which it implements
22919 to always fail with ENOSYS. Some functions are actually named
22920 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022921#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022922choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022923#endif
22924
Skip Montanaro6dead952003-09-25 14:50:04 +000022925int
22926main ()
22927{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022928return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022929 ;
22930 return 0;
22931}
22932_ACEOF
22933rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022934if { (ac_try="$ac_link"
22935case "(($ac_try" in
22936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22937 *) ac_try_echo=$ac_try;;
22938esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022940 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022941 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022942 grep -v '^ *+' conftest.er1 >conftest.err
22943 rm -f conftest.er1
22944 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022946 (exit $ac_status); } && {
22947 test -z "$ac_c_werror_flag" ||
22948 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022949 } && test -s conftest$ac_exeext &&
22950 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022951 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022952else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022954sed 's/^/| /' conftest.$ac_ext >&5
22955
Martin v. Löwiseba40652007-08-30 20:10:57 +000022956 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022958
22959rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022960 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022961fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022962ac_res=`eval echo '${'$as_ac_var'}'`
22963 { echo "$as_me:$LINENO: result: $ac_res" >&5
22964echo "${ECHO_T}$ac_res" >&6; }
22965if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022966 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022967#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022968_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022969
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022970fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022971done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022972
Michael W. Hudson54241132001-12-07 15:38:26 +000022973
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022974fi
22975
Michael W. Hudson54241132001-12-07 15:38:26 +000022976
22977
22978
22979
22980
22981
Guido van Rossum627b2d71993-12-24 10:39:16 +000022982# checks for system services
22983# (none yet)
22984
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022985# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022986{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22987echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022988if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022989 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022990else
Martin v. Löwis11437992002-04-12 09:54:03 +000022991 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022992/* confdefs.h. */
22993_ACEOF
22994cat confdefs.h >>conftest.$ac_ext
22995cat >>conftest.$ac_ext <<_ACEOF
22996/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022997/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22998 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22999#define __fpu_control innocuous___fpu_control
23000
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023001/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023002 which can conflict with char __fpu_control (); below.
23003 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023004 <limits.h> exists even on freestanding compilers. */
23005
23006#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023007# include <limits.h>
23008#else
23009# include <assert.h>
23010#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023011
23012#undef __fpu_control
23013
Martin v. Löwiseba40652007-08-30 20:10:57 +000023014/* Override any GCC internal prototype to avoid an error.
23015 Use char because int might match the return type of a GCC
23016 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023017#ifdef __cplusplus
23018extern "C"
23019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023020char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023021/* The GNU C library defines this for functions which it implements
23022 to always fail with ENOSYS. Some functions are actually named
23023 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023024#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023025choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023026#endif
23027
Skip Montanaro6dead952003-09-25 14:50:04 +000023028int
23029main ()
23030{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023031return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023032 ;
23033 return 0;
23034}
23035_ACEOF
23036rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023037if { (ac_try="$ac_link"
23038case "(($ac_try" in
23039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23040 *) ac_try_echo=$ac_try;;
23041esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023043 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023044 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023045 grep -v '^ *+' conftest.er1 >conftest.err
23046 rm -f conftest.er1
23047 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023049 (exit $ac_status); } && {
23050 test -z "$ac_c_werror_flag" ||
23051 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023052 } && test -s conftest$ac_exeext &&
23053 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023054 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023055else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023056 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023057sed 's/^/| /' conftest.$ac_ext >&5
23058
Martin v. Löwiseba40652007-08-30 20:10:57 +000023059 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023061
23062rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023063 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023064fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023065{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23066echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23067if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023068 :
23069else
Martin v. Löwis11437992002-04-12 09:54:03 +000023070
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023071{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23072echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023073if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023074 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023075else
Martin v. Löwis11437992002-04-12 09:54:03 +000023076 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023077LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023078cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023079/* confdefs.h. */
23080_ACEOF
23081cat confdefs.h >>conftest.$ac_ext
23082cat >>conftest.$ac_ext <<_ACEOF
23083/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023084
Martin v. Löwiseba40652007-08-30 20:10:57 +000023085/* Override any GCC internal prototype to avoid an error.
23086 Use char because int might match the return type of a GCC
23087 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023088#ifdef __cplusplus
23089extern "C"
23090#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023091char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023092int
23093main ()
23094{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023095return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023096 ;
23097 return 0;
23098}
23099_ACEOF
23100rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023101if { (ac_try="$ac_link"
23102case "(($ac_try" in
23103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23104 *) ac_try_echo=$ac_try;;
23105esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023107 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023109 grep -v '^ *+' conftest.er1 >conftest.err
23110 rm -f conftest.er1
23111 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023113 (exit $ac_status); } && {
23114 test -z "$ac_c_werror_flag" ||
23115 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023116 } && test -s conftest$ac_exeext &&
23117 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023118 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023119else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023121sed 's/^/| /' conftest.$ac_ext >&5
23122
Martin v. Löwiseba40652007-08-30 20:10:57 +000023123 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023125
23126rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023127 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023128LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023129fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023130{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23131echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23132if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023133 cat >>confdefs.h <<_ACEOF
23134#define HAVE_LIBIEEE 1
23135_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023136
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023137 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023138
Guido van Rossum627b2d71993-12-24 10:39:16 +000023139fi
23140
Michael W. Hudson54241132001-12-07 15:38:26 +000023141
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023142fi
23143
Michael W. Hudson54241132001-12-07 15:38:26 +000023144
Guido van Rossum7f253911997-05-09 02:42:48 +000023145# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023146{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23147echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023148
Martin v. Löwiseba40652007-08-30 20:10:57 +000023149# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023150if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023151 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023152if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023153then
23154
23155cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023156#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023157_ACEOF
23158
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023159 { echo "$as_me:$LINENO: result: yes" >&5
23160echo "${ECHO_T}yes" >&6; }
23161else { echo "$as_me:$LINENO: result: no" >&5
23162echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023163fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023164else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023165 { echo "$as_me:$LINENO: result: no" >&5
23166echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023167fi
23168
Guido van Rossum7f253911997-05-09 02:42:48 +000023169
Guido van Rossum7f43da71994-08-01 12:15:30 +000023170# check for --with-libm=...
23171
Guido van Rossum563e7081996-09-10 18:20:48 +000023172case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023173Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023174BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023175*) LIBM=-lm
23176esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023177{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23178echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023179
Martin v. Löwiseba40652007-08-30 20:10:57 +000023180# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023181if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023182 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023183if test "$withval" = no
23184then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023185 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23186echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023187elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023188then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023189 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23190echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23191else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23192echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023193 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023194fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023195else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023196 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23197echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023198fi
23199
Guido van Rossum7f43da71994-08-01 12:15:30 +000023200
23201# check for --with-libc=...
23202
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023203{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23204echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023205
Martin v. Löwiseba40652007-08-30 20:10:57 +000023206# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023207if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023208 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023209if test "$withval" = no
23210then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023211 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23212echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023213elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023214then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023215 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23216echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23217else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23218echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023219 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023220fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023221else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023222 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23223echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023224fi
23225
Guido van Rossum7f43da71994-08-01 12:15:30 +000023226
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023227# **************************************************
23228# * Check for various properties of floating point *
23229# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023230
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023231{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23232echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
23233if test "${ac_cv_little_endian_double+set}" = set; then
23234 echo $ECHO_N "(cached) $ECHO_C" >&6
23235else
23236
23237if test "$cross_compiling" = yes; then
23238 ac_cv_little_endian_double=no
23239else
23240 cat >conftest.$ac_ext <<_ACEOF
23241/* confdefs.h. */
23242_ACEOF
23243cat confdefs.h >>conftest.$ac_ext
23244cat >>conftest.$ac_ext <<_ACEOF
23245/* end confdefs.h. */
23246
23247#include <string.h>
23248int main() {
23249 double x = 9006104071832581.0;
23250 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23251 return 0;
23252 else
23253 return 1;
23254}
23255
23256_ACEOF
23257rm -f conftest$ac_exeext
23258if { (ac_try="$ac_link"
23259case "(($ac_try" in
23260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23261 *) ac_try_echo=$ac_try;;
23262esac
23263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23264 (eval "$ac_link") 2>&5
23265 ac_status=$?
23266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23267 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23268 { (case "(($ac_try" in
23269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23270 *) ac_try_echo=$ac_try;;
23271esac
23272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23273 (eval "$ac_try") 2>&5
23274 ac_status=$?
23275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23276 (exit $ac_status); }; }; then
23277 ac_cv_little_endian_double=yes
23278else
23279 echo "$as_me: program exited with status $ac_status" >&5
23280echo "$as_me: failed program was:" >&5
23281sed 's/^/| /' conftest.$ac_ext >&5
23282
23283( exit $ac_status )
23284ac_cv_little_endian_double=no
23285fi
23286rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23287fi
23288
23289
23290fi
23291
23292{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23293echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
23294if test "$ac_cv_little_endian_double" = yes
23295then
23296
23297cat >>confdefs.h <<\_ACEOF
23298#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23299_ACEOF
23300
23301fi
23302
23303{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23304echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
23305if test "${ac_cv_big_endian_double+set}" = set; then
23306 echo $ECHO_N "(cached) $ECHO_C" >&6
23307else
23308
23309if test "$cross_compiling" = yes; then
23310 ac_cv_big_endian_double=no
23311else
23312 cat >conftest.$ac_ext <<_ACEOF
23313/* confdefs.h. */
23314_ACEOF
23315cat confdefs.h >>conftest.$ac_ext
23316cat >>conftest.$ac_ext <<_ACEOF
23317/* end confdefs.h. */
23318
23319#include <string.h>
23320int main() {
23321 double x = 9006104071832581.0;
23322 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23323 return 0;
23324 else
23325 return 1;
23326}
23327
23328_ACEOF
23329rm -f conftest$ac_exeext
23330if { (ac_try="$ac_link"
23331case "(($ac_try" in
23332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23333 *) ac_try_echo=$ac_try;;
23334esac
23335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23336 (eval "$ac_link") 2>&5
23337 ac_status=$?
23338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23339 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23340 { (case "(($ac_try" in
23341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23342 *) ac_try_echo=$ac_try;;
23343esac
23344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23345 (eval "$ac_try") 2>&5
23346 ac_status=$?
23347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23348 (exit $ac_status); }; }; then
23349 ac_cv_big_endian_double=yes
23350else
23351 echo "$as_me: program exited with status $ac_status" >&5
23352echo "$as_me: failed program was:" >&5
23353sed 's/^/| /' conftest.$ac_ext >&5
23354
23355( exit $ac_status )
23356ac_cv_big_endian_double=no
23357fi
23358rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23359fi
23360
23361
23362fi
23363
23364{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23365echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
23366if test "$ac_cv_big_endian_double" = yes
23367then
23368
23369cat >>confdefs.h <<\_ACEOF
23370#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23371_ACEOF
23372
23373fi
23374
23375# Some ARM platforms use a mixed-endian representation for doubles.
23376# While Python doesn't currently have full support for these platforms
23377# (see e.g., issue 1762561), we can at least make sure that float <-> string
23378# conversions work.
23379{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23380echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
23381if test "${ac_cv_mixed_endian_double+set}" = set; then
23382 echo $ECHO_N "(cached) $ECHO_C" >&6
23383else
23384
23385if test "$cross_compiling" = yes; then
23386 ac_cv_mixed_endian_double=no
23387else
23388 cat >conftest.$ac_ext <<_ACEOF
23389/* confdefs.h. */
23390_ACEOF
23391cat confdefs.h >>conftest.$ac_ext
23392cat >>conftest.$ac_ext <<_ACEOF
23393/* end confdefs.h. */
23394
23395#include <string.h>
23396int main() {
23397 double x = 9006104071832581.0;
23398 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23399 return 0;
23400 else
23401 return 1;
23402}
23403
23404_ACEOF
23405rm -f conftest$ac_exeext
23406if { (ac_try="$ac_link"
23407case "(($ac_try" in
23408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23409 *) ac_try_echo=$ac_try;;
23410esac
23411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23412 (eval "$ac_link") 2>&5
23413 ac_status=$?
23414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23415 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23416 { (case "(($ac_try" in
23417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23418 *) ac_try_echo=$ac_try;;
23419esac
23420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23421 (eval "$ac_try") 2>&5
23422 ac_status=$?
23423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23424 (exit $ac_status); }; }; then
23425 ac_cv_mixed_endian_double=yes
23426else
23427 echo "$as_me: program exited with status $ac_status" >&5
23428echo "$as_me: failed program was:" >&5
23429sed 's/^/| /' conftest.$ac_ext >&5
23430
23431( exit $ac_status )
23432ac_cv_mixed_endian_double=no
23433fi
23434rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23435fi
23436
23437
23438fi
23439
23440{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23441echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
23442if test "$ac_cv_mixed_endian_double" = yes
23443then
23444
23445cat >>confdefs.h <<\_ACEOF
23446#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23447_ACEOF
23448
23449fi
23450
23451# The short float repr introduced in Python 3.1 requires the
23452# correctly-rounded string <-> double conversion functions from
23453# Python/dtoa.c, which in turn require that the FPU uses 53-bit
23454# rounding; this is a problem on x86, where the x87 FPU has a default
23455# rounding precision of 64 bits. For gcc/x86, we try to fix this by
23456# using inline assembler to get and set the x87 FPU control word.
23457if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
23458then
23459 # Check that it's okay to use gcc inline assembler to get and set
23460 # x87 control word. It should be, but you never know...
23461 { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
23462echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; }
23463 cat >conftest.$ac_ext <<_ACEOF
23464/* confdefs.h. */
23465_ACEOF
23466cat confdefs.h >>conftest.$ac_ext
23467cat >>conftest.$ac_ext <<_ACEOF
23468/* end confdefs.h. */
23469
23470int
23471main ()
23472{
23473
23474 unsigned short cw;
23475 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23476 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
23477
23478 ;
23479 return 0;
23480}
23481_ACEOF
23482rm -f conftest.$ac_objext
23483if { (ac_try="$ac_compile"
23484case "(($ac_try" in
23485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23486 *) ac_try_echo=$ac_try;;
23487esac
23488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23489 (eval "$ac_compile") 2>conftest.er1
23490 ac_status=$?
23491 grep -v '^ *+' conftest.er1 >conftest.err
23492 rm -f conftest.er1
23493 cat conftest.err >&5
23494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23495 (exit $ac_status); } && {
23496 test -z "$ac_c_werror_flag" ||
23497 test ! -s conftest.err
23498 } && test -s conftest.$ac_objext; then
23499 have_gcc_asm_for_x87=yes
23500else
23501 echo "$as_me: failed program was:" >&5
23502sed 's/^/| /' conftest.$ac_ext >&5
23503
23504 have_gcc_asm_for_x87=no
23505fi
23506
23507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23508 { echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
23509echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
23510 if test "$have_gcc_asm_for_x87" = yes
23511 then
23512
23513cat >>confdefs.h <<\_ACEOF
23514#define HAVE_GCC_ASM_FOR_X87 1
23515_ACEOF
23516
23517 fi
23518fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023519
Mark Dickinson04b27232009-01-04 12:29:36 +000023520# Detect whether system arithmetic is subject to x87-style double
23521# rounding issues. The result of this test has little meaning on non
23522# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23523# mode is round-to-nearest and double rounding issues are present, and
23524# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023525{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23526echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000023527# $BASECFLAGS may affect the result
23528ac_save_cc="$CC"
23529CC="$CC $BASECFLAGS"
Mark Dickinson04b27232009-01-04 12:29:36 +000023530if test "$cross_compiling" = yes; then
23531 ac_cv_x87_double_rounding=no
23532else
23533 cat >conftest.$ac_ext <<_ACEOF
23534/* confdefs.h. */
23535_ACEOF
23536cat confdefs.h >>conftest.$ac_ext
23537cat >>conftest.$ac_ext <<_ACEOF
23538/* end confdefs.h. */
23539
23540#include <stdlib.h>
23541#include <math.h>
23542int main() {
23543 volatile double x, y, z;
23544 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23545 x = 0.99999999999999989; /* 1-2**-53 */
23546 y = 1./x;
23547 if (y != 1.)
23548 exit(0);
23549 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23550 x = 1e16;
23551 y = 2.99999;
23552 z = x + y;
23553 if (z != 1e16+4.)
23554 exit(0);
23555 /* both tests show evidence of double rounding */
23556 exit(1);
23557}
23558
23559_ACEOF
23560rm -f conftest$ac_exeext
23561if { (ac_try="$ac_link"
23562case "(($ac_try" in
23563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23564 *) ac_try_echo=$ac_try;;
23565esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023567 (eval "$ac_link") 2>&5
23568 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023570 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23571 { (case "(($ac_try" in
23572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23573 *) ac_try_echo=$ac_try;;
23574esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023576 (eval "$ac_try") 2>&5
23577 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023579 (exit $ac_status); }; }; then
23580 ac_cv_x87_double_rounding=no
23581else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023582 echo "$as_me: program exited with status $ac_status" >&5
23583echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023584sed 's/^/| /' conftest.$ac_ext >&5
23585
23586( exit $ac_status )
23587ac_cv_x87_double_rounding=yes
23588fi
23589rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23590fi
23591
23592
Mark Dickinson99abd142009-10-24 13:44:16 +000023593CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023594{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23595echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000023596if test "$ac_cv_x87_double_rounding" = yes
23597then
23598
23599cat >>confdefs.h <<\_ACEOF
23600#define X87_DOUBLE_ROUNDING 1
23601_ACEOF
23602
23603fi
23604
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023605# ************************************
23606# * Check for mathematical functions *
23607# ************************************
23608
23609LIBS_SAVE=$LIBS
23610LIBS="$LIBS $LIBM"
23611
Jesse Noller355b1262009-04-02 00:03:28 +000023612# Multiprocessing check for broken sem_getvalue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023613{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23614echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023615if test "${ac_cv_broken_sem_getvalue+set}" = set; then
23616 echo $ECHO_N "(cached) $ECHO_C" >&6
23617else
23618 if test "$cross_compiling" = yes; then
23619 ac_cv_broken_sem_getvalue=yes
Jesse Noller355b1262009-04-02 00:03:28 +000023620else
23621 cat >conftest.$ac_ext <<_ACEOF
23622/* confdefs.h. */
23623_ACEOF
23624cat confdefs.h >>conftest.$ac_ext
23625cat >>conftest.$ac_ext <<_ACEOF
23626/* end confdefs.h. */
23627
23628#include <unistd.h>
23629#include <fcntl.h>
23630#include <stdio.h>
23631#include <semaphore.h>
23632#include <sys/stat.h>
23633
23634int main(void){
23635 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23636 int count;
23637 int res;
23638 if(a==SEM_FAILED){
23639 perror("sem_open");
23640 return 1;
23641
23642 }
23643 res = sem_getvalue(a, &count);
23644 sem_close(a);
23645 return res==-1 ? 1 : 0;
23646}
23647
Jesse Noller355b1262009-04-02 00:03:28 +000023648_ACEOF
23649rm -f conftest$ac_exeext
23650if { (ac_try="$ac_link"
23651case "(($ac_try" in
23652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23653 *) ac_try_echo=$ac_try;;
23654esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023656 (eval "$ac_link") 2>&5
23657 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023659 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23660 { (case "(($ac_try" in
23661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23662 *) ac_try_echo=$ac_try;;
23663esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023665 (eval "$ac_try") 2>&5
23666 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023668 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023669 ac_cv_broken_sem_getvalue=no
Jesse Noller355b1262009-04-02 00:03:28 +000023670else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023671 echo "$as_me: program exited with status $ac_status" >&5
23672echo "$as_me: failed program was:" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023673sed 's/^/| /' conftest.$ac_ext >&5
23674
23675( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023676ac_cv_broken_sem_getvalue=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000023677fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023678rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23679fi
23680
23681
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000023682
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023683fi
23684
23685{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23686echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
23687if test $ac_cv_broken_sem_getvalue = yes
23688then
23689
23690cat >>confdefs.h <<\_ACEOF
23691#define HAVE_BROKEN_SEM_GETVALUE 1
23692_ACEOF
23693
23694fi
23695
Mark Dickinson265d7382008-04-21 22:32:24 +000023696# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23697# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023698{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23699echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000023700if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023701 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000023702else
23703
23704if test "$cross_compiling" = yes; then
23705 ac_cv_tanh_preserves_zero_sign=no
23706else
23707 cat >conftest.$ac_ext <<_ACEOF
23708/* confdefs.h. */
23709_ACEOF
23710cat confdefs.h >>conftest.$ac_ext
23711cat >>conftest.$ac_ext <<_ACEOF
23712/* end confdefs.h. */
23713
23714#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023715#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000023716int main() {
23717 /* return 0 if either negative zeros don't exist
23718 on this platform or if negative zeros exist
23719 and tanh(-0.) == -0. */
23720 if (atan2(0., -1.) == atan2(-0., -1.) ||
23721 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23722 else exit(1);
23723}
23724
23725_ACEOF
23726rm -f conftest$ac_exeext
23727if { (ac_try="$ac_link"
23728case "(($ac_try" in
23729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23730 *) ac_try_echo=$ac_try;;
23731esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023733 (eval "$ac_link") 2>&5
23734 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023736 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23737 { (case "(($ac_try" in
23738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23739 *) ac_try_echo=$ac_try;;
23740esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023742 (eval "$ac_try") 2>&5
23743 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023745 (exit $ac_status); }; }; then
23746 ac_cv_tanh_preserves_zero_sign=yes
23747else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023748 echo "$as_me: program exited with status $ac_status" >&5
23749echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023750sed 's/^/| /' conftest.$ac_ext >&5
23751
23752( exit $ac_status )
23753ac_cv_tanh_preserves_zero_sign=no
23754fi
23755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23756fi
23757
23758
23759fi
23760
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023761{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23762echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000023763if test "$ac_cv_tanh_preserves_zero_sign" = yes
23764then
23765
23766cat >>confdefs.h <<\_ACEOF
23767#define TANH_PRESERVES_ZERO_SIGN 1
23768_ACEOF
23769
23770fi
23771
Martin v. Löwis11437992002-04-12 09:54:03 +000023772
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023773
Michael W. Hudson54241132001-12-07 15:38:26 +000023774
Christian Heimes0a8143f2007-12-18 23:22:54 +000023775
23776
23777
23778
23779
Mark Dickinson8e5446f2009-04-18 14:41:37 +000023780
Mark Dickinson65898e02009-09-05 10:27:00 +000023781for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23782do
23783as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23784{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23785echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23786if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
23787 echo $ECHO_N "(cached) $ECHO_C" >&6
23788else
23789 cat >conftest.$ac_ext <<_ACEOF
23790/* confdefs.h. */
23791_ACEOF
23792cat confdefs.h >>conftest.$ac_ext
23793cat >>conftest.$ac_ext <<_ACEOF
23794/* end confdefs.h. */
23795/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23796 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23797#define $ac_func innocuous_$ac_func
23798
23799/* System header to define __stub macros and hopefully few prototypes,
23800 which can conflict with char $ac_func (); below.
23801 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23802 <limits.h> exists even on freestanding compilers. */
23803
23804#ifdef __STDC__
23805# include <limits.h>
23806#else
23807# include <assert.h>
23808#endif
23809
23810#undef $ac_func
23811
23812/* Override any GCC internal prototype to avoid an error.
23813 Use char because int might match the return type of a GCC
23814 builtin and then its argument prototype would still apply. */
23815#ifdef __cplusplus
23816extern "C"
23817#endif
23818char $ac_func ();
23819/* The GNU C library defines this for functions which it implements
23820 to always fail with ENOSYS. Some functions are actually named
23821 something starting with __ and the normal name is an alias. */
23822#if defined __stub_$ac_func || defined __stub___$ac_func
23823choke me
23824#endif
23825
23826int
23827main ()
23828{
23829return $ac_func ();
23830 ;
23831 return 0;
23832}
23833_ACEOF
23834rm -f conftest.$ac_objext conftest$ac_exeext
23835if { (ac_try="$ac_link"
23836case "(($ac_try" in
23837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23838 *) ac_try_echo=$ac_try;;
23839esac
23840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23841 (eval "$ac_link") 2>conftest.er1
23842 ac_status=$?
23843 grep -v '^ *+' conftest.er1 >conftest.err
23844 rm -f conftest.er1
23845 cat conftest.err >&5
23846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23847 (exit $ac_status); } && {
23848 test -z "$ac_c_werror_flag" ||
23849 test ! -s conftest.err
23850 } && test -s conftest$ac_exeext &&
23851 $as_test_x conftest$ac_exeext; then
23852 eval "$as_ac_var=yes"
23853else
23854 echo "$as_me: failed program was:" >&5
23855sed 's/^/| /' conftest.$ac_ext >&5
23856
23857 eval "$as_ac_var=no"
23858fi
23859
23860rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23861 conftest$ac_exeext conftest.$ac_ext
23862fi
23863ac_res=`eval echo '${'$as_ac_var'}'`
23864 { echo "$as_me:$LINENO: result: $ac_res" >&5
23865echo "${ECHO_T}$ac_res" >&6; }
23866if test `eval echo '${'$as_ac_var'}'` = yes; then
23867 cat >>confdefs.h <<_ACEOF
23868#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23869_ACEOF
23870
23871fi
23872done
23873
23874
23875
23876
23877
23878
23879for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000023880do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023881as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23882{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23883echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000023884if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023885 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000023886else
23887 cat >conftest.$ac_ext <<_ACEOF
23888/* confdefs.h. */
23889_ACEOF
23890cat confdefs.h >>conftest.$ac_ext
23891cat >>conftest.$ac_ext <<_ACEOF
23892/* end confdefs.h. */
23893/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23894 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23895#define $ac_func innocuous_$ac_func
23896
23897/* System header to define __stub macros and hopefully few prototypes,
23898 which can conflict with char $ac_func (); below.
23899 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23900 <limits.h> exists even on freestanding compilers. */
23901
23902#ifdef __STDC__
23903# include <limits.h>
23904#else
23905# include <assert.h>
23906#endif
23907
23908#undef $ac_func
23909
23910/* Override any GCC internal prototype to avoid an error.
23911 Use char because int might match the return type of a GCC
23912 builtin and then its argument prototype would still apply. */
23913#ifdef __cplusplus
23914extern "C"
23915#endif
23916char $ac_func ();
23917/* The GNU C library defines this for functions which it implements
23918 to always fail with ENOSYS. Some functions are actually named
23919 something starting with __ and the normal name is an alias. */
23920#if defined __stub_$ac_func || defined __stub___$ac_func
23921choke me
23922#endif
23923
23924int
23925main ()
23926{
23927return $ac_func ();
23928 ;
23929 return 0;
23930}
23931_ACEOF
23932rm -f conftest.$ac_objext conftest$ac_exeext
23933if { (ac_try="$ac_link"
23934case "(($ac_try" in
23935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23936 *) ac_try_echo=$ac_try;;
23937esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000023939 (eval "$ac_link") 2>conftest.er1
23940 ac_status=$?
23941 grep -v '^ *+' conftest.er1 >conftest.err
23942 rm -f conftest.er1
23943 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000023945 (exit $ac_status); } && {
23946 test -z "$ac_c_werror_flag" ||
23947 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023948 } && test -s conftest$ac_exeext &&
23949 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000023950 eval "$as_ac_var=yes"
23951else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023952 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000023953sed 's/^/| /' conftest.$ac_ext >&5
23954
23955 eval "$as_ac_var=no"
23956fi
23957
23958rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23959 conftest$ac_exeext conftest.$ac_ext
23960fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023961ac_res=`eval echo '${'$as_ac_var'}'`
23962 { echo "$as_me:$LINENO: result: $ac_res" >&5
23963echo "${ECHO_T}$ac_res" >&6; }
23964if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000023965 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023966#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000023967_ACEOF
23968
23969fi
23970done
23971
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023972{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23973echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023974if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023975 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023976else
23977 cat >conftest.$ac_ext <<_ACEOF
23978/* confdefs.h. */
23979_ACEOF
23980cat confdefs.h >>conftest.$ac_ext
23981cat >>conftest.$ac_ext <<_ACEOF
23982/* end confdefs.h. */
23983#include <math.h>
23984
23985int
23986main ()
23987{
23988#ifndef isinf
23989 (void) isinf;
23990#endif
23991
23992 ;
23993 return 0;
23994}
23995_ACEOF
23996rm -f conftest.$ac_objext
23997if { (ac_try="$ac_compile"
23998case "(($ac_try" in
23999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24000 *) ac_try_echo=$ac_try;;
24001esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024003 (eval "$ac_compile") 2>conftest.er1
24004 ac_status=$?
24005 grep -v '^ *+' conftest.er1 >conftest.err
24006 rm -f conftest.er1
24007 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024009 (exit $ac_status); } && {
24010 test -z "$ac_c_werror_flag" ||
24011 test ! -s conftest.err
24012 } && test -s conftest.$ac_objext; then
24013 ac_cv_have_decl_isinf=yes
24014else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024015 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024016sed 's/^/| /' conftest.$ac_ext >&5
24017
24018 ac_cv_have_decl_isinf=no
24019fi
24020
24021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24022fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024023{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24024echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24025if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024026
24027cat >>confdefs.h <<_ACEOF
24028#define HAVE_DECL_ISINF 1
24029_ACEOF
24030
24031
24032else
24033 cat >>confdefs.h <<_ACEOF
24034#define HAVE_DECL_ISINF 0
24035_ACEOF
24036
24037
24038fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024039{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24040echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024041if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024042 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024043else
24044 cat >conftest.$ac_ext <<_ACEOF
24045/* confdefs.h. */
24046_ACEOF
24047cat confdefs.h >>conftest.$ac_ext
24048cat >>conftest.$ac_ext <<_ACEOF
24049/* end confdefs.h. */
24050#include <math.h>
24051
24052int
24053main ()
24054{
24055#ifndef isnan
24056 (void) isnan;
24057#endif
24058
24059 ;
24060 return 0;
24061}
24062_ACEOF
24063rm -f conftest.$ac_objext
24064if { (ac_try="$ac_compile"
24065case "(($ac_try" in
24066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24067 *) ac_try_echo=$ac_try;;
24068esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024070 (eval "$ac_compile") 2>conftest.er1
24071 ac_status=$?
24072 grep -v '^ *+' conftest.er1 >conftest.err
24073 rm -f conftest.er1
24074 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024076 (exit $ac_status); } && {
24077 test -z "$ac_c_werror_flag" ||
24078 test ! -s conftest.err
24079 } && test -s conftest.$ac_objext; then
24080 ac_cv_have_decl_isnan=yes
24081else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024082 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024083sed 's/^/| /' conftest.$ac_ext >&5
24084
24085 ac_cv_have_decl_isnan=no
24086fi
24087
24088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24089fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024090{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24091echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24092if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024093
24094cat >>confdefs.h <<_ACEOF
24095#define HAVE_DECL_ISNAN 1
24096_ACEOF
24097
24098
24099else
24100 cat >>confdefs.h <<_ACEOF
24101#define HAVE_DECL_ISNAN 0
24102_ACEOF
24103
24104
24105fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024106{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24107echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024108if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024109 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024110else
24111 cat >conftest.$ac_ext <<_ACEOF
24112/* confdefs.h. */
24113_ACEOF
24114cat confdefs.h >>conftest.$ac_ext
24115cat >>conftest.$ac_ext <<_ACEOF
24116/* end confdefs.h. */
24117#include <math.h>
24118
24119int
24120main ()
24121{
24122#ifndef isfinite
24123 (void) isfinite;
24124#endif
24125
24126 ;
24127 return 0;
24128}
24129_ACEOF
24130rm -f conftest.$ac_objext
24131if { (ac_try="$ac_compile"
24132case "(($ac_try" in
24133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24134 *) ac_try_echo=$ac_try;;
24135esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024137 (eval "$ac_compile") 2>conftest.er1
24138 ac_status=$?
24139 grep -v '^ *+' conftest.er1 >conftest.err
24140 rm -f conftest.er1
24141 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024143 (exit $ac_status); } && {
24144 test -z "$ac_c_werror_flag" ||
24145 test ! -s conftest.err
24146 } && test -s conftest.$ac_objext; then
24147 ac_cv_have_decl_isfinite=yes
24148else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024149 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024150sed 's/^/| /' conftest.$ac_ext >&5
24151
24152 ac_cv_have_decl_isfinite=no
24153fi
24154
24155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24156fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024157{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24158echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24159if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024160
24161cat >>confdefs.h <<_ACEOF
24162#define HAVE_DECL_ISFINITE 1
24163_ACEOF
24164
24165
24166else
24167 cat >>confdefs.h <<_ACEOF
24168#define HAVE_DECL_ISFINITE 0
24169_ACEOF
24170
24171
24172fi
24173
24174
Christian Heimes0a8143f2007-12-18 23:22:54 +000024175
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024176LIBS=$LIBS_SAVE
24177
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024178# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024179{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24180echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024181# Check whether --enable-big-digits was given.
24182if test "${enable_big_digits+set}" = set; then
24183 enableval=$enable_big_digits; case $enable_big_digits in
24184yes)
24185 enable_big_digits=30 ;;
24186no)
24187 enable_big_digits=15 ;;
2418815|30)
24189 ;;
24190*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024191 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24192echo "$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 +000024193 { (exit 1); exit 1; }; } ;;
24194esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024195{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24196echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024197
24198cat >>confdefs.h <<_ACEOF
24199#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24200_ACEOF
24201
24202
24203else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024204 { echo "$as_me:$LINENO: result: no value specified" >&5
24205echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024206fi
24207
24208
Guido van Rossumef2255b2000-03-10 22:30:29 +000024209# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024210if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024211 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24212echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024213if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024214 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024215fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024216{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24217echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024218else
Martin v. Löwis11437992002-04-12 09:54:03 +000024219 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024220{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24221echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024222cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024223/* confdefs.h. */
24224_ACEOF
24225cat confdefs.h >>conftest.$ac_ext
24226cat >>conftest.$ac_ext <<_ACEOF
24227/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024228$ac_includes_default
24229#include <wchar.h>
24230_ACEOF
24231rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024232if { (ac_try="$ac_compile"
24233case "(($ac_try" in
24234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24235 *) ac_try_echo=$ac_try;;
24236esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024238 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024239 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024240 grep -v '^ *+' conftest.er1 >conftest.err
24241 rm -f conftest.er1
24242 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024244 (exit $ac_status); } && {
24245 test -z "$ac_c_werror_flag" ||
24246 test ! -s conftest.err
24247 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024248 ac_header_compiler=yes
24249else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024250 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024251sed 's/^/| /' conftest.$ac_ext >&5
24252
Martin v. Löwiseba40652007-08-30 20:10:57 +000024253 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024254fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024255
24256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024257{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24258echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024259
24260# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024261{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24262echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024263cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024264/* confdefs.h. */
24265_ACEOF
24266cat confdefs.h >>conftest.$ac_ext
24267cat >>conftest.$ac_ext <<_ACEOF
24268/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024269#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024270_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024271if { (ac_try="$ac_cpp conftest.$ac_ext"
24272case "(($ac_try" in
24273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24274 *) ac_try_echo=$ac_try;;
24275esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024277 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024278 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024279 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024280 rm -f conftest.er1
24281 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024283 (exit $ac_status); } >/dev/null && {
24284 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24285 test ! -s conftest.err
24286 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024287 ac_header_preproc=yes
24288else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024289 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024290sed 's/^/| /' conftest.$ac_ext >&5
24291
Martin v. Löwis11437992002-04-12 09:54:03 +000024292 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024293fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024294
Martin v. Löwis11437992002-04-12 09:54:03 +000024295rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024296{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24297echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024298
24299# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024300case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24301 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024302 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24303echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24304 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24305echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024306 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024307 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024308 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024309 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24310echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24311 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24312echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24313 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24314echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24315 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24316echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24317 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24318echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24319 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24320echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000024321 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000024322## -------------------------------------- ##
24323## Report this to http://bugs.python.org/ ##
24324## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024325_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000024326 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024327 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024328esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024329{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24330echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024331if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024332 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024333else
24334 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024335fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024336{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24337echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024338
24339fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024340if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024341
24342
24343cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024344#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024345_ACEOF
24346
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024347 wchar_h="yes"
24348
Guido van Rossumef2255b2000-03-10 22:30:29 +000024349else
Martin v. Löwis11437992002-04-12 09:54:03 +000024350 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024351
24352fi
24353
Michael W. Hudson54241132001-12-07 15:38:26 +000024354
Martin v. Löwis11437992002-04-12 09:54:03 +000024355
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024356# determine wchar_t size
24357if test "$wchar_h" = yes
24358then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024359 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24360echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24361if test "${ac_cv_type_wchar_t+set}" = set; then
24362 echo $ECHO_N "(cached) $ECHO_C" >&6
24363else
24364 cat >conftest.$ac_ext <<_ACEOF
24365/* confdefs.h. */
24366_ACEOF
24367cat confdefs.h >>conftest.$ac_ext
24368cat >>conftest.$ac_ext <<_ACEOF
24369/* end confdefs.h. */
24370#include <wchar.h>
24371
24372typedef wchar_t ac__type_new_;
24373int
24374main ()
24375{
24376if ((ac__type_new_ *) 0)
24377 return 0;
24378if (sizeof (ac__type_new_))
24379 return 0;
24380 ;
24381 return 0;
24382}
24383_ACEOF
24384rm -f conftest.$ac_objext
24385if { (ac_try="$ac_compile"
24386case "(($ac_try" in
24387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24388 *) ac_try_echo=$ac_try;;
24389esac
24390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24391 (eval "$ac_compile") 2>conftest.er1
24392 ac_status=$?
24393 grep -v '^ *+' conftest.er1 >conftest.err
24394 rm -f conftest.er1
24395 cat conftest.err >&5
24396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24397 (exit $ac_status); } && {
24398 test -z "$ac_c_werror_flag" ||
24399 test ! -s conftest.err
24400 } && test -s conftest.$ac_objext; then
24401 ac_cv_type_wchar_t=yes
24402else
24403 echo "$as_me: failed program was:" >&5
24404sed 's/^/| /' conftest.$ac_ext >&5
24405
24406 ac_cv_type_wchar_t=no
24407fi
24408
24409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24410fi
24411{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24412echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24413
24414# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000024415# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24416# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24417# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024418{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24419echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024420if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024421 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024422else
Martin v. Löwis11437992002-04-12 09:54:03 +000024423 if test "$cross_compiling" = yes; then
24424 # Depending upon the size, compute the lo and hi bounds.
24425cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024426/* confdefs.h. */
24427_ACEOF
24428cat confdefs.h >>conftest.$ac_ext
24429cat >>conftest.$ac_ext <<_ACEOF
24430/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024431#include <wchar.h>
24432
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024433 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024434int
24435main ()
24436{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024437static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024438test_array [0] = 0
24439
24440 ;
24441 return 0;
24442}
24443_ACEOF
24444rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024445if { (ac_try="$ac_compile"
24446case "(($ac_try" in
24447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24448 *) ac_try_echo=$ac_try;;
24449esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024451 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024452 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024453 grep -v '^ *+' conftest.er1 >conftest.err
24454 rm -f conftest.er1
24455 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024457 (exit $ac_status); } && {
24458 test -z "$ac_c_werror_flag" ||
24459 test ! -s conftest.err
24460 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024461 ac_lo=0 ac_mid=0
24462 while :; do
24463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024464/* confdefs.h. */
24465_ACEOF
24466cat confdefs.h >>conftest.$ac_ext
24467cat >>conftest.$ac_ext <<_ACEOF
24468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024469#include <wchar.h>
24470
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024471 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024472int
24473main ()
24474{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024475static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024476test_array [0] = 0
24477
24478 ;
24479 return 0;
24480}
24481_ACEOF
24482rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024483if { (ac_try="$ac_compile"
24484case "(($ac_try" in
24485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24486 *) ac_try_echo=$ac_try;;
24487esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024489 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024490 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024491 grep -v '^ *+' conftest.er1 >conftest.err
24492 rm -f conftest.er1
24493 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024495 (exit $ac_status); } && {
24496 test -z "$ac_c_werror_flag" ||
24497 test ! -s conftest.err
24498 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024499 ac_hi=$ac_mid; break
24500else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024502sed 's/^/| /' conftest.$ac_ext >&5
24503
Martin v. Löwiseba40652007-08-30 20:10:57 +000024504 ac_lo=`expr $ac_mid + 1`
24505 if test $ac_lo -le $ac_mid; then
24506 ac_lo= ac_hi=
24507 break
24508 fi
24509 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024510fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024511
24512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024513 done
24514else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024516sed 's/^/| /' conftest.$ac_ext >&5
24517
Martin v. Löwiseba40652007-08-30 20:10:57 +000024518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024519/* confdefs.h. */
24520_ACEOF
24521cat confdefs.h >>conftest.$ac_ext
24522cat >>conftest.$ac_ext <<_ACEOF
24523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024524#include <wchar.h>
24525
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024526 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024527int
24528main ()
24529{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024530static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024531test_array [0] = 0
24532
24533 ;
24534 return 0;
24535}
24536_ACEOF
24537rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024538if { (ac_try="$ac_compile"
24539case "(($ac_try" in
24540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24541 *) ac_try_echo=$ac_try;;
24542esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024544 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024545 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024546 grep -v '^ *+' conftest.er1 >conftest.err
24547 rm -f conftest.er1
24548 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024550 (exit $ac_status); } && {
24551 test -z "$ac_c_werror_flag" ||
24552 test ! -s conftest.err
24553 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024554 ac_hi=-1 ac_mid=-1
24555 while :; do
24556 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024557/* confdefs.h. */
24558_ACEOF
24559cat confdefs.h >>conftest.$ac_ext
24560cat >>conftest.$ac_ext <<_ACEOF
24561/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024562#include <wchar.h>
24563
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024564 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024565int
24566main ()
24567{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024568static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024569test_array [0] = 0
24570
24571 ;
24572 return 0;
24573}
24574_ACEOF
24575rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024576if { (ac_try="$ac_compile"
24577case "(($ac_try" in
24578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24579 *) ac_try_echo=$ac_try;;
24580esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024582 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024583 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024584 grep -v '^ *+' conftest.er1 >conftest.err
24585 rm -f conftest.er1
24586 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024588 (exit $ac_status); } && {
24589 test -z "$ac_c_werror_flag" ||
24590 test ! -s conftest.err
24591 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024592 ac_lo=$ac_mid; break
24593else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024594 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024595sed 's/^/| /' conftest.$ac_ext >&5
24596
Martin v. Löwiseba40652007-08-30 20:10:57 +000024597 ac_hi=`expr '(' $ac_mid ')' - 1`
24598 if test $ac_mid -le $ac_hi; then
24599 ac_lo= ac_hi=
24600 break
24601 fi
24602 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024604
24605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024606 done
24607else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024609sed 's/^/| /' conftest.$ac_ext >&5
24610
Martin v. Löwiseba40652007-08-30 20:10:57 +000024611 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024613
24614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024615fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024616
24617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024618# Binary search between lo and hi bounds.
24619while test "x$ac_lo" != "x$ac_hi"; do
24620 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24621 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024622/* confdefs.h. */
24623_ACEOF
24624cat confdefs.h >>conftest.$ac_ext
24625cat >>conftest.$ac_ext <<_ACEOF
24626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024627#include <wchar.h>
24628
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024629 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024630int
24631main ()
24632{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024633static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024634test_array [0] = 0
24635
24636 ;
24637 return 0;
24638}
24639_ACEOF
24640rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024641if { (ac_try="$ac_compile"
24642case "(($ac_try" in
24643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24644 *) ac_try_echo=$ac_try;;
24645esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024647 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024648 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024649 grep -v '^ *+' conftest.er1 >conftest.err
24650 rm -f conftest.er1
24651 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024653 (exit $ac_status); } && {
24654 test -z "$ac_c_werror_flag" ||
24655 test ! -s conftest.err
24656 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024657 ac_hi=$ac_mid
24658else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024660sed 's/^/| /' conftest.$ac_ext >&5
24661
Martin v. Löwiseba40652007-08-30 20:10:57 +000024662 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024663fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024664
24665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024666done
24667case $ac_lo in
24668?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024669'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024670 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024671See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024672echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024673See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024674 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024675 else
24676 ac_cv_sizeof_wchar_t=0
24677 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024678esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024679else
Martin v. Löwis11437992002-04-12 09:54:03 +000024680 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024681/* confdefs.h. */
24682_ACEOF
24683cat confdefs.h >>conftest.$ac_ext
24684cat >>conftest.$ac_ext <<_ACEOF
24685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024686#include <wchar.h>
24687
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024688 typedef wchar_t ac__type_sizeof_;
24689static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24690static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024691#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024692#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024693int
24694main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024695{
Martin v. Löwis11437992002-04-12 09:54:03 +000024696
24697 FILE *f = fopen ("conftest.val", "w");
24698 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024699 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024700 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024701 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000024702 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024703 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000024704 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024705 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024706 }
24707 else
24708 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000024709 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024710 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000024711 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024712 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024713 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024714 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024715
24716 ;
24717 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024718}
Martin v. Löwis11437992002-04-12 09:54:03 +000024719_ACEOF
24720rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024721if { (ac_try="$ac_link"
24722case "(($ac_try" in
24723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24724 *) ac_try_echo=$ac_try;;
24725esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024727 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024728 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024730 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024731 { (case "(($ac_try" in
24732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24733 *) ac_try_echo=$ac_try;;
24734esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024736 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024737 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024739 (exit $ac_status); }; }; then
24740 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024741else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024742 echo "$as_me: program exited with status $ac_status" >&5
24743echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024744sed 's/^/| /' conftest.$ac_ext >&5
24745
Martin v. Löwis11437992002-04-12 09:54:03 +000024746( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000024747if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024748 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024749See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024750echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024751See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024752 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024753 else
24754 ac_cv_sizeof_wchar_t=0
24755 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024757rm -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 +000024758fi
24759rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024760fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024761{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24762echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024763
24764
24765
Martin v. Löwis11437992002-04-12 09:54:03 +000024766cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024767#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024768_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024769
Michael W. Hudson54241132001-12-07 15:38:26 +000024770
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024771fi
24772
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024773{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24774echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024775have_ucs4_tcl=no
24776cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024777/* confdefs.h. */
24778_ACEOF
24779cat confdefs.h >>conftest.$ac_ext
24780cat >>conftest.$ac_ext <<_ACEOF
24781/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024782
24783#include <tcl.h>
24784#if TCL_UTF_MAX != 6
24785# error "NOT UCS4_TCL"
24786#endif
24787int
24788main ()
24789{
24790
24791 ;
24792 return 0;
24793}
24794_ACEOF
24795rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024796if { (ac_try="$ac_compile"
24797case "(($ac_try" in
24798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24799 *) ac_try_echo=$ac_try;;
24800esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024802 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024804 grep -v '^ *+' conftest.er1 >conftest.err
24805 rm -f conftest.er1
24806 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024808 (exit $ac_status); } && {
24809 test -z "$ac_c_werror_flag" ||
24810 test ! -s conftest.err
24811 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024812
24813
24814cat >>confdefs.h <<\_ACEOF
24815#define HAVE_UCS4_TCL 1
24816_ACEOF
24817
24818 have_ucs4_tcl=yes
24819
24820else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024822sed 's/^/| /' conftest.$ac_ext >&5
24823
Martin v. Löwiseba40652007-08-30 20:10:57 +000024824
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024826
24827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024828{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24829echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024830
Skip Montanaro6dead952003-09-25 14:50:04 +000024831# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024832if test "$wchar_h" = yes
24833then
24834 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024835 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24836echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024837 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024838 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024839else
24840
24841 if test "$cross_compiling" = yes; then
24842 ac_cv_wchar_t_signed=yes
24843else
24844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024845/* confdefs.h. */
24846_ACEOF
24847cat confdefs.h >>conftest.$ac_ext
24848cat >>conftest.$ac_ext <<_ACEOF
24849/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024850
24851 #include <wchar.h>
24852 int main()
24853 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000024854 /* Success: exit code 0 */
24855 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024856 }
24857
24858_ACEOF
24859rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024860if { (ac_try="$ac_link"
24861case "(($ac_try" in
24862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24863 *) ac_try_echo=$ac_try;;
24864esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024866 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024867 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024869 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024870 { (case "(($ac_try" in
24871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24872 *) ac_try_echo=$ac_try;;
24873esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024875 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024876 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024878 (exit $ac_status); }; }; then
24879 ac_cv_wchar_t_signed=yes
24880else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024881 echo "$as_me: program exited with status $ac_status" >&5
24882echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024883sed 's/^/| /' conftest.$ac_ext >&5
24884
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024885( exit $ac_status )
24886ac_cv_wchar_t_signed=no
24887fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024888rm -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 +000024889fi
24890
Martin v. Löwiseba40652007-08-30 20:10:57 +000024891
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024892fi
24893
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024894 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24895echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024896fi
24897
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024898{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
24899echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024900# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024901if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024902 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024903else
24904 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000024905fi
24906
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024907
24908if test $enable_unicode = yes
24909then
Martin v. Löwisfd917792001-06-27 20:22:04 +000024910 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024911 case "$have_ucs4_tcl" in
24912 yes) enable_unicode="ucs4"
24913 ;;
24914 *) enable_unicode="ucs2"
24915 ;;
24916 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024917fi
24918
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024919
24920
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024921case "$enable_unicode" in
24922ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000024923 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024924#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000024925_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024926
24927 ;;
24928ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000024929 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024930#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024931_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024932
24933 ;;
24934esac
24935
Michael W. Hudson54241132001-12-07 15:38:26 +000024936
Martin v. Löwis11437992002-04-12 09:54:03 +000024937
24938
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024939
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024940if test "$enable_unicode" = "no"
24941then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000024942 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024943 { echo "$as_me:$LINENO: result: not used" >&5
24944echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024945else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000024946 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000024947
24948cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024949#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024950_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024951
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024952
24953 # wchar_t is only usable if it maps to an unsigned type
24954 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024955 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024956 then
24957 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024958
Martin v. Löwis11437992002-04-12 09:54:03 +000024959cat >>confdefs.h <<\_ACEOF
24960#define HAVE_USABLE_WCHAR_T 1
24961_ACEOF
24962
24963 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024964#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024965_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024966
24967 elif test "$ac_cv_sizeof_short" = "$unicode_size"
24968 then
24969 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000024970 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024971#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024972_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024973
24974 elif test "$ac_cv_sizeof_long" = "$unicode_size"
24975 then
24976 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000024977 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024978#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024979_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024980
24981 else
24982 PY_UNICODE_TYPE="no type found"
24983 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024984 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24985echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024986fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000024987
24988# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024989{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24990echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024991if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024992 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024993else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024994 # See if sys/param.h defines the BYTE_ORDER macro.
24995cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024996/* confdefs.h. */
24997_ACEOF
24998cat confdefs.h >>conftest.$ac_ext
24999cat >>conftest.$ac_ext <<_ACEOF
25000/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025001#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025002#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025003
Martin v. Löwis11437992002-04-12 09:54:03 +000025004int
25005main ()
25006{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025007#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25008 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25009 bogus endian macros
25010#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025011
25012 ;
25013 return 0;
25014}
25015_ACEOF
25016rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025017if { (ac_try="$ac_compile"
25018case "(($ac_try" in
25019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25020 *) ac_try_echo=$ac_try;;
25021esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025023 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025024 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025025 grep -v '^ *+' conftest.er1 >conftest.err
25026 rm -f conftest.er1
25027 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025029 (exit $ac_status); } && {
25030 test -z "$ac_c_werror_flag" ||
25031 test ! -s conftest.err
25032 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025033 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025034cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025035/* confdefs.h. */
25036_ACEOF
25037cat confdefs.h >>conftest.$ac_ext
25038cat >>conftest.$ac_ext <<_ACEOF
25039/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025040#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025041#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025042
Martin v. Löwis11437992002-04-12 09:54:03 +000025043int
25044main ()
25045{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025046#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025047 not big endian
25048#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025049
25050 ;
25051 return 0;
25052}
25053_ACEOF
25054rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025055if { (ac_try="$ac_compile"
25056case "(($ac_try" in
25057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25058 *) ac_try_echo=$ac_try;;
25059esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025061 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025062 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025063 grep -v '^ *+' conftest.er1 >conftest.err
25064 rm -f conftest.er1
25065 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025067 (exit $ac_status); } && {
25068 test -z "$ac_c_werror_flag" ||
25069 test ! -s conftest.err
25070 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025071 ac_cv_c_bigendian=yes
25072else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025073 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025074sed 's/^/| /' conftest.$ac_ext >&5
25075
Martin v. Löwiseba40652007-08-30 20:10:57 +000025076 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025077fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025078
25079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025080else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025082sed 's/^/| /' conftest.$ac_ext >&5
25083
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025084 # It does not; compile a test program.
25085if test "$cross_compiling" = yes; then
25086 # try to guess the endianness by grepping values into an object file
25087 ac_cv_c_bigendian=unknown
25088 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025089/* confdefs.h. */
25090_ACEOF
25091cat confdefs.h >>conftest.$ac_ext
25092cat >>conftest.$ac_ext <<_ACEOF
25093/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025094short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25095short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25096void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25097short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25098short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25099void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025100int
25101main ()
25102{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025103 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025104 ;
25105 return 0;
25106}
25107_ACEOF
25108rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025109if { (ac_try="$ac_compile"
25110case "(($ac_try" in
25111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25112 *) ac_try_echo=$ac_try;;
25113esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025115 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025117 grep -v '^ *+' conftest.er1 >conftest.err
25118 rm -f conftest.er1
25119 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025121 (exit $ac_status); } && {
25122 test -z "$ac_c_werror_flag" ||
25123 test ! -s conftest.err
25124 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025125 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025126 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025127fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025128if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25129 if test "$ac_cv_c_bigendian" = unknown; then
25130 ac_cv_c_bigendian=no
25131 else
25132 # finding both strings is unlikely to happen, but who knows?
25133 ac_cv_c_bigendian=unknown
25134 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025135fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025136else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025137 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025138sed 's/^/| /' conftest.$ac_ext >&5
25139
Martin v. Löwiseba40652007-08-30 20:10:57 +000025140
Martin v. Löwis11437992002-04-12 09:54:03 +000025141fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025142
25143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025144else
25145 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025146/* confdefs.h. */
25147_ACEOF
25148cat confdefs.h >>conftest.$ac_ext
25149cat >>conftest.$ac_ext <<_ACEOF
25150/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000025151$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025152int
25153main ()
25154{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025155
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025156 /* Are we little or big endian? From Harbison&Steele. */
25157 union
25158 {
25159 long int l;
25160 char c[sizeof (long int)];
25161 } u;
25162 u.l = 1;
25163 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025164
25165 ;
25166 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025167}
Martin v. Löwis11437992002-04-12 09:54:03 +000025168_ACEOF
25169rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025170if { (ac_try="$ac_link"
25171case "(($ac_try" in
25172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25173 *) ac_try_echo=$ac_try;;
25174esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025176 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025177 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025179 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025180 { (case "(($ac_try" in
25181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25182 *) ac_try_echo=$ac_try;;
25183esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025185 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025186 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025188 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025189 ac_cv_c_bigendian=no
25190else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025191 echo "$as_me: program exited with status $ac_status" >&5
25192echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025193sed 's/^/| /' conftest.$ac_ext >&5
25194
Martin v. Löwis11437992002-04-12 09:54:03 +000025195( exit $ac_status )
25196ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025198rm -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 +000025199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025200
25201
Martin v. Löwis11437992002-04-12 09:54:03 +000025202fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025203
25204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25205fi
25206{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25207echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25208case $ac_cv_c_bigendian in
25209 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025210
25211cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025212#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025213_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025214 ;;
25215 no)
25216 ;;
25217 *)
25218 { { echo "$as_me:$LINENO: error: unknown endianness
25219presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25220echo "$as_me: error: unknown endianness
25221presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025222 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025223esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025224
Michael W. Hudson54241132001-12-07 15:38:26 +000025225
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025226# Check whether right shifting a negative integer extends the sign bit
25227# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025228{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25229echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025230if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025231 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025232else
Martin v. Löwis11437992002-04-12 09:54:03 +000025233
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025234if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025235 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025236else
Martin v. Löwis11437992002-04-12 09:54:03 +000025237 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025238/* confdefs.h. */
25239_ACEOF
25240cat confdefs.h >>conftest.$ac_ext
25241cat >>conftest.$ac_ext <<_ACEOF
25242/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025243
25244int main()
25245{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025246 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025247}
25248
Martin v. Löwis11437992002-04-12 09:54:03 +000025249_ACEOF
25250rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025251if { (ac_try="$ac_link"
25252case "(($ac_try" in
25253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25254 *) ac_try_echo=$ac_try;;
25255esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025257 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025258 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025260 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025261 { (case "(($ac_try" in
25262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25263 *) ac_try_echo=$ac_try;;
25264esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025266 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025267 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025269 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025270 ac_cv_rshift_extends_sign=yes
25271else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025272 echo "$as_me: program exited with status $ac_status" >&5
25273echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025274sed 's/^/| /' conftest.$ac_ext >&5
25275
Martin v. Löwis11437992002-04-12 09:54:03 +000025276( exit $ac_status )
25277ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025278fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025279rm -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 +000025280fi
25281
Martin v. Löwiseba40652007-08-30 20:10:57 +000025282
25283fi
25284
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025285{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25286echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025287if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025288then
Martin v. Löwis11437992002-04-12 09:54:03 +000025289
25290cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025291#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025292_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025293
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025294fi
25295
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025296# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025297{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25298echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025299if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025300 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025301else
Martin v. Löwis11437992002-04-12 09:54:03 +000025302
25303cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025304/* confdefs.h. */
25305_ACEOF
25306cat confdefs.h >>conftest.$ac_ext
25307cat >>conftest.$ac_ext <<_ACEOF
25308/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025309#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025310int
25311main ()
25312{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025313
25314 FILE *f = fopen("/dev/null", "r");
25315 flockfile(f);
25316 getc_unlocked(f);
25317 funlockfile(f);
25318
Martin v. Löwis11437992002-04-12 09:54:03 +000025319 ;
25320 return 0;
25321}
25322_ACEOF
25323rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025324if { (ac_try="$ac_link"
25325case "(($ac_try" in
25326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25327 *) ac_try_echo=$ac_try;;
25328esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025330 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025331 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025332 grep -v '^ *+' conftest.er1 >conftest.err
25333 rm -f conftest.er1
25334 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025336 (exit $ac_status); } && {
25337 test -z "$ac_c_werror_flag" ||
25338 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025339 } && test -s conftest$ac_exeext &&
25340 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025341 ac_cv_have_getc_unlocked=yes
25342else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025343 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025344sed 's/^/| /' conftest.$ac_ext >&5
25345
Martin v. Löwiseba40652007-08-30 20:10:57 +000025346 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025347fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025348
25349rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025350 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025351fi
25352
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025353{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25354echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025355if test "$ac_cv_have_getc_unlocked" = yes
25356then
Martin v. Löwis11437992002-04-12 09:54:03 +000025357
25358cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025359#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025360_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025361
25362fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025363
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025364# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025365# save the value of LIBS so we don't actually link Python with readline
25366LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025367
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025368# On some systems we need to link readline to a termcap compatible
25369# library. NOTE: Keep the precedence of listed libraries synchronised
25370# with setup.py.
25371py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025372{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25373echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025374for py_libtermcap in "" ncursesw ncurses curses termcap; do
25375 if test -z "$py_libtermcap"; then
25376 READLINE_LIBS="-lreadline"
25377 else
25378 READLINE_LIBS="-lreadline -l$py_libtermcap"
25379 fi
25380 LIBS="$READLINE_LIBS $LIBS_no_readline"
25381 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025382/* confdefs.h. */
25383_ACEOF
25384cat confdefs.h >>conftest.$ac_ext
25385cat >>conftest.$ac_ext <<_ACEOF
25386/* end confdefs.h. */
25387
Martin v. Löwiseba40652007-08-30 20:10:57 +000025388/* Override any GCC internal prototype to avoid an error.
25389 Use char because int might match the return type of a GCC
25390 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025391#ifdef __cplusplus
25392extern "C"
25393#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025394char readline ();
25395int
25396main ()
25397{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025398return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025399 ;
25400 return 0;
25401}
25402_ACEOF
25403rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025404if { (ac_try="$ac_link"
25405case "(($ac_try" in
25406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25407 *) ac_try_echo=$ac_try;;
25408esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025410 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025411 ac_status=$?
25412 grep -v '^ *+' conftest.er1 >conftest.err
25413 rm -f conftest.er1
25414 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025416 (exit $ac_status); } && {
25417 test -z "$ac_c_werror_flag" ||
25418 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025419 } && test -s conftest$ac_exeext &&
25420 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025421 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025422else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025423 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025424sed 's/^/| /' conftest.$ac_ext >&5
25425
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025426
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025427fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025428
25429rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025430 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025431 if test $py_cv_lib_readline = yes; then
25432 break
25433 fi
25434done
25435# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25436#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000025437if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025438 { echo "$as_me:$LINENO: result: none" >&5
25439echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025440else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025441 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25442echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025443
25444cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025445#define HAVE_LIBREADLINE 1
25446_ACEOF
25447
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025448fi
25449
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025450# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025451{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25452echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025453if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025454 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025455else
25456 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025457LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025458cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025459/* confdefs.h. */
25460_ACEOF
25461cat confdefs.h >>conftest.$ac_ext
25462cat >>conftest.$ac_ext <<_ACEOF
25463/* end confdefs.h. */
25464
Martin v. Löwiseba40652007-08-30 20:10:57 +000025465/* Override any GCC internal prototype to avoid an error.
25466 Use char because int might match the return type of a GCC
25467 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025468#ifdef __cplusplus
25469extern "C"
25470#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025471char rl_callback_handler_install ();
25472int
25473main ()
25474{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025475return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025476 ;
25477 return 0;
25478}
25479_ACEOF
25480rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025481if { (ac_try="$ac_link"
25482case "(($ac_try" in
25483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25484 *) ac_try_echo=$ac_try;;
25485esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025487 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025488 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025489 grep -v '^ *+' conftest.er1 >conftest.err
25490 rm -f conftest.er1
25491 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025493 (exit $ac_status); } && {
25494 test -z "$ac_c_werror_flag" ||
25495 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025496 } && test -s conftest$ac_exeext &&
25497 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025498 ac_cv_lib_readline_rl_callback_handler_install=yes
25499else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025500 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025501sed 's/^/| /' conftest.$ac_ext >&5
25502
Martin v. Löwiseba40652007-08-30 20:10:57 +000025503 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025505
25506rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025507 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025508LIBS=$ac_check_lib_save_LIBS
25509fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025510{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25511echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25512if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025513
25514cat >>confdefs.h <<\_ACEOF
25515#define HAVE_RL_CALLBACK 1
25516_ACEOF
25517
25518fi
25519
25520
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025521# check for readline 2.2
25522cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025523/* confdefs.h. */
25524_ACEOF
25525cat confdefs.h >>conftest.$ac_ext
25526cat >>conftest.$ac_ext <<_ACEOF
25527/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025528#include <readline/readline.h>
25529_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025530if { (ac_try="$ac_cpp conftest.$ac_ext"
25531case "(($ac_try" in
25532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25533 *) ac_try_echo=$ac_try;;
25534esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025536 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025537 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025538 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025539 rm -f conftest.er1
25540 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025542 (exit $ac_status); } >/dev/null && {
25543 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25544 test ! -s conftest.err
25545 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025546 have_readline=yes
25547else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025549sed 's/^/| /' conftest.$ac_ext >&5
25550
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025551 have_readline=no
25552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025553
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025554rm -f conftest.err conftest.$ac_ext
25555if test $have_readline = yes
25556then
25557 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025558/* confdefs.h. */
25559_ACEOF
25560cat confdefs.h >>conftest.$ac_ext
25561cat >>conftest.$ac_ext <<_ACEOF
25562/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025563#include <readline/readline.h>
25564
25565_ACEOF
25566if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025567 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025568
25569cat >>confdefs.h <<\_ACEOF
25570#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25571_ACEOF
25572
25573fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000025574rm -f conftest*
25575
25576 cat >conftest.$ac_ext <<_ACEOF
25577/* confdefs.h. */
25578_ACEOF
25579cat confdefs.h >>conftest.$ac_ext
25580cat >>conftest.$ac_ext <<_ACEOF
25581/* end confdefs.h. */
25582#include <readline/readline.h>
25583
25584_ACEOF
25585if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25586 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25587
25588cat >>confdefs.h <<\_ACEOF
25589#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25590_ACEOF
25591
25592fi
25593rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025594
25595fi
25596
Martin v. Löwis0daad592001-09-30 21:09:59 +000025597# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025598{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25599echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025600if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025601 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025602else
Martin v. Löwis11437992002-04-12 09:54:03 +000025603 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025604LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025605cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025606/* confdefs.h. */
25607_ACEOF
25608cat confdefs.h >>conftest.$ac_ext
25609cat >>conftest.$ac_ext <<_ACEOF
25610/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025611
Martin v. Löwiseba40652007-08-30 20:10:57 +000025612/* Override any GCC internal prototype to avoid an error.
25613 Use char because int might match the return type of a GCC
25614 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025615#ifdef __cplusplus
25616extern "C"
25617#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025618char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025619int
25620main ()
25621{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025622return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025623 ;
25624 return 0;
25625}
25626_ACEOF
25627rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025628if { (ac_try="$ac_link"
25629case "(($ac_try" in
25630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25631 *) ac_try_echo=$ac_try;;
25632esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025634 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025635 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025636 grep -v '^ *+' conftest.er1 >conftest.err
25637 rm -f conftest.er1
25638 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025640 (exit $ac_status); } && {
25641 test -z "$ac_c_werror_flag" ||
25642 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025643 } && test -s conftest$ac_exeext &&
25644 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025645 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025646else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025648sed 's/^/| /' conftest.$ac_ext >&5
25649
Martin v. Löwiseba40652007-08-30 20:10:57 +000025650 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025652
25653rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025654 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025655LIBS=$ac_check_lib_save_LIBS
25656fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025657{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25658echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25659if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025660
Martin v. Löwis11437992002-04-12 09:54:03 +000025661cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025662#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025663_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025664
Martin v. Löwis0daad592001-09-30 21:09:59 +000025665fi
25666
Michael W. Hudson54241132001-12-07 15:38:26 +000025667
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025668# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025669{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25670echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025671if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025672 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025673else
25674 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025675LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025676cat >conftest.$ac_ext <<_ACEOF
25677/* confdefs.h. */
25678_ACEOF
25679cat confdefs.h >>conftest.$ac_ext
25680cat >>conftest.$ac_ext <<_ACEOF
25681/* end confdefs.h. */
25682
25683/* Override any GCC internal prototype to avoid an error.
25684 Use char because int might match the return type of a GCC
25685 builtin and then its argument prototype would still apply. */
25686#ifdef __cplusplus
25687extern "C"
25688#endif
25689char rl_completion_display_matches_hook ();
25690int
25691main ()
25692{
25693return rl_completion_display_matches_hook ();
25694 ;
25695 return 0;
25696}
25697_ACEOF
25698rm -f conftest.$ac_objext conftest$ac_exeext
25699if { (ac_try="$ac_link"
25700case "(($ac_try" in
25701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25702 *) ac_try_echo=$ac_try;;
25703esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025705 (eval "$ac_link") 2>conftest.er1
25706 ac_status=$?
25707 grep -v '^ *+' conftest.er1 >conftest.err
25708 rm -f conftest.er1
25709 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025711 (exit $ac_status); } && {
25712 test -z "$ac_c_werror_flag" ||
25713 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025714 } && test -s conftest$ac_exeext &&
25715 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025716 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25717else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025718 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025719sed 's/^/| /' conftest.$ac_ext >&5
25720
25721 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25722fi
25723
25724rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25725 conftest$ac_exeext conftest.$ac_ext
25726LIBS=$ac_check_lib_save_LIBS
25727fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025728{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25729echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25730if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025731
25732cat >>confdefs.h <<\_ACEOF
25733#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25734_ACEOF
25735
25736fi
25737
25738
Martin v. Löwis0daad592001-09-30 21:09:59 +000025739# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025740{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25741echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025742if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025743 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025744else
Martin v. Löwis11437992002-04-12 09:54:03 +000025745 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025746LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025747cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025748/* confdefs.h. */
25749_ACEOF
25750cat confdefs.h >>conftest.$ac_ext
25751cat >>conftest.$ac_ext <<_ACEOF
25752/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025753
Martin v. Löwiseba40652007-08-30 20:10:57 +000025754/* Override any GCC internal prototype to avoid an error.
25755 Use char because int might match the return type of a GCC
25756 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025757#ifdef __cplusplus
25758extern "C"
25759#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025760char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025761int
25762main ()
25763{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025764return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025765 ;
25766 return 0;
25767}
25768_ACEOF
25769rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025770if { (ac_try="$ac_link"
25771case "(($ac_try" in
25772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25773 *) ac_try_echo=$ac_try;;
25774esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025776 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025777 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025778 grep -v '^ *+' conftest.er1 >conftest.err
25779 rm -f conftest.er1
25780 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025782 (exit $ac_status); } && {
25783 test -z "$ac_c_werror_flag" ||
25784 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025785 } && test -s conftest$ac_exeext &&
25786 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025787 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025788else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025790sed 's/^/| /' conftest.$ac_ext >&5
25791
Martin v. Löwiseba40652007-08-30 20:10:57 +000025792 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025794
25795rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025796 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025797LIBS=$ac_check_lib_save_LIBS
25798fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025799{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25800echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25801if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025802
Martin v. Löwis11437992002-04-12 09:54:03 +000025803cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025804#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025805_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025806
Guido van Rossum353ae582001-07-10 16:45:32 +000025807fi
25808
Jack Jansendd19cf82001-12-06 22:36:17 +000025809
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025810# also in readline 4.2
25811cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025812/* confdefs.h. */
25813_ACEOF
25814cat confdefs.h >>conftest.$ac_ext
25815cat >>conftest.$ac_ext <<_ACEOF
25816/* end confdefs.h. */
25817#include <readline/readline.h>
25818_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025819if { (ac_try="$ac_cpp conftest.$ac_ext"
25820case "(($ac_try" in
25821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25822 *) ac_try_echo=$ac_try;;
25823esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025825 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025826 ac_status=$?
25827 grep -v '^ *+' conftest.er1 >conftest.err
25828 rm -f conftest.er1
25829 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025831 (exit $ac_status); } >/dev/null && {
25832 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25833 test ! -s conftest.err
25834 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025835 have_readline=yes
25836else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025837 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025838sed 's/^/| /' conftest.$ac_ext >&5
25839
25840 have_readline=no
25841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025842
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025843rm -f conftest.err conftest.$ac_ext
25844if test $have_readline = yes
25845then
25846 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025847/* confdefs.h. */
25848_ACEOF
25849cat confdefs.h >>conftest.$ac_ext
25850cat >>conftest.$ac_ext <<_ACEOF
25851/* end confdefs.h. */
25852#include <readline/readline.h>
25853
25854_ACEOF
25855if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25856 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25857
25858cat >>confdefs.h <<\_ACEOF
25859#define HAVE_RL_CATCH_SIGNAL 1
25860_ACEOF
25861
25862fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000025863rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025864
25865fi
25866
Martin v. Löwis82bca632006-02-10 20:49:30 +000025867# End of readline checks: restore LIBS
25868LIBS=$LIBS_no_readline
25869
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025870{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25871echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025872if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025873 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025874else
Martin v. Löwis11437992002-04-12 09:54:03 +000025875
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025876if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025877 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025878else
Martin v. Löwis11437992002-04-12 09:54:03 +000025879 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025880/* confdefs.h. */
25881_ACEOF
25882cat confdefs.h >>conftest.$ac_ext
25883cat >>conftest.$ac_ext <<_ACEOF
25884/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025885
25886int main()
25887{
25888 int val1 = nice(1);
25889 if (val1 != -1 && val1 == nice(2))
25890 exit(0);
25891 exit(1);
25892}
25893
Martin v. Löwis11437992002-04-12 09:54:03 +000025894_ACEOF
25895rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025896if { (ac_try="$ac_link"
25897case "(($ac_try" in
25898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25899 *) ac_try_echo=$ac_try;;
25900esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025902 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025903 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025905 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025906 { (case "(($ac_try" in
25907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25908 *) ac_try_echo=$ac_try;;
25909esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025911 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025912 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025914 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025915 ac_cv_broken_nice=yes
25916else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025917 echo "$as_me: program exited with status $ac_status" >&5
25918echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025919sed 's/^/| /' conftest.$ac_ext >&5
25920
Martin v. Löwis11437992002-04-12 09:54:03 +000025921( exit $ac_status )
25922ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025924rm -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 +000025925fi
25926
Martin v. Löwiseba40652007-08-30 20:10:57 +000025927
25928fi
25929
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025930{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25931echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025932if test "$ac_cv_broken_nice" = yes
25933then
Martin v. Löwis11437992002-04-12 09:54:03 +000025934
25935cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025936#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025937_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025938
25939fi
25940
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025941{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25942echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025943if test "${ac_cv_broken_poll+set}" = set; then
25944 echo $ECHO_N "(cached) $ECHO_C" >&6
25945else
25946 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025947 ac_cv_broken_poll=no
25948else
25949 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025950/* confdefs.h. */
25951_ACEOF
25952cat confdefs.h >>conftest.$ac_ext
25953cat >>conftest.$ac_ext <<_ACEOF
25954/* end confdefs.h. */
25955
25956#include <poll.h>
25957
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025958int main()
25959{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025960 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025961 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025962
25963 close (42);
25964
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025965 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025966 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025967 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025968 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025969 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025970 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025971 return 1;
25972}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025973
25974_ACEOF
25975rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025976if { (ac_try="$ac_link"
25977case "(($ac_try" in
25978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25979 *) ac_try_echo=$ac_try;;
25980esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025982 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025983 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025985 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025986 { (case "(($ac_try" in
25987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25988 *) ac_try_echo=$ac_try;;
25989esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025991 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025992 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025994 (exit $ac_status); }; }; then
25995 ac_cv_broken_poll=yes
25996else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025997 echo "$as_me: program exited with status $ac_status" >&5
25998echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025999sed 's/^/| /' conftest.$ac_ext >&5
26000
26001( exit $ac_status )
26002ac_cv_broken_poll=no
26003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026004rm -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 +000026005fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026006
26007
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026008fi
26009
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026010{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26011echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026012if test "$ac_cv_broken_poll" = yes
26013then
26014
26015cat >>confdefs.h <<\_ACEOF
26016#define HAVE_BROKEN_POLL 1
26017_ACEOF
26018
26019fi
26020
Brett Cannon43802422005-02-10 20:48:03 +000026021# 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 +000026022# (which is not required by ISO C or UNIX spec) and/or if we support
26023# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026024{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26025echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026026if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026027 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026028else
26029 cat >conftest.$ac_ext <<_ACEOF
26030/* confdefs.h. */
26031_ACEOF
26032cat confdefs.h >>conftest.$ac_ext
26033cat >>conftest.$ac_ext <<_ACEOF
26034/* end confdefs.h. */
26035#include <sys/types.h>
26036#include <$ac_cv_struct_tm>
26037
26038
26039int
26040main ()
26041{
26042static struct tm ac_aggr;
26043if (ac_aggr.tm_zone)
26044return 0;
26045 ;
26046 return 0;
26047}
26048_ACEOF
26049rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026050if { (ac_try="$ac_compile"
26051case "(($ac_try" in
26052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26053 *) ac_try_echo=$ac_try;;
26054esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026056 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026057 ac_status=$?
26058 grep -v '^ *+' conftest.er1 >conftest.err
26059 rm -f conftest.er1
26060 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026062 (exit $ac_status); } && {
26063 test -z "$ac_c_werror_flag" ||
26064 test ! -s conftest.err
26065 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026066 ac_cv_member_struct_tm_tm_zone=yes
26067else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026068 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026069sed 's/^/| /' conftest.$ac_ext >&5
26070
Martin v. Löwiseba40652007-08-30 20:10:57 +000026071 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026072/* confdefs.h. */
26073_ACEOF
26074cat confdefs.h >>conftest.$ac_ext
26075cat >>conftest.$ac_ext <<_ACEOF
26076/* end confdefs.h. */
26077#include <sys/types.h>
26078#include <$ac_cv_struct_tm>
26079
26080
26081int
26082main ()
26083{
26084static struct tm ac_aggr;
26085if (sizeof ac_aggr.tm_zone)
26086return 0;
26087 ;
26088 return 0;
26089}
26090_ACEOF
26091rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026092if { (ac_try="$ac_compile"
26093case "(($ac_try" in
26094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26095 *) ac_try_echo=$ac_try;;
26096esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026098 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026099 ac_status=$?
26100 grep -v '^ *+' conftest.er1 >conftest.err
26101 rm -f conftest.er1
26102 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026104 (exit $ac_status); } && {
26105 test -z "$ac_c_werror_flag" ||
26106 test ! -s conftest.err
26107 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026108 ac_cv_member_struct_tm_tm_zone=yes
26109else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026110 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026111sed 's/^/| /' conftest.$ac_ext >&5
26112
Martin v. Löwiseba40652007-08-30 20:10:57 +000026113 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026114fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026115
26116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026118
26119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026120fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026121{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26122echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26123if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026124
26125cat >>confdefs.h <<_ACEOF
26126#define HAVE_STRUCT_TM_TM_ZONE 1
26127_ACEOF
26128
26129
26130fi
26131
26132if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26133
26134cat >>confdefs.h <<\_ACEOF
26135#define HAVE_TM_ZONE 1
26136_ACEOF
26137
26138else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026139 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26140echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000026141if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026142 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000026143else
26144 cat >conftest.$ac_ext <<_ACEOF
26145/* confdefs.h. */
26146_ACEOF
26147cat confdefs.h >>conftest.$ac_ext
26148cat >>conftest.$ac_ext <<_ACEOF
26149/* end confdefs.h. */
26150#include <time.h>
26151
26152int
26153main ()
26154{
26155#ifndef tzname
26156 (void) tzname;
26157#endif
26158
26159 ;
26160 return 0;
26161}
26162_ACEOF
26163rm -f conftest.$ac_objext
26164if { (ac_try="$ac_compile"
26165case "(($ac_try" in
26166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26167 *) ac_try_echo=$ac_try;;
26168esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026170 (eval "$ac_compile") 2>conftest.er1
26171 ac_status=$?
26172 grep -v '^ *+' conftest.er1 >conftest.err
26173 rm -f conftest.er1
26174 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026176 (exit $ac_status); } && {
26177 test -z "$ac_c_werror_flag" ||
26178 test ! -s conftest.err
26179 } && test -s conftest.$ac_objext; then
26180 ac_cv_have_decl_tzname=yes
26181else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026182 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026183sed 's/^/| /' conftest.$ac_ext >&5
26184
26185 ac_cv_have_decl_tzname=no
26186fi
26187
26188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26189fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026190{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26191echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26192if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026193
26194cat >>confdefs.h <<_ACEOF
26195#define HAVE_DECL_TZNAME 1
26196_ACEOF
26197
26198
26199else
26200 cat >>confdefs.h <<_ACEOF
26201#define HAVE_DECL_TZNAME 0
26202_ACEOF
26203
26204
26205fi
26206
26207
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026208 { echo "$as_me:$LINENO: checking for tzname" >&5
26209echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026210if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026211 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026212else
26213 cat >conftest.$ac_ext <<_ACEOF
26214/* confdefs.h. */
26215_ACEOF
26216cat confdefs.h >>conftest.$ac_ext
26217cat >>conftest.$ac_ext <<_ACEOF
26218/* end confdefs.h. */
26219#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000026220#if !HAVE_DECL_TZNAME
26221extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026222#endif
26223
26224int
26225main ()
26226{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026227return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026228 ;
26229 return 0;
26230}
26231_ACEOF
26232rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026233if { (ac_try="$ac_link"
26234case "(($ac_try" in
26235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26236 *) ac_try_echo=$ac_try;;
26237esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026239 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026240 ac_status=$?
26241 grep -v '^ *+' conftest.er1 >conftest.err
26242 rm -f conftest.er1
26243 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026245 (exit $ac_status); } && {
26246 test -z "$ac_c_werror_flag" ||
26247 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026248 } && test -s conftest$ac_exeext &&
26249 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026250 ac_cv_var_tzname=yes
26251else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026252 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026253sed 's/^/| /' conftest.$ac_ext >&5
26254
Martin v. Löwiseba40652007-08-30 20:10:57 +000026255 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026256fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026257
26258rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026259 conftest$ac_exeext conftest.$ac_ext
26260fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026261{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26262echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026263 if test $ac_cv_var_tzname = yes; then
26264
26265cat >>confdefs.h <<\_ACEOF
26266#define HAVE_TZNAME 1
26267_ACEOF
26268
26269 fi
26270fi
26271
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026272
Martin v. Löwis1d459062005-03-14 21:23:33 +000026273# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026274{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26275echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026276if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026277 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026278else
26279
26280if test "$cross_compiling" = yes; then
26281 ac_cv_working_tzset=no
26282else
26283 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026284/* confdefs.h. */
26285_ACEOF
26286cat confdefs.h >>conftest.$ac_ext
26287cat >>conftest.$ac_ext <<_ACEOF
26288/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026289
26290#include <stdlib.h>
26291#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026292#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026293
26294#if HAVE_TZNAME
26295extern char *tzname[];
26296#endif
26297
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026298int main()
26299{
Brett Cannon18367812003-09-19 00:59:16 +000026300 /* Note that we need to ensure that not only does tzset(3)
26301 do 'something' with localtime, but it works as documented
26302 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026303 This includes making sure that tzname is set properly if
26304 tm->tm_zone does not exist since it is the alternative way
26305 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026306
26307 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026308 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026309 */
26310
Martin v. Löwis1d459062005-03-14 21:23:33 +000026311 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026312 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26313
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026314 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026315 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026316 if (localtime(&groundhogday)->tm_hour != 0)
26317 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026318#if HAVE_TZNAME
26319 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26320 if (strcmp(tzname[0], "UTC") ||
26321 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26322 exit(1);
26323#endif
Brett Cannon18367812003-09-19 00:59:16 +000026324
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026325 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026326 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026327 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026328 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026329#if HAVE_TZNAME
26330 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26331 exit(1);
26332#endif
Brett Cannon18367812003-09-19 00:59:16 +000026333
26334 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26335 tzset();
26336 if (localtime(&groundhogday)->tm_hour != 11)
26337 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026338#if HAVE_TZNAME
26339 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26340 exit(1);
26341#endif
26342
26343#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026344 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26345 exit(1);
26346 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26347 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026348#endif
Brett Cannon18367812003-09-19 00:59:16 +000026349
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026350 exit(0);
26351}
26352
26353_ACEOF
26354rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026355if { (ac_try="$ac_link"
26356case "(($ac_try" in
26357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26358 *) ac_try_echo=$ac_try;;
26359esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026361 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026362 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026364 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026365 { (case "(($ac_try" in
26366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26367 *) ac_try_echo=$ac_try;;
26368esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026370 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026371 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026373 (exit $ac_status); }; }; then
26374 ac_cv_working_tzset=yes
26375else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026376 echo "$as_me: program exited with status $ac_status" >&5
26377echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026378sed 's/^/| /' conftest.$ac_ext >&5
26379
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026380( exit $ac_status )
26381ac_cv_working_tzset=no
26382fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026383rm -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 +000026384fi
26385
Martin v. Löwiseba40652007-08-30 20:10:57 +000026386
26387fi
26388
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026389{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26390echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026391if test "$ac_cv_working_tzset" = yes
26392then
26393
26394cat >>confdefs.h <<\_ACEOF
26395#define HAVE_WORKING_TZSET 1
26396_ACEOF
26397
26398fi
26399
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026400# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026401{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26402echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026403if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026404 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026405else
26406 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026407/* confdefs.h. */
26408_ACEOF
26409cat confdefs.h >>conftest.$ac_ext
26410cat >>conftest.$ac_ext <<_ACEOF
26411/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026412#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026413int
26414main ()
26415{
26416
26417struct stat st;
26418st.st_mtim.tv_nsec = 1;
26419
26420 ;
26421 return 0;
26422}
26423_ACEOF
26424rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026425if { (ac_try="$ac_compile"
26426case "(($ac_try" in
26427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26428 *) ac_try_echo=$ac_try;;
26429esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026431 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026432 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026433 grep -v '^ *+' conftest.er1 >conftest.err
26434 rm -f conftest.er1
26435 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026437 (exit $ac_status); } && {
26438 test -z "$ac_c_werror_flag" ||
26439 test ! -s conftest.err
26440 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026441 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026442else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026444sed 's/^/| /' conftest.$ac_ext >&5
26445
Martin v. Löwiseba40652007-08-30 20:10:57 +000026446 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026447fi
26448
Martin v. Löwiseba40652007-08-30 20:10:57 +000026449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26450fi
26451
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026452{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26453echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026454if test "$ac_cv_stat_tv_nsec" = yes
26455then
26456
26457cat >>confdefs.h <<\_ACEOF
26458#define HAVE_STAT_TV_NSEC 1
26459_ACEOF
26460
26461fi
26462
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026463# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026464{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26465echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026466if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026467 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026468else
26469 cat >conftest.$ac_ext <<_ACEOF
26470/* confdefs.h. */
26471_ACEOF
26472cat confdefs.h >>conftest.$ac_ext
26473cat >>conftest.$ac_ext <<_ACEOF
26474/* end confdefs.h. */
26475#include <sys/stat.h>
26476int
26477main ()
26478{
26479
26480struct stat st;
26481st.st_mtimespec.tv_nsec = 1;
26482
26483 ;
26484 return 0;
26485}
26486_ACEOF
26487rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026488if { (ac_try="$ac_compile"
26489case "(($ac_try" in
26490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26491 *) ac_try_echo=$ac_try;;
26492esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026494 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026495 ac_status=$?
26496 grep -v '^ *+' conftest.er1 >conftest.err
26497 rm -f conftest.er1
26498 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026500 (exit $ac_status); } && {
26501 test -z "$ac_c_werror_flag" ||
26502 test ! -s conftest.err
26503 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026504 ac_cv_stat_tv_nsec2=yes
26505else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026506 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026507sed 's/^/| /' conftest.$ac_ext >&5
26508
Martin v. Löwiseba40652007-08-30 20:10:57 +000026509 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026510fi
26511
Martin v. Löwiseba40652007-08-30 20:10:57 +000026512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26513fi
26514
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026515{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26516echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026517if test "$ac_cv_stat_tv_nsec2" = yes
26518then
26519
26520cat >>confdefs.h <<\_ACEOF
26521#define HAVE_STAT_TV_NSEC2 1
26522_ACEOF
26523
26524fi
26525
Jack Jansen666b1e72001-10-31 12:11:48 +000026526# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026527{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26528echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026529if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026530 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026531else
Martin v. Löwis11437992002-04-12 09:54:03 +000026532 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026533/* confdefs.h. */
26534_ACEOF
26535cat confdefs.h >>conftest.$ac_ext
26536cat >>conftest.$ac_ext <<_ACEOF
26537/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026538#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026539int
26540main ()
26541{
Jack Jansen666b1e72001-10-31 12:11:48 +000026542
26543 int rtn;
26544 rtn = mvwdelch(0,0,0);
26545
Martin v. Löwis11437992002-04-12 09:54:03 +000026546 ;
26547 return 0;
26548}
26549_ACEOF
26550rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026551if { (ac_try="$ac_compile"
26552case "(($ac_try" in
26553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26554 *) ac_try_echo=$ac_try;;
26555esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026557 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026558 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026559 grep -v '^ *+' conftest.er1 >conftest.err
26560 rm -f conftest.er1
26561 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026563 (exit $ac_status); } && {
26564 test -z "$ac_c_werror_flag" ||
26565 test ! -s conftest.err
26566 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026567 ac_cv_mvwdelch_is_expression=yes
26568else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026569 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026570sed 's/^/| /' conftest.$ac_ext >&5
26571
Martin v. Löwiseba40652007-08-30 20:10:57 +000026572 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026573fi
26574
Martin v. Löwiseba40652007-08-30 20:10:57 +000026575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26576fi
26577
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026578{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26579echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026580
26581if test "$ac_cv_mvwdelch_is_expression" = yes
26582then
Martin v. Löwis11437992002-04-12 09:54:03 +000026583
26584cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026585#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026586_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026587
26588fi
26589
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026590{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26591echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026592if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026593 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026594else
Martin v. Löwis11437992002-04-12 09:54:03 +000026595 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026596/* confdefs.h. */
26597_ACEOF
26598cat confdefs.h >>conftest.$ac_ext
26599cat >>conftest.$ac_ext <<_ACEOF
26600/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026601#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026602int
26603main ()
26604{
Jack Jansen666b1e72001-10-31 12:11:48 +000026605
26606 WINDOW *w;
26607 w->_flags = 0;
26608
Martin v. Löwis11437992002-04-12 09:54:03 +000026609 ;
26610 return 0;
26611}
26612_ACEOF
26613rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026614if { (ac_try="$ac_compile"
26615case "(($ac_try" in
26616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26617 *) ac_try_echo=$ac_try;;
26618esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026620 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026622 grep -v '^ *+' conftest.er1 >conftest.err
26623 rm -f conftest.er1
26624 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026626 (exit $ac_status); } && {
26627 test -z "$ac_c_werror_flag" ||
26628 test ! -s conftest.err
26629 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026630 ac_cv_window_has_flags=yes
26631else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026633sed 's/^/| /' conftest.$ac_ext >&5
26634
Martin v. Löwiseba40652007-08-30 20:10:57 +000026635 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026636fi
26637
Martin v. Löwiseba40652007-08-30 20:10:57 +000026638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26639fi
26640
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026641{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26642echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026643
Jack Jansen666b1e72001-10-31 12:11:48 +000026644
26645if test "$ac_cv_window_has_flags" = yes
26646then
Martin v. Löwis11437992002-04-12 09:54:03 +000026647
26648cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026649#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026650_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026651
26652fi
26653
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026654{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26655echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026656cat >conftest.$ac_ext <<_ACEOF
26657/* confdefs.h. */
26658_ACEOF
26659cat confdefs.h >>conftest.$ac_ext
26660cat >>conftest.$ac_ext <<_ACEOF
26661/* end confdefs.h. */
26662#include <curses.h>
26663int
26664main ()
26665{
26666void *x=is_term_resized
26667 ;
26668 return 0;
26669}
26670_ACEOF
26671rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026672if { (ac_try="$ac_compile"
26673case "(($ac_try" in
26674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26675 *) ac_try_echo=$ac_try;;
26676esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026678 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026679 ac_status=$?
26680 grep -v '^ *+' conftest.er1 >conftest.err
26681 rm -f conftest.er1
26682 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026684 (exit $ac_status); } && {
26685 test -z "$ac_c_werror_flag" ||
26686 test ! -s conftest.err
26687 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026688
26689cat >>confdefs.h <<\_ACEOF
26690#define HAVE_CURSES_IS_TERM_RESIZED 1
26691_ACEOF
26692
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026693 { echo "$as_me:$LINENO: result: yes" >&5
26694echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026695else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026696 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026697sed 's/^/| /' conftest.$ac_ext >&5
26698
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026699 { echo "$as_me:$LINENO: result: no" >&5
26700echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026701
26702fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026703
Martin v. Löwiseba40652007-08-30 20:10:57 +000026704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26705
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026706{ echo "$as_me:$LINENO: checking for resize_term" >&5
26707echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026708cat >conftest.$ac_ext <<_ACEOF
26709/* confdefs.h. */
26710_ACEOF
26711cat confdefs.h >>conftest.$ac_ext
26712cat >>conftest.$ac_ext <<_ACEOF
26713/* end confdefs.h. */
26714#include <curses.h>
26715int
26716main ()
26717{
26718void *x=resize_term
26719 ;
26720 return 0;
26721}
26722_ACEOF
26723rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026724if { (ac_try="$ac_compile"
26725case "(($ac_try" in
26726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26727 *) ac_try_echo=$ac_try;;
26728esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026730 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026731 ac_status=$?
26732 grep -v '^ *+' conftest.er1 >conftest.err
26733 rm -f conftest.er1
26734 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026736 (exit $ac_status); } && {
26737 test -z "$ac_c_werror_flag" ||
26738 test ! -s conftest.err
26739 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026740
26741cat >>confdefs.h <<\_ACEOF
26742#define HAVE_CURSES_RESIZE_TERM 1
26743_ACEOF
26744
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026745 { echo "$as_me:$LINENO: result: yes" >&5
26746echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026747else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026748 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026749sed 's/^/| /' conftest.$ac_ext >&5
26750
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026751 { echo "$as_me:$LINENO: result: no" >&5
26752echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026753
26754fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026755
Martin v. Löwiseba40652007-08-30 20:10:57 +000026756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26757
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026758{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26759echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026760cat >conftest.$ac_ext <<_ACEOF
26761/* confdefs.h. */
26762_ACEOF
26763cat confdefs.h >>conftest.$ac_ext
26764cat >>conftest.$ac_ext <<_ACEOF
26765/* end confdefs.h. */
26766#include <curses.h>
26767int
26768main ()
26769{
26770void *x=resizeterm
26771 ;
26772 return 0;
26773}
26774_ACEOF
26775rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026776if { (ac_try="$ac_compile"
26777case "(($ac_try" in
26778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26779 *) ac_try_echo=$ac_try;;
26780esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026782 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026783 ac_status=$?
26784 grep -v '^ *+' conftest.er1 >conftest.err
26785 rm -f conftest.er1
26786 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026788 (exit $ac_status); } && {
26789 test -z "$ac_c_werror_flag" ||
26790 test ! -s conftest.err
26791 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026792
26793cat >>confdefs.h <<\_ACEOF
26794#define HAVE_CURSES_RESIZETERM 1
26795_ACEOF
26796
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026797 { echo "$as_me:$LINENO: result: yes" >&5
26798echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026799else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026800 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026801sed 's/^/| /' conftest.$ac_ext >&5
26802
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026803 { echo "$as_me:$LINENO: result: no" >&5
26804echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026805
26806fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026807
Martin v. Löwiseba40652007-08-30 20:10:57 +000026808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26809
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026810{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26811echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026812
26813if test -r /dev/ptmx
26814then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026815 { echo "$as_me:$LINENO: result: yes" >&5
26816echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026817
26818cat >>confdefs.h <<\_ACEOF
26819#define HAVE_DEV_PTMX 1
26820_ACEOF
26821
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026822else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026823 { echo "$as_me:$LINENO: result: no" >&5
26824echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026825fi
26826
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026827{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26828echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026829
26830if test -r /dev/ptc
26831then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026832 { echo "$as_me:$LINENO: result: yes" >&5
26833echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026834
26835cat >>confdefs.h <<\_ACEOF
26836#define HAVE_DEV_PTC 1
26837_ACEOF
26838
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026839else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026840 { echo "$as_me:$LINENO: result: no" >&5
26841echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026842fi
26843
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026844{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26845echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026846if test "${ac_cv_have_size_t_format+set}" = set; then
26847 echo $ECHO_N "(cached) $ECHO_C" >&6
26848else
26849 if test "$cross_compiling" = yes; then
26850 ac_cv_have_size_t_format=no
Brett Cannon09d12362006-05-11 05:11:33 +000026851else
26852 cat >conftest.$ac_ext <<_ACEOF
26853/* confdefs.h. */
26854_ACEOF
26855cat confdefs.h >>conftest.$ac_ext
26856cat >>conftest.$ac_ext <<_ACEOF
26857/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026858
Brett Cannon09d12362006-05-11 05:11:33 +000026859#include <stdio.h>
26860#include <stddef.h>
26861#include <string.h>
26862
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000026863#ifdef HAVE_SYS_TYPES_H
26864#include <sys/types.h>
26865#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000026866
26867#ifdef HAVE_SSIZE_T
26868typedef ssize_t Py_ssize_t;
26869#elif SIZEOF_VOID_P == SIZEOF_LONG
26870typedef long Py_ssize_t;
26871#else
26872typedef int Py_ssize_t;
26873#endif
Brett Cannon09d12362006-05-11 05:11:33 +000026874
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000026875int main()
26876{
26877 char buffer[256];
26878
Brett Cannon09d12362006-05-11 05:11:33 +000026879 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26880 return 1;
26881
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000026882 if (strcmp(buffer, "123"))
26883 return 1;
26884
26885 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26886 return 1;
26887
26888 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000026889 return 1;
26890
26891 return 0;
26892}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026893
Brett Cannon09d12362006-05-11 05:11:33 +000026894_ACEOF
26895rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026896if { (ac_try="$ac_link"
26897case "(($ac_try" in
26898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26899 *) ac_try_echo=$ac_try;;
26900esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026902 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000026903 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000026905 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026906 { (case "(($ac_try" in
26907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26908 *) ac_try_echo=$ac_try;;
26909esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026911 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000026912 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000026914 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026915 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026916else
26917 echo "$as_me: program exited with status $ac_status" >&5
26918echo "$as_me: failed program was:" >&5
26919sed 's/^/| /' conftest.$ac_ext >&5
26920
26921( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026922ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026923fi
26924rm -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 +000026925fi
26926
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026927
26928
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026929fi
26930
26931{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26932echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
26933if test $ac_cv_have_size_t_format = yes
26934then
26935
26936cat >>confdefs.h <<\_ACEOF
26937#define PY_FORMAT_SIZE_T "z"
26938_ACEOF
26939
26940fi
26941
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026942{ echo "$as_me:$LINENO: checking for socklen_t" >&5
26943echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026944if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026945 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026946else
Martin v. Löwis11437992002-04-12 09:54:03 +000026947 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026948/* confdefs.h. */
26949_ACEOF
26950cat confdefs.h >>conftest.$ac_ext
26951cat >>conftest.$ac_ext <<_ACEOF
26952/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026953
26954#ifdef HAVE_SYS_TYPES_H
26955#include <sys/types.h>
26956#endif
26957#ifdef HAVE_SYS_SOCKET_H
26958#include <sys/socket.h>
26959#endif
26960
26961
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026962typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000026963int
26964main ()
26965{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026966if ((ac__type_new_ *) 0)
26967 return 0;
26968if (sizeof (ac__type_new_))
26969 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026970 ;
26971 return 0;
26972}
26973_ACEOF
26974rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026975if { (ac_try="$ac_compile"
26976case "(($ac_try" in
26977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26978 *) ac_try_echo=$ac_try;;
26979esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026981 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026983 grep -v '^ *+' conftest.er1 >conftest.err
26984 rm -f conftest.er1
26985 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026987 (exit $ac_status); } && {
26988 test -z "$ac_c_werror_flag" ||
26989 test ! -s conftest.err
26990 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026991 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000026992else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026994sed 's/^/| /' conftest.$ac_ext >&5
26995
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026996 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000026997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026998
26999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027000fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027001{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27002echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27003if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027004 :
27005else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027006
Martin v. Löwis01c04012002-11-11 14:58:44 +000027007cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027008#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027009_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027010
27011fi
27012
Michael W. Hudson54241132001-12-07 15:38:26 +000027013
Michael W. Hudson54241132001-12-07 15:38:26 +000027014
27015
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027016for h in `(cd $srcdir;echo Python/thread_*.h)`
27017do
27018 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27019done
27020
Michael W. Hudson54241132001-12-07 15:38:26 +000027021
Neal Norwitzd24499d2005-12-18 21:36:39 +000027022SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027023{ echo "$as_me:$LINENO: checking for build directories" >&5
27024echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027025for dir in $SRCDIRS; do
27026 if test ! -d $dir; then
27027 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027028 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027029done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027030{ echo "$as_me:$LINENO: result: done" >&5
27031echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027032
Guido van Rossum627b2d71993-12-24 10:39:16 +000027033# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027034ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027035
Martin v. Löwis11437992002-04-12 09:54:03 +000027036cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027037# This file is a shell script that caches the results of configure
27038# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027039# scripts and configure runs, see configure's option --config-cache.
27040# It is not useful on other systems. If it contains results you don't
27041# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027042#
Martin v. Löwis11437992002-04-12 09:54:03 +000027043# config.status only pays attention to the cache file if you give it
27044# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027045#
Skip Montanaro6dead952003-09-25 14:50:04 +000027046# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027047# loading this file, other *unset* `ac_cv_foo' will be assigned the
27048# following values.
27049
27050_ACEOF
27051
Guido van Rossumf78abae1997-01-21 22:02:36 +000027052# The following way of writing the cache mishandles newlines in values,
27053# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027054# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027055# Ultrix sh set writes to stderr and can't be redirected directly,
27056# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027057(
27058 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27059 eval ac_val=\$$ac_var
27060 case $ac_val in #(
27061 *${as_nl}*)
27062 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027063 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27064echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027065 esac
27066 case $ac_var in #(
27067 _ | IFS | as_nl) ;; #(
27068 *) $as_unset $ac_var ;;
27069 esac ;;
27070 esac
27071 done
27072
Martin v. Löwis11437992002-04-12 09:54:03 +000027073 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027074 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27075 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027076 # `set' does not quote correctly, so add quotes (double-quote
27077 # substitution turns \\\\ into \\, and sed turns \\ into \).
27078 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027079 "s/'/'\\\\''/g;
27080 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027081 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027082 *)
27083 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027084 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027085 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027086 esac |
27087 sort
27088) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027089 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027090 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027091 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000027092 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027093 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27094 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027095 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27096 :end' >>confcache
27097if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27098 if test -w "$cache_file"; then
27099 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027100 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27101echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027102 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027103 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027104 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27105echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027106 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027107fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027108rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027109
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027110test "x$prefix" = xNONE && prefix=$ac_default_prefix
27111# Let make expand exec_prefix.
27112test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027113
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027114DEFS=-DHAVE_CONFIG_H
27115
Skip Montanaro6dead952003-09-25 14:50:04 +000027116ac_libobjs=
27117ac_ltlibobjs=
27118for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27119 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027120 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027121 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027122 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27123 # will be set to the directory where LIBOBJS objects are built.
27124 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27125 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027126done
27127LIBOBJS=$ac_libobjs
27128
27129LTLIBOBJS=$ac_ltlibobjs
27130
27131
Martin v. Löwis11437992002-04-12 09:54:03 +000027132
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027133: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027134ac_clean_files_save=$ac_clean_files
27135ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027136{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27137echo "$as_me: creating $CONFIG_STATUS" >&6;}
27138cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027139#! $SHELL
27140# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027141# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027142# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027143# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027144
Martin v. Löwis11437992002-04-12 09:54:03 +000027145debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027146ac_cs_recheck=false
27147ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027148SHELL=\${CONFIG_SHELL-$SHELL}
27149_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027150
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027151cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027152## --------------------- ##
27153## M4sh Initialization. ##
27154## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027155
Martin v. Löwiseba40652007-08-30 20:10:57 +000027156# Be more Bourne compatible
27157DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027158if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27159 emulate sh
27160 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027161 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027162 # is contrary to our usage. Disable this feature.
27163 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027164 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027165else
Martin v. Löwiseba40652007-08-30 20:10:57 +000027166 case `(set -o) 2>/dev/null` in
27167 *posix*) set -o posix ;;
27168esac
27169
Martin v. Löwis11437992002-04-12 09:54:03 +000027170fi
Michael W. Hudson54241132001-12-07 15:38:26 +000027171
Skip Montanaro6dead952003-09-25 14:50:04 +000027172
Martin v. Löwis11437992002-04-12 09:54:03 +000027173
27174
Martin v. Löwiseba40652007-08-30 20:10:57 +000027175# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027176# Avoid depending upon Character Ranges.
27177as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27178as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27179as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27180as_cr_digits='0123456789'
27181as_cr_alnum=$as_cr_Letters$as_cr_digits
27182
27183# The user is always right.
27184if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027185 echo "#! /bin/sh" >conf$$.sh
27186 echo "exit 0" >>conf$$.sh
27187 chmod +x conf$$.sh
27188 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27189 PATH_SEPARATOR=';'
27190 else
27191 PATH_SEPARATOR=:
27192 fi
27193 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027194fi
27195
Martin v. Löwiseba40652007-08-30 20:10:57 +000027196# Support unset when possible.
27197if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27198 as_unset=unset
27199else
27200 as_unset=false
27201fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027202
Martin v. Löwiseba40652007-08-30 20:10:57 +000027203
27204# IFS
27205# We need space, tab and new line, in precisely that order. Quoting is
27206# there to prevent editors from complaining about space-tab.
27207# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27208# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027209as_nl='
27210'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027211IFS=" "" $as_nl"
27212
27213# Find who we are. Look in the path if we contain no directory separator.
27214case $0 in
27215 *[\\/]* ) as_myself=$0 ;;
27216 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027217for as_dir in $PATH
27218do
27219 IFS=$as_save_IFS
27220 test -z "$as_dir" && as_dir=.
27221 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27222done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027223IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027224
Martin v. Löwiseba40652007-08-30 20:10:57 +000027225 ;;
27226esac
27227# We did not find ourselves, most probably we were run as `sh COMMAND'
27228# in which case we are not to be found in the path.
27229if test "x$as_myself" = x; then
27230 as_myself=$0
27231fi
27232if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027233 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000027234 { (exit 1); exit 1; }
27235fi
27236
27237# Work around bugs in pre-3.0 UWIN ksh.
27238for as_var in ENV MAIL MAILPATH
27239do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27240done
27241PS1='$ '
27242PS2='> '
27243PS4='+ '
27244
27245# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027246for as_var in \
27247 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27248 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27249 LC_TELEPHONE LC_TIME
27250do
27251 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27252 eval $as_var=C; export $as_var
27253 else
27254 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27255 fi
27256done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027257
27258# Required to use basename.
27259if expr a : '\(a\)' >/dev/null 2>&1 &&
27260 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27261 as_expr=expr
27262else
27263 as_expr=false
27264fi
27265
27266if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27267 as_basename=basename
27268else
27269 as_basename=false
27270fi
27271
27272
27273# Name of the executable.
27274as_me=`$as_basename -- "$0" ||
27275$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27276 X"$0" : 'X\(//\)$' \| \
27277 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027278echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027279 sed '/^.*\/\([^/][^/]*\)\/*$/{
27280 s//\1/
27281 q
27282 }
27283 /^X\/\(\/\/\)$/{
27284 s//\1/
27285 q
27286 }
27287 /^X\/\(\/\).*/{
27288 s//\1/
27289 q
27290 }
27291 s/.*/./; q'`
27292
27293# CDPATH.
27294$as_unset CDPATH
27295
27296
27297
Martin v. Löwis11437992002-04-12 09:54:03 +000027298 as_lineno_1=$LINENO
27299 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027300 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000027301 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027302
Martin v. Löwis11437992002-04-12 09:54:03 +000027303 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27304 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000027305 # line-number line after each line using $LINENO; the second 'sed'
27306 # does the real work. The second script uses 'N' to pair each
27307 # line-number line with the line containing $LINENO, and appends
27308 # trailing '-' during substitution so that $LINENO is not a special
27309 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027310 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000027311 # scripts with optimization help from Paolo Bonzini. Blame Lee
27312 # E. McMahon (1931-1989) for sed's syntax. :-)
27313 sed -n '
27314 p
27315 /[$]LINENO/=
27316 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027317 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027318 s/[$]LINENO.*/&-/
27319 t lineno
27320 b
27321 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027322 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000027323 :loop
27324 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027325 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000027326 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027327 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000027328 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027329 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027330 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027331
Martin v. Löwis11437992002-04-12 09:54:03 +000027332 # Don't try to exec as it changes $[0], causing all sort of problems
27333 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000027334 # original and so on. Autoconf is especially sensitive to this).
27335 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027336 # Exit status is that of the last command.
27337 exit
27338}
27339
27340
Martin v. Löwiseba40652007-08-30 20:10:57 +000027341if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27342 as_dirname=dirname
27343else
27344 as_dirname=false
27345fi
27346
27347ECHO_C= ECHO_N= ECHO_T=
27348case `echo -n x` in
27349-n*)
27350 case `echo 'x\c'` in
27351 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27352 *) ECHO_C='\c';;
27353 esac;;
27354*)
27355 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027356esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027357
Martin v. Löwiseba40652007-08-30 20:10:57 +000027358if expr a : '\(a\)' >/dev/null 2>&1 &&
27359 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027360 as_expr=expr
27361else
27362 as_expr=false
27363fi
27364
27365rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000027366if test -d conf$$.dir; then
27367 rm -f conf$$.dir/conf$$.file
27368else
27369 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027370 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000027371fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027372echo >conf$$.file
27373if ln -s conf$$.file conf$$ 2>/dev/null; then
27374 as_ln_s='ln -s'
27375 # ... but there are two gotchas:
27376 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27377 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27378 # In both cases, we have to default to `cp -p'.
27379 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027380 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027381elif ln conf$$.file conf$$ 2>/dev/null; then
27382 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027383else
27384 as_ln_s='cp -p'
27385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027386rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27387rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027388
Skip Montanaro6dead952003-09-25 14:50:04 +000027389if mkdir -p . 2>/dev/null; then
27390 as_mkdir_p=:
27391else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027392 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027393 as_mkdir_p=false
27394fi
27395
Martin v. Löwiseba40652007-08-30 20:10:57 +000027396if test -x / >/dev/null 2>&1; then
27397 as_test_x='test -x'
27398else
27399 if ls -dL / >/dev/null 2>&1; then
27400 as_ls_L_option=L
27401 else
27402 as_ls_L_option=
27403 fi
27404 as_test_x='
27405 eval sh -c '\''
27406 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027407 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000027408 else
27409 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027410 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027411 esac;
27412 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27413 ???[sx]*):;;*)false;;esac;fi
27414 '\'' sh
27415 '
27416fi
27417as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027418
27419# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027420as_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 +000027421
27422# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027423as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027424
27425
Martin v. Löwis11437992002-04-12 09:54:03 +000027426exec 6>&1
27427
Martin v. Löwiseba40652007-08-30 20:10:57 +000027428# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027429# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000027430# values after options handling.
27431ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000027432This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027433generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027434
27435 CONFIG_FILES = $CONFIG_FILES
27436 CONFIG_HEADERS = $CONFIG_HEADERS
27437 CONFIG_LINKS = $CONFIG_LINKS
27438 CONFIG_COMMANDS = $CONFIG_COMMANDS
27439 $ $0 $@
27440
Martin v. Löwiseba40652007-08-30 20:10:57 +000027441on `(hostname || uname -n) 2>/dev/null | sed 1q`
27442"
27443
Martin v. Löwis11437992002-04-12 09:54:03 +000027444_ACEOF
27445
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027446cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027447# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000027448config_files="$ac_config_files"
27449config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027450
Martin v. Löwiseba40652007-08-30 20:10:57 +000027451_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027452
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027453cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027454ac_cs_usage="\
27455\`$as_me' instantiates files from templates according to the
27456current configuration.
27457
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027458Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027459
27460 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000027461 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027462 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027463 -d, --debug don't remove temporary files
27464 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027465 --file=FILE[:TEMPLATE]
27466 instantiate the configuration file FILE
27467 --header=FILE[:TEMPLATE]
27468 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027469
27470Configuration files:
27471$config_files
27472
27473Configuration headers:
27474$config_headers
27475
27476Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000027477
Martin v. Löwiseba40652007-08-30 20:10:57 +000027478_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027479cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027480ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000027481python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027482configured by $0, generated by GNU Autoconf 2.61,
27483 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027484
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027485Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027486This config.status script is free software; the Free Software Foundation
27487gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000027488
27489ac_pwd='$ac_pwd'
27490srcdir='$srcdir'
27491INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027492_ACEOF
27493
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027494cat >>$CONFIG_STATUS <<\_ACEOF
27495# If no file are specified by the user, then we need to provide default
27496# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027497ac_need_defaults=:
27498while test $# != 0
27499do
27500 case $1 in
27501 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000027502 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27503 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027504 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027505 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027506 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027507 ac_option=$1
27508 ac_optarg=$2
27509 ac_shift=shift
27510 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027511 esac
27512
Skip Montanaro6dead952003-09-25 14:50:04 +000027513 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027514 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027515 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27516 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027517 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027518 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027519 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027520 debug=: ;;
27521 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027522 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027523 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027524 ac_need_defaults=false;;
27525 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027526 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027527 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027528 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027529 --he | --h)
27530 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027531 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000027532Try \`$0 --help' for more information." >&2
27533 { (exit 1); exit 1; }; };;
27534 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027535 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027536 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27537 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27538 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027539
27540 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027541 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000027542Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027543 { (exit 1); exit 1; }; } ;;
27544
Martin v. Löwiseba40652007-08-30 20:10:57 +000027545 *) ac_config_targets="$ac_config_targets $1"
27546 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027547
27548 esac
27549 shift
27550done
27551
Skip Montanaro6dead952003-09-25 14:50:04 +000027552ac_configure_extra_args=
27553
27554if $ac_cs_silent; then
27555 exec 6>/dev/null
27556 ac_configure_extra_args="$ac_configure_extra_args --silent"
27557fi
27558
27559_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027560cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027561if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027562 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27563 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000027564 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027565 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027566fi
27567
Martin v. Löwis11437992002-04-12 09:54:03 +000027568_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027569cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027570exec 5>>config.log
27571{
27572 echo
27573 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27574## Running $as_me. ##
27575_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027576 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027577} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027578
Martin v. Löwiseba40652007-08-30 20:10:57 +000027579_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027580cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027581_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027582
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027583cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027584
27585# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027586for ac_config_target in $ac_config_targets
27587do
Martin v. Löwiseba40652007-08-30 20:10:57 +000027588 case $ac_config_target in
27589 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27590 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27591 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
27592 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000027593 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27594 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027595 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27596 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027597 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027598
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027599 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27600echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027601 { (exit 1); exit 1; }; };;
27602 esac
27603done
27604
Martin v. Löwiseba40652007-08-30 20:10:57 +000027605
Martin v. Löwis11437992002-04-12 09:54:03 +000027606# If the user did not use the arguments to specify the items to instantiate,
27607# then the envvar interface is used. Set only those that are not.
27608# We use the long form for the default assignment because of an extremely
27609# bizarre bug on SunOS 4.1.3.
27610if $ac_need_defaults; then
27611 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27612 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27613fi
27614
Skip Montanaro6dead952003-09-25 14:50:04 +000027615# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000027616# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027617# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027618# Hook for its removal unless debugging.
27619# Note that there is a small window in which the directory will not be cleaned:
27620# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027621$debug ||
27622{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027623 tmp=
27624 trap 'exit_status=$?
27625 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27626' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027627 trap '{ (exit 1); exit 1; }' 1 2 13 15
27628}
Martin v. Löwis11437992002-04-12 09:54:03 +000027629# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027630
Martin v. Löwis11437992002-04-12 09:54:03 +000027631{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027632 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027633 test -n "$tmp" && test -d "$tmp"
27634} ||
27635{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027636 tmp=./conf$$-$RANDOM
27637 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027638} ||
27639{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027640 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027641 { (exit 1); exit 1; }
27642}
27643
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027644#
27645# Set up the sed scripts for CONFIG_FILES section.
27646#
27647
27648# No need to generate the scripts if there are no CONFIG_FILES.
27649# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000027650if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027651
27652_ACEOF
27653
Martin v. Löwiseba40652007-08-30 20:10:57 +000027654
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027655
Martin v. Löwiseba40652007-08-30 20:10:57 +000027656ac_delim='%!_!# '
27657for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027658 cat >conf$$subs.sed <<_ACEOF
27659SHELL!$SHELL$ac_delim
27660PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27661PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27662PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27663PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27664PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27665PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27666exec_prefix!$exec_prefix$ac_delim
27667prefix!$prefix$ac_delim
27668program_transform_name!$program_transform_name$ac_delim
27669bindir!$bindir$ac_delim
27670sbindir!$sbindir$ac_delim
27671libexecdir!$libexecdir$ac_delim
27672datarootdir!$datarootdir$ac_delim
27673datadir!$datadir$ac_delim
27674sysconfdir!$sysconfdir$ac_delim
27675sharedstatedir!$sharedstatedir$ac_delim
27676localstatedir!$localstatedir$ac_delim
27677includedir!$includedir$ac_delim
27678oldincludedir!$oldincludedir$ac_delim
27679docdir!$docdir$ac_delim
27680infodir!$infodir$ac_delim
27681htmldir!$htmldir$ac_delim
27682dvidir!$dvidir$ac_delim
27683pdfdir!$pdfdir$ac_delim
27684psdir!$psdir$ac_delim
27685libdir!$libdir$ac_delim
27686localedir!$localedir$ac_delim
27687mandir!$mandir$ac_delim
27688DEFS!$DEFS$ac_delim
27689ECHO_C!$ECHO_C$ac_delim
27690ECHO_N!$ECHO_N$ac_delim
27691ECHO_T!$ECHO_T$ac_delim
27692LIBS!$LIBS$ac_delim
27693build_alias!$build_alias$ac_delim
27694host_alias!$host_alias$ac_delim
27695target_alias!$target_alias$ac_delim
27696VERSION!$VERSION$ac_delim
27697SOVERSION!$SOVERSION$ac_delim
27698CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27699UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27700ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
27701PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27702PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27703PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27704PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27705PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27706FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27707FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27708FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27709FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27710FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27711MACHDEP!$MACHDEP$ac_delim
27712SGI_ABI!$SGI_ABI$ac_delim
27713EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
27714EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
27715CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27716EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27717CC!$CC$ac_delim
27718CFLAGS!$CFLAGS$ac_delim
27719LDFLAGS!$LDFLAGS$ac_delim
27720CPPFLAGS!$CPPFLAGS$ac_delim
27721ac_ct_CC!$ac_ct_CC$ac_delim
27722EXEEXT!$EXEEXT$ac_delim
27723OBJEXT!$OBJEXT$ac_delim
27724CXX!$CXX$ac_delim
27725MAINCC!$MAINCC$ac_delim
27726CPP!$CPP$ac_delim
27727GREP!$GREP$ac_delim
27728EGREP!$EGREP$ac_delim
27729BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27730LIBRARY!$LIBRARY$ac_delim
27731LDLIBRARY!$LDLIBRARY$ac_delim
27732DLLLIBRARY!$DLLLIBRARY$ac_delim
27733BLDLIBRARY!$BLDLIBRARY$ac_delim
27734LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27735INSTSONAME!$INSTSONAME$ac_delim
27736RUNSHARED!$RUNSHARED$ac_delim
27737LINKCC!$LINKCC$ac_delim
27738GNULD!$GNULD$ac_delim
27739RANLIB!$RANLIB$ac_delim
27740AR!$AR$ac_delim
27741ARFLAGS!$ARFLAGS$ac_delim
27742SVNVERSION!$SVNVERSION$ac_delim
27743INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27744INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27745INSTALL_DATA!$INSTALL_DATA$ac_delim
27746LN!$LN$ac_delim
27747OPT!$OPT$ac_delim
27748BASECFLAGS!$BASECFLAGS$ac_delim
27749UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27750OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27751LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27752SO!$SO$ac_delim
27753LDSHARED!$LDSHARED$ac_delim
27754BLDSHARED!$BLDSHARED$ac_delim
27755CCSHARED!$CCSHARED$ac_delim
27756_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027757
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027758 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 +000027759 break
27760 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027761 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27762echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027763 { (exit 1); exit 1; }; }
27764 else
27765 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027766 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027767done
27768
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027769ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27770if test -n "$ac_eof"; then
27771 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27772 ac_eof=`expr $ac_eof + 1`
27773fi
27774
27775cat >>$CONFIG_STATUS <<_ACEOF
27776cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27777/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000027778_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027779sed '
27780s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27781s/^/s,@/; s/!/@,|#_!!_#|/
27782:n
27783t n
27784s/'"$ac_delim"'$/,g/; t
27785s/$/\\/; p
27786N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27787' >>$CONFIG_STATUS <conf$$subs.sed
27788rm -f conf$$subs.sed
27789cat >>$CONFIG_STATUS <<_ACEOF
27790CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000027791_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027792
27793
27794ac_delim='%!_!# '
27795for ac_last_try in false false false false false :; do
27796 cat >conf$$subs.sed <<_ACEOF
27797LINKFORSHARED!$LINKFORSHARED$ac_delim
27798CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
27799SHLIBS!$SHLIBS$ac_delim
27800USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27801SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27802USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27803LDLAST!$LDLAST$ac_delim
27804THREADOBJ!$THREADOBJ$ac_delim
27805DLINCLDIR!$DLINCLDIR$ac_delim
27806DYNLOADFILE!$DYNLOADFILE$ac_delim
27807MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27808TRUE!$TRUE$ac_delim
27809LIBOBJS!$LIBOBJS$ac_delim
27810HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27811HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27812HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27813HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27814HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27815LIBM!$LIBM$ac_delim
27816LIBC!$LIBC$ac_delim
27817UNICODE_OBJS!$UNICODE_OBJS$ac_delim
27818THREADHEADERS!$THREADHEADERS$ac_delim
27819SRCDIRS!$SRCDIRS$ac_delim
27820LTLIBOBJS!$LTLIBOBJS$ac_delim
27821_ACEOF
27822
27823 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
27824 break
27825 elif $ac_last_try; then
27826 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27827echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027828 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027829 else
27830 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27831 fi
27832done
27833
27834ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27835if test -n "$ac_eof"; then
27836 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27837 ac_eof=`expr $ac_eof + 1`
27838fi
27839
27840cat >>$CONFIG_STATUS <<_ACEOF
27841cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
27842/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027843_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027844sed '
27845s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27846s/^/s,@/; s/!/@,|#_!!_#|/
27847:n
27848t n
27849s/'"$ac_delim"'$/,g/; t
27850s/$/\\/; p
27851N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27852' >>$CONFIG_STATUS <conf$$subs.sed
27853rm -f conf$$subs.sed
27854cat >>$CONFIG_STATUS <<_ACEOF
27855:end
27856s/|#_!!_#|//g
27857CEOF$ac_eof
27858_ACEOF
27859
Martin v. Löwiseba40652007-08-30 20:10:57 +000027860
27861# VPATH may cause trouble with some makes, so we remove $(srcdir),
27862# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27863# trailing colons and then remove the whole line if VPATH becomes empty
27864# (actually we leave an empty line to preserve line numbers).
27865if test "x$srcdir" = x.; then
27866 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27867s/:*\$(srcdir):*/:/
27868s/:*\${srcdir}:*/:/
27869s/:*@srcdir@:*/:/
27870s/^\([^=]*=[ ]*\):*/\1/
27871s/:*$//
27872s/^[^=]*=[ ]*$//
27873}'
27874fi
27875
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027876cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027877fi # test -n "$CONFIG_FILES"
27878
Martin v. Löwiseba40652007-08-30 20:10:57 +000027879
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027880for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000027881do
27882 case $ac_tag in
27883 :[FHLC]) ac_mode=$ac_tag; continue;;
27884 esac
27885 case $ac_mode$ac_tag in
27886 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027887 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
27888echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027889 { (exit 1); exit 1; }; };;
27890 :[FH]-) ac_tag=-:-;;
27891 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27892 esac
27893 ac_save_IFS=$IFS
27894 IFS=:
27895 set x $ac_tag
27896 IFS=$ac_save_IFS
27897 shift
27898 ac_file=$1
27899 shift
27900
27901 case $ac_mode in
27902 :L) ac_source=$1;;
27903 :[FH])
27904 ac_file_inputs=
27905 for ac_f
27906 do
27907 case $ac_f in
27908 -) ac_f="$tmp/stdin";;
27909 *) # Look for the file first in the build tree, then in the source tree
27910 # (if the path is not absolute). The absolute path cannot be DOS-style,
27911 # because $ac_f cannot contain `:'.
27912 test -f "$ac_f" ||
27913 case $ac_f in
27914 [\\/$]*) false;;
27915 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27916 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027917 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27918echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027919 { (exit 1); exit 1; }; };;
27920 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027921 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027922 done
27923
27924 # Let's still pretend it is `configure' which instantiates (i.e., don't
27925 # use $as_me), people would be surprised to read:
27926 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027927 configure_input="Generated from "`IFS=:
27928 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000027929 if test x"$ac_file" != x-; then
27930 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027931 { echo "$as_me:$LINENO: creating $ac_file" >&5
27932echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027933 fi
27934
27935 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027936 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027937 esac
27938 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027939 esac
27940
Martin v. Löwiseba40652007-08-30 20:10:57 +000027941 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027942$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027943 X"$ac_file" : 'X\(//\)[^/]' \| \
27944 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000027945 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027946echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027947 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27948 s//\1/
27949 q
27950 }
27951 /^X\(\/\/\)[^/].*/{
27952 s//\1/
27953 q
27954 }
27955 /^X\(\/\/\)$/{
27956 s//\1/
27957 q
27958 }
27959 /^X\(\/\).*/{
27960 s//\1/
27961 q
27962 }
27963 s/.*/./; q'`
27964 { as_dir="$ac_dir"
27965 case $as_dir in #(
27966 -*) as_dir=./$as_dir;;
27967 esac
27968 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027969 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000027970 while :; do
27971 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027972 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000027973 *) as_qdir=$as_dir;;
27974 esac
27975 as_dirs="'$as_qdir' $as_dirs"
27976 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027977$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027978 X"$as_dir" : 'X\(//\)[^/]' \| \
27979 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000027980 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027981echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027982 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27983 s//\1/
27984 q
27985 }
27986 /^X\(\/\/\)[^/].*/{
27987 s//\1/
27988 q
27989 }
27990 /^X\(\/\/\)$/{
27991 s//\1/
27992 q
27993 }
27994 /^X\(\/\).*/{
27995 s//\1/
27996 q
27997 }
27998 s/.*/./; q'`
27999 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028000 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028001 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028002 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28003echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028004 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028005 ac_builddir=.
28006
Martin v. Löwiseba40652007-08-30 20:10:57 +000028007case "$ac_dir" in
28008.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28009*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028010 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028011 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028012 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028013 case $ac_top_builddir_sub in
28014 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28015 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28016 esac ;;
28017esac
28018ac_abs_top_builddir=$ac_pwd
28019ac_abs_builddir=$ac_pwd$ac_dir_suffix
28020# for backward compatibility:
28021ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028022
28023case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028024 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028025 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028026 ac_top_srcdir=$ac_top_builddir_sub
28027 ac_abs_top_srcdir=$ac_pwd ;;
28028 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028029 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028030 ac_top_srcdir=$srcdir
28031 ac_abs_top_srcdir=$srcdir ;;
28032 *) # Relative name.
28033 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28034 ac_top_srcdir=$ac_top_build_prefix$srcdir
28035 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028036esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028037ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028038
Martin v. Löwis11437992002-04-12 09:54:03 +000028039
Martin v. Löwiseba40652007-08-30 20:10:57 +000028040 case $ac_mode in
28041 :F)
28042 #
28043 # CONFIG_FILE
28044 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028045
28046 case $INSTALL in
28047 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028048 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028049 esac
Brett Cannon19fab762007-06-02 03:02:29 +000028050_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028051
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028052cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028053# If the template does not know about datarootdir, expand it.
28054# FIXME: This hack should be removed a few years after 2.60.
28055ac_datarootdir_hack=; ac_datarootdir_seen=
28056
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028057case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000028058 p
28059 q
28060}
28061/@datadir@/p
28062/@docdir@/p
28063/@infodir@/p
28064/@localedir@/p
28065/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028066' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028067*datarootdir*) ac_datarootdir_seen=yes;;
28068*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028069 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28070echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028071_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028072cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028073 ac_datarootdir_hack='
28074 s&@datadir@&$datadir&g
28075 s&@docdir@&$docdir&g
28076 s&@infodir@&$infodir&g
28077 s&@localedir@&$localedir&g
28078 s&@mandir@&$mandir&g
28079 s&\\\${datarootdir}&$datarootdir&g' ;;
28080esac
28081_ACEOF
28082
28083# Neutralize VPATH when `$srcdir' = `.'.
28084# Shell code in configure.ac might set extrasub.
28085# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028086cat >>$CONFIG_STATUS <<_ACEOF
28087 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028088$extrasub
28089_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028090cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028091:t
28092/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028093s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000028094s&@top_builddir@&$ac_top_builddir_sub&;t t
28095s&@srcdir@&$ac_srcdir&;t t
28096s&@abs_srcdir@&$ac_abs_srcdir&;t t
28097s&@top_srcdir@&$ac_top_srcdir&;t t
28098s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28099s&@builddir@&$ac_builddir&;t t
28100s&@abs_builddir@&$ac_abs_builddir&;t t
28101s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28102s&@INSTALL@&$ac_INSTALL&;t t
28103$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028104" $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 +000028105
Martin v. Löwiseba40652007-08-30 20:10:57 +000028106test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28107 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28108 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028109 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028110which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028111echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028112which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028113
Martin v. Löwiseba40652007-08-30 20:10:57 +000028114 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028115 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028116 -) cat "$tmp/out"; rm -f "$tmp/out";;
28117 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28118 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028119 ;;
28120 :H)
28121 #
28122 # CONFIG_HEADER
28123 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028124_ACEOF
28125
28126# Transform confdefs.h into a sed script `conftest.defines', that
28127# substitutes the proper values into config.h.in to produce config.h.
28128rm -f conftest.defines conftest.tail
28129# First, append a space to every undef/define line, to ease matching.
28130echo 's/$/ /' >conftest.defines
28131# Then, protect against being on the right side of a sed subst, or in
28132# an unquoted here document, in config.status. If some macros were
28133# called several times there might be several #defines for the same
28134# symbol, which is useless. But do not sort them, since the last
28135# AC_DEFINE must be honored.
28136ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28137# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28138# NAME is the cpp macro being defined, VALUE is the value it is being given.
28139# PARAMS is the parameter list in the macro definition--in most cases, it's
28140# just an empty string.
28141ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28142ac_dB='\\)[ (].*,\\1define\\2'
28143ac_dC=' '
28144ac_dD=' ,'
28145
28146uniq confdefs.h |
28147 sed -n '
28148 t rset
28149 :rset
28150 s/^[ ]*#[ ]*define[ ][ ]*//
28151 t ok
28152 d
28153 :ok
28154 s/[\\&,]/\\&/g
28155 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28156 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28157 ' >>conftest.defines
28158
28159# Remove the space that was appended to ease matching.
28160# Then replace #undef with comments. This is necessary, for
28161# example, in the case of _POSIX_SOURCE, which is predefined and required
28162# on some systems where configure will not decide to define it.
28163# (The regexp can be short, since the line contains either #define or #undef.)
28164echo 's/ $//
28165s,^[ #]*u.*,/* & */,' >>conftest.defines
28166
28167# Break up conftest.defines:
28168ac_max_sed_lines=50
28169
28170# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28171# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28172# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28173# et cetera.
28174ac_in='$ac_file_inputs'
28175ac_out='"$tmp/out1"'
28176ac_nxt='"$tmp/out2"'
28177
28178while :
28179do
28180 # Write a here document:
28181 cat >>$CONFIG_STATUS <<_ACEOF
28182 # First, check the format of the line:
28183 cat >"\$tmp/defines.sed" <<\\CEOF
28184/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28185/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28186b
28187:def
28188_ACEOF
28189 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28190 echo 'CEOF
28191 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28192 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28193 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28194 grep . conftest.tail >/dev/null || break
28195 rm -f conftest.defines
28196 mv conftest.tail conftest.defines
28197done
28198rm -f conftest.defines conftest.tail
28199
28200echo "ac_result=$ac_in" >>$CONFIG_STATUS
28201cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028202 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028203 echo "/* $configure_input */" >"$tmp/config.h"
28204 cat "$ac_result" >>"$tmp/config.h"
28205 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28206 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28207echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028208 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028209 rm -f $ac_file
28210 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028211 fi
28212 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028213 echo "/* $configure_input */"
28214 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028215 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028216 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028217 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028218
Martin v. Löwiseba40652007-08-30 20:10:57 +000028219
28220 esac
28221
28222done # for ac_tag
28223
Guido van Rossum627b2d71993-12-24 10:39:16 +000028224
Martin v. Löwis11437992002-04-12 09:54:03 +000028225{ (exit 0); exit 0; }
28226_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028227chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028228ac_clean_files=$ac_clean_files_save
28229
28230
28231# configure is writing to config.log, and then calls config.status.
28232# config.status does its own redirection, appending to config.log.
28233# Unfortunately, on DOS this fails, as config.log is still kept open
28234# by configure, so config.status won't be able to write to it; its
28235# output is simply discarded. So we exec the FD to /dev/null,
28236# effectively closing config.log, so it can be properly (re)opened and
28237# appended to by config.status. When coming back to configure, we
28238# need to make the FD available again.
28239if test "$no_create" != yes; then
28240 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028241 ac_config_status_args=
28242 test "$silent" = yes &&
28243 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028244 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028245 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028246 exec 5>>config.log
28247 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28248 # would make configure fail if this is the last instruction.
28249 $ac_cs_success || { (exit 1); exit 1; }
28250fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028251
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028252
Martin v. Löwisf7afe952006-04-14 15:16:15 +000028253echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028254if test ! -f Modules/Setup
28255then
28256 cp $srcdir/Modules/Setup.dist Modules/Setup
28257fi
28258
Martin v. Löwisf7afe952006-04-14 15:16:15 +000028259echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028260if test ! -f Modules/Setup.local
28261then
28262 echo "# Edit this file for local setup changes" >Modules/Setup.local
28263fi
28264
28265echo "creating Makefile"
28266$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28267 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028268 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000028269
28270case $ac_sys_system in
28271BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028272 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000028273
28274 Support for BeOS is deprecated as of Python 2.6.
28275 See PEP 11 for the gory details.
28276 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028277echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000028278
28279 Support for BeOS is deprecated as of Python 2.6.
28280 See PEP 11 for the gory details.
28281 " >&2;}
28282 ;;
28283*) ;;
28284esac
28285
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028286mv config.c Modules